Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question on Image Processing using Matlab

Status
Not open for further replies.

IndiJones

Full Member level 2
Joined
Aug 13, 2001
Messages
132
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
786
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!
 

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!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top