03-07-2016 01:04 PM
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!
Solved! Go to Solution.
03-07-2016 01:43 PM - edited 03-07-2016 01:46 PM
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
03-09-2016 08:32 AM
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?
03-09-2016 10:15 AM
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
03-09-2016 09:55 PM