Rules | Recent posts | topic RSS | Search | Register  | Log in

Question on Image Processing using Matlab

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Author Message
IndiJones



Joined: 13 Aug 2001
Posts: 157


Post05 Jul 2004 7:54   Question on Image Processing using Matlab

I'm capturing raw images from an experimental CMOS digital camera. However, this camera doesn't have RGB masks on the CMOS. Instead, the CMOS is monochrome. An instrument with camera lens is fitted infront of the CMOS that has four apertures so that the input image on the CMOS screen is divided into four equal parts (upper left = UL, upper right = UR, lower left = LL, lower right = LR). I'm using 3 of the 4 apertures (UR, LL, LR) to place 3 optical filters like RGB (not exactly RGB). So the captured grayscale image on the computer screen is divided in 4 parts. One part is unused. The other three parts represent the images corresponding to the individual filters. The CMOS sensor has a bit depth of 12bits/pixel but the camera and the capture board takes it as 16bits/pixel. The captured raw image is saved as uncompressed 16 bits/pixel TIFF image with Prefix 0 bits. Now I would like to do the followings with the image using Matlab:

1) subtract the extra bits from the 16 bit image so that it becomes 12 bit image.

2) make a composite image using the UR, LL & LR images.

Could anyone plz advise me on that!

Thanks in advance!
Back to top
dora



Joined: 11 Jun 2003
Posts: 158
Helped: 2


Post06 Jul 2004 9:07   Re: Question on Image Processing using Matlab

Hi IndiJones,

It seems you have left most of the way behind.
Now in matlab the things are easy.

I am going to describe shortly what can be done.

So you have TIFF file. You can inport the image using for example
image=imread(,filename, 'TIFF') command

So now you have matrix which represent your grayscale image

Then you can index each part (asummed you sensor is square and number of lines is even)

imageRGB(:,:,1)=image(1:end/2,1:end/2); %UL
imageRGB(:,:,2)=image(1:end/2,end/2:end); %UR
imageRGB(:,:,3)=image(end/2:end,end/2:end); %LR


in matlab you can use uint16 data type but it doesnt metter in your case.
You just have to be sure that the matlab double precision matrix represents
exactly your image (12 bit ) data.


then you can see the image using

image(imageRGB);

IndiJones, note that I just sketch the procedure ...
probably there is lot of mistakes in it ...
this is just the main approach
If you need something more special just let me know

Best Regards
dora

BTW do you have spatial nonlinear modification due to the optics? How do you deal with it?

-----------------------------
I'm capturing raw images from an experimental CMOS digital camera. However, this camera doesn't have RGB masks on the CMOS. Instead, the CMOS is monochrome. An instrument with camera lens is fitted infront of the CMOS that has four apertures so that the input image on the CMOS screen is divided into four equal parts (upper left = UL, upper right = UR, lower left = LL, lower right = LR). I'm using 3 of the 4 apertures (UR, LL, LR) to place 3 optical filters like RGB (not exactly RGB). So the captured grayscale image on the computer screen is divided in 4 parts. One part is unused. The other three parts represent the images corresponding to the individual filters. The CMOS sensor has a bit depth of 12bits/pixel but the camera and the capture board takes it as 16bits/pixel. The captured raw image is saved as uncompressed 16 bits/pixel TIFF image with Prefix 0 bits. Now I would like to do the followings with the image using Matlab:

1) subtract the extra bits from the 16 bit image so that it becomes 12 bit image.

2) make a composite image using the UR, LL & LR images.

Could anyone plz advise me on that!

Thanks in advance!
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Page 1 of 1 All times are GMT + 2 Hours


Abuse
Administrator
Moderators
topic RSS 
sitemap