Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple preprocessing steps

Solved!
Go to solution

Hi all,

 

I'm new to LabVIEW's Vision module and I'm trying to create an application that locates the iris of the eye from a given picture of an eye.

 

My algorithm would work in the following way:

1) Fill the holes in the image to get rid of specular lights by inverting the image, applying the Imaq FillHoles function and then inverting back the image.

2) Binarize the image by applying a precalculated threshold on it.

3) Do lots of other computations that should work just fine after I get my image preprocessed in the previous two steps.

 

My problem is that while trying different solutions to the preprocessing part I could not connect two steps, two vision library functions, two different image processing nodes in any way I tried. Most common problem is that after the first step being done properly the second provides a full black image as result. I think that the problem should be around the IMAQ ExtractSingleColorPlane node, that should cause some datatype misfits or something like that, but I cannot deduce how it should be changed or what other image conversion step should be used in order to achieve what I want.

 

I attach the VI as it is in its current state for reference. The upper part with row and column count does not matter, that works just fine. The lower part with the vision nodes causes me the real problem. If you just simply try to run you'll see that after the first step the result looks just fine, but then none of the resulting images after each step give meaningful results.

 

Can anybody help me with an explanation of where I'm getting it wrong and how exactly it should be done?

 

Much appreciated!

0 Kudos
Message 1 of 5
(3,945 Views)

when you use fill hole vi you make binary image so you do not  need step two. also when you want to see binary image right click on vision image  indicator  go palette and select binary   image to show
you will be see image in red and black  color it is binary image otherwies you will be see black image 

Message 2 of 5
(3,940 Views)

Okay, I see the binarized black and red image after calling the FillHole VI, but it does not make any sense, looks like just random black and red points. Why doesn't it give the image from the previous step with its holes filled?

0 Kudos
Message 3 of 5
(3,908 Views)
Solution
Accepted by kemenesendre

Do the steps in the reverse order.  First get a binary image, then fill holes if you need to.

 

If you use fill holes on a grayscale image, it will fill everything that is black.  The fill holes function is only for binary images.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 4 of 5
(3,897 Views)
before to use them you have to use threshold function and could remove the back ground
also using threshold make binary image and fill hole this time will be work in binary image witch is better to result
0 Kudos
Message 5 of 5
(3,884 Views)