Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

many different Depth of Focus images combine

Dear all,

            anybody knows ? I remember i saw an example long ago, that is NI internal example, the example is like that, one image contains 2 pop-can, left one is clear and the right one is blurry( because the target is not in the focus), and the other image also contains 2 pop-can, but the left one is blurry, and the right one is clear, after vision processed, it output one image, left and right pop-can are clear also. but i can't find this example now, even i search all of Vision Examples,  can anybody help ? attache it here ? thanks. or please help to give a thread .thank you.

0 Kudos
Message 1 of 2
(3,443 Views)

You need to sample each image for the areas of highest contrast.  These will tend to be the edges of objects that are in focus.  Begin with the farthest objects first.  Find the edges, fill holes in a blob created by thersholding, use this blob image as a mask to extract those pixels into a new image.  Repeat until you have gone to the closest objects.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 2
(3,291 Views)