Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Help with image processing
Date: Tue, 03 Nov 2009 11:25:31 -0500
Organization: TMW
Lines: 42
Message-ID: <op.u2tuktbea5ziv5@uthamaa.dhcp.mathworks.com>
References: <hcp0nc$on$1@fred.mathworks.com>
 <151680ce-a53e-4537-858e-4fd98565d087@s15g2000yqs.googlegroups.com>
 <hcpjqh$quv$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257265532 19792 172.31.57.126 (3 Nov 2009 16:25:32 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 16:25:32 +0000 (UTC)
User-Agent: Opera Mail/10.01 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:582081


On Tue, 03 Nov 2009 10:56:01 -0500, M Ladderman <mirresimons@gmail.com>  
wrote:

> Hi thanks for your reply ImageAnalyst. Yes I am aware of the problems of  
> measuring colour from photographs. I am intending to calibrate my camera  
> with a colour chart, the reference I have in to correct for small  
> changes in illumination, but I presume there are none (or the effects  
> are negliable) because I use a controlled lighting environment and fixed  
> camera settings.. The colourchart will be used to calibrate my CCD of  
> the camera to be able to be able to compare my study with others.
>
> In reply to your comments on the code (this is just from a demo), but I  
> also tried different edge detections which all 'fail' to detect enough  
> borders to just fill my image. I will try imclose instead of imfill and  
> see what the difference is.. the texture image or intensity image might  
> also be a good idea. I tried applying the edge detection to my blue, red  
> and green channel seperately that improved it a bit but not enough.
>
> However if I use imclose I might still not be able to ignore the tail so  
> using a shape to fit the image is not something that is a good approach??
>
> Thanks!

A couple of questions on the setup. Would the fish always be in the same  
angle, and always on a background of ice?

"because I use a controlled lighting environment"

Does this mean you can change the camera angle and lighting? If so, then  
you could experiment with the best setup which gives you maximum contrast  
to segment the fish. If possible a light source shined on to the ice block  
 from below/side the surface might work as a backlight and clearly  
highlight the fish. You might then even be able to get away with simple  
thresholding.
Though, of course, it might not be ideal for color measurements. Maybe you  
could take two pictures with the same setup/one with backlight to aid  
segmentation and another with controlled light from the top for color  
measurements?

I would also imagine the camera has to be exactly overhead to give you  
accurate measurements of the size (or at least 'size' in that angle).