11-07-2013 11:55 PM
Hi.
Iam new to labview and am processing eye-images to locate pupil center. I reached upto a point of isolating the pupil from the rest of the image(binary) but now i like to fit an ellipse to it to get an accurate pupil center. I looked into the ellipse fit vi but i have no idea how to extract radial points from the image to fit an ellipse to it. Could someone please help me with this.
Solved! Go to Solution.
11-08-2013 03:08 PM - edited 11-08-2013 03:09 PM
Hello,
if your image is thresholded, you can have a go with a basic PCA. I have attached a sample code, but there is some error I can't quite figure out at the moment regarding the both axes lengths (eigenvalues). But the orientation is correct.
If you (or anybody else) happen to have the answer, I will be glad to hear it. I will also take a deeper look into this.
Best regards,
K
11-09-2013 03:24 AM
Could u please downconvert the vi to 8.6 cause i can't open it in labview .........it's sounding an error
Thanks
11-09-2013 08:54 AM
Hello,
here you go.
Best regards,
K
11-11-2013 03:32 AM
hi, i seem to be encountering a problem in the vi because it can't find the path to ramp pattern by samples vi.....is this a user defined subvi????....or is this an upgraded version of ramp pattern vi of 8.6.........?????
11-11-2013 09:48 AM - edited 11-11-2013 09:53 AM
Hello,
try replacing the vi with yours. This is not a user vi, but has been replaced with polymorphic instance in Labview 2010.
Anyway, I have updated the algorithm, which now uses pca to find the orientation and the particle analysis to find the ellipse axes.
The time it takes to process this is ~25 msec, which equals around 40 fps (this was tested on only one iteration).
Best regards,
K
11-11-2013 11:30 PM - edited 11-11-2013 11:31 PM
hello......i tried what u suggested and pointed the path to ramp pattern vi when asked however i still felt that the vi is somehow incomplete.........i have uploaded the picture that i get when i open the ellipse_PCA vi......please do check if it is the same..... or is incomplete in some way
11-12-2013 01:13 AM
Hello,
does it work for you?
this ramp only generates 1000 samples of data between 0 an 2pi. If you are having problems, you can manually generate the data (check the documentation).
Best regards,
K
11-13-2013 02:42 AM
hello.......i could not use the ellipse_PCA vi directly as it points to an error with the thresholding but i changed the acquisition part and it seems to be working .......i do however have a doubt on why the adder outputs are left open in the picture that i attached....is it because it cannot find that particular vi.......if it is incomplete could u please attach the complete structure so i can connect manually.................thank u
11-13-2013 03:55 AM - edited 11-13-2013 04:20 AM
Hello,
don't worry about that. This is just some code that was used for some testing. Use this (attachment):
Best regards,
K