Focus measurement (more general image analysis question)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Focus measurement (more general image analysis question)

Michael Schmid
Hi Antje,

what about something the following algorithm:

- very slight smoothing to get rid of the noise. Also make sure
   that hot pixels, dead pixels, etc. are corrected (e.g. by a median).
- subtract a smoothed copy of the image
- determine the maximum minus minimum of the difference. This
   will give you an indicator of the sharpness of the sharpest edge.
- If the contrast of your images is different (different
   illumination, different camera gain...) divide by the contrast
   range (max minus min) of the noise-corrected original image.

It won't work if the images are unsharp due to motion blur
(camera shake), since these will be rather sharp in one
direction.


Michael
________________________________________________________________

On 7 Mar 2007, at 15:09, Antje wrote:

> Hi Gabriel,
>
> In general you are completely right! But I don't have the  
> possibility to  get more than one shot per scene. That's a fact!
> I was hoping that there is some kind of measurement which can judge  
> on "sharpness" for images with different content independently from  
> the content. So, that I can get values which are comparable between  
> images with different densities of cells e.g.
> Then, I can have a look at these values and decide where to put the  
> threshold to judge if something is in focus or not. But therefore,  
> I need some kind of content independent measurement...
> I can assume that all images have the same kind of content (sharp  
> scenes of nuclei for example) and now I'd like to compare these  
> images not taking into account the amount of "content".
> Maybe it is not possible (I don't wanna believe... )
> But sooner or later I have to overcome this problem...
>
> Antje
>
>
> Gabriel Landini schrieb:
>> On Wednesday 07 March 2007 13:10:27 Antje wrote:
>>> But still I have a question. How shall I compare
>>> images with different density? Because the standard deviation of an
>>> image will be dependent on the density of objects. It may happen,  
>>> that
>>> there is just one cell within one image and it can also happen, that
>>> there is no background at all because of the density of cells...
>> I think it is not possible to get a robust method of sorting  
>> *single* images according to their degree of "in-focusness".
>> The assumption of an absolute measure of sharpness for a single  
>> image most probably would not hold unless you know already what to  
>> expect in the image.
>> If you look/google/search autofocus, you will find that all  
>> focusing algorithms try to maximise some measure of sharpness  
>> across several shots of the *same scene*.
>> With a single arbitrary image (as I believe is your case), how do  
>> you make sure that the image is blurry because of bad focus rather  
>> than the scene having originally no sharp edges.
>> I.e. is this 1) a blurry shot of a sharp scene or 2) is it a sharp  
>> shot of a diffuse-looking scene?
>> If you look for high frequency contents in the image to make the  
>> decision, you would treat the 2 examples above as the same, while  
>> an autofocus algorithm would find the best solutions for both  
>> cases (by taking more shots at various focal lengths). You then  
>> could compare which one was more out of focus (how far away each  
>> image was from the "best focus" shot). But you cannot do this with  
>> a single shot of unknown properties when "in focus".
>> Cheers,
>> G.
>
>
>
> ___________________________________________________________  
> Telefonate ohne weitere Kosten vom PC zum PC: http://
> messenger.yahoo.de
Reply | Threaded
Open this post in threaded view
|

Re: Focus measurement (more general image analysis question)

Filip Rooms
Just a quick idea: what about a histogram of gradient intensities
(possibly at a few different scales)?

A blurred image won't have any sharp edges, thus producing a histogram
with only low gradient values. An image which doen contain sharp
features will have at least a few high intensity gradients, so this
histogram will look different.

Add some denoising routine maybe to eliminate high gradient
intensities due to noise...

Kind regards,

Filip
Reply | Threaded
Open this post in threaded view
|

Histogram analysis

Yan Gao
In reply to this post by Michael Schmid


Dear all,

I have a question for ImageJ list.  I am trying to compare two images using histogram function with selected area.
What I did is
1, Highlight tissue area. Clear outside area.
2, Color deconvolution as I only need measure brown color.
3, Adjust threshold because I only want to set 0 to 240 range in blue image.
4, Redirect threshold to brown image.
5, select brown image view histogram.  

I can not get 0 to 240 range histogram from brown image.  Anyone can direct me, I really appreciated.  Thanks.







Yan
_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the exclusive use of the individual or entity named above and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivery of the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the material from any computer.  Thank you.

12816_003T.jpg.zip (175K) Download Attachment
12