Thread Subject: Image Attacks

Subject: Image Attacks

From: Abdulhakeem Othman

Date: 13 Mar, 2010 22:01:21

Message: 1 of 5

Hello ........

I have an rgb image ,I need to do these attacks to the image:

1-filtering
  a-Gaussian lowpass (3x3)
  b-Median filtering (2x2)
2-Image enhancement
  a-Edge sharppen
  b-Gaussian blurring
  c-Moving blurring
3-Image Mosaic (4x4)

I do some of some but I have an Error ,form example :

** Median filter we can do with the toolbox medfilt2(a,[m n])
   But I have an error I think the error is in rgb image .I do this with grayscale
   I do not have an error.

Can anyone help me please...

Best regards

Subject: Image Attacks

From: ImageAnalyst

Date: 13 Mar, 2010 22:33:33

Message: 2 of 5

Those filters (not "attacks" -- at least I've never heard them called
that) are for monochrome images, not color images. You can apply them
to each color plane (r, g, and b) one at a time, or convert to another
color space (such as HSI, HSV, HSL, LAB, YCbCr, etc.) and apply them
to one channel selectively, or to each channel depending on what you
want to do.

Subject: Image Attacks

From: Abdulhakeem Othman

Date: 14 Mar, 2010 11:28:02

Message: 3 of 5

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <6c7d4622-7350-4325-9c9d-80f39e193906@t41g2000yqt.googlegroups.com>...
> Those filters (not "attacks" -- at least I've never heard them called
> that) are for monochrome images, not color images. You can apply them
> to each color plane (r, g, and b) one at a time, or convert to another
> color space (such as HSI, HSV, HSL, LAB, YCbCr, etc.) and apply them
> to one channel selectively, or to each channel depending on what you
> want to do.

Hello ...
Yes you are ture,those are filters.
I'm working on the watermarking I apply those filters to the watermarked image and then I extract the watermark image .I think those filters effect the watermark image ,then may be we called those filters (attack) when we work on the watermarking.I think that.....

Yes we can apply those filters only to the grayscale (monochrome images).That is new information to me.

But I'm beginning in matlab I can apply some of them .
Can you help me how we do hose filters in matlab.

Best Regards

Subject: Image Attacks

From: ImageAnalyst

Date: 14 Mar, 2010 14:01:26

Message: 4 of 5

Abdulhakeem Othman:
So you already have a watermarked image and you're trying to the
watermark itself?

I don't have a demo on all those filters but they're described in the
help documentation. Here's a more general purpose demo on object
segmentation and measurement:
http://www.mathworks.com/matlabcentral/fileexchange/25157

If you have any more specific questions, come back and post your code
and images. It's always preferable to make image processing
suggestions when you have an image that you can look at.

Subject: watermarking Attacks

From: Abdulhakeem Othman

Date: 25 Mar, 2010 22:56:04

Message: 5 of 5

 Hello ........

I have an rgb watermarked image ,I need to do these attacks to the image:
  
1-filtering
   a-Gaussian lowpass (3x3)
   b-Median filtering (2x2)
 2-Image enhancement
   a-Edge sharppen
   b-Gaussian blurring
   c-Moving blurring
3-Image Mosaic (4x4)
 
I do some of them :

1)a)-Gaussian lowpass

%****************
%GaussianLowpass Filter
%Read an Original RGB Image
Original=imread('lena.bmp');

%Read an RGB Watermarked Image
Host=imread('watermark.bmp');

[O1 O2]=size(Host)
subplot(3,4,1);
imshow(Host);title('Watermarked Image');

%**************
%Convert The RGB Watermarked Image to Ycbcr space
YCBCR=rgb2ycbcr(Host);
subplot(3,4,2);
imshow(YCBCR);title('Ycbcr Image');

Y=YCBCR(:,:,1);
CB=YCBCR(:,:,2);
CR=YCBCR(:,:,3);
subplot(3,4,3);
imshow(Y);title('Y luminance');
%***************
%***************
%That is the Gaussian lowpass (3x3)
H=fspecial('gaussian',[3 3]);
Filter= imfilter(Y,H);
subplot(3,4,4);
imshow(Filter);title(' LowPass Y luminance');
%*************
%concatenate the luminance (Y) ,CBand CR
concatenate=cat(3,Filter,CB,CR);
subplot(3,4,5);
imshow(concatenate);title('concatenation Ycbcr');
%**************
%Convert to RGB space
RGB=ycbcr2rgb(concatenate);
subplot(3,4,6);
imshow(RGB);title('Recovered RGB Image');
imwrite(RGB,'QaussianFilter.bmp');
%***************
%Calculate the PSNR (for Color Image)
mseImage = (double(Original) - double(RGB)) .^ 2;
mse = sum(sum(mseImage)) ;
summse=0;
for i=1:3
    summse=summse+mse(:,:,i);
end
k=(O1*O2);
summse=summse/ k;
PSNR = 10 * log10( 255^2 /summse)
%**************************
 
1)b) We do the same read original and watermarked images convert the RGB image to YCBCR then do a mdian filter:

%Add noise to Y luminance
Noise=imnoise(Y,'salt & pepper',0.02);
subplot(3,4,4);
imshow(Noise);title('Noised Y luminance');
%*******************
% Do the median Filter
Filter=medfilt2(Noise,[2 2]);
subplot(3,4,5);
imshow(Filter);title('Filter Y luminance');
%********************


The code is true but I'm not sure if it is 100% true about Gaussian lowpass and median filter.

The other I can not do it .
Can anyone help me please about the others (gaussian blur ,Edge sharpen...)

  Best regards

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com