DSPRelated.com
Forums

colour image processing in matlab

Started by Unknown March 9, 2005


hi,

I am trying to apply FFT2 to a colour image (RGB). For this i am thinking of seperating the given image into its monochrome components and process each one seperately. Is this idea right? If so do we have any matlab function to decompose the given RGB ... ? And moreover after applying FFT to each monochrome component i dont have any idea of hoe to recombine the three components back in the spatial domain.
waiting for someone to help,
regds,
rukmani.




Rukmani, Out of little of what I remember of playing with color image, I think
once you read the image in matlab it is in stored in a 3 dimensional
matrix. Where each matrix coresponds to R G and B component. This may
be true only for a particular format though. I may be wrong.

What format is ur image in? How is it stored in matlab. I mean what
are the dimension of variable used to store that image.

If you can separate 3 components than definately you can recombine and
get color image in spatial domain.

Hope this helps
Tarang On Wed, 09 Mar 2005 10:08:14 -0500,
<> wrote:
>
>
> hi,
>
> I am trying to apply FFT2 to a colour image (RGB). For this i am thinking of
> seperating the given image into its monochrome components and process each
> one seperately. Is this idea right? If so do we have any matlab function to
> decompose the given RGB ... ? And moreover after applying FFT to each
> monochrome component i dont have any idea of hoe to recombine the three
> components back in the spatial domain.
> waiting for someone to help,
> regds,
> rukmani. >
>
> To




Hi Rukmani,
You are in the right track.
You have to decompose the RBG into separate R-, G- and B- colour components and take 2-D FFT separately.

x = imread('file.jpg');

% Decompose to separate colour components
xr = x(:,:,1);
xg = x(:,:,2);
xb = x(:,:,3);

% Take 2-D FFT on xr, xg, xb
...
...

% To reconstruct
% Take 2-D IFFT
...
...

% To recombine in time-domain
y(:,:,1) = xr;
y(:,:,2) = xg;
y(:,:,3) = xb; bimol

wrote:

>
>
>hi,
>
>I am trying to apply FFT2 to a colour image (RGB). For this i am thinking of seperating the given image into its monochrome components and process each one seperately. Is this idea right? If so do we have any matlab function to decompose the given RGB ... ? And moreover after applying FFT to each monochrome component i dont have any idea of hoe to recombine the three components back in the spatial domain.
>waiting for someone to help,
>regds,
>rukmani. >
>


--
Waikhom Bimolchand Singh
DSP and Micro Division
STMicroelectronics, India __________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp