02-25-2013 05:25 AM
Hi !
First all, thanks for reading me.
I've got a problem with LabView Vision.
I needed to find the center of a circle area, so I started using the oval function to draw and wanted to extract the center of it, but I was not able to get the coordinates of the ROI, because I didn't find something like "ROI To Oval" but I was able to save the "Oval" drawed in a txt and file and get it restored after I wanted to do it again.
Then, I changed it to an Annulus, and was able to extract the center of it, but I was not anymore able to restore it from the txt in which coordinates are saved.
Later on, I changed it to a Rectangle, I was also able to extract the center, but the saved ROI from the txt file is working but drawing me an OVAL and not a RECTANGLE. The coordinates are corrects, but I really wonder what I missed.
I tried a lot of solutions, but none worked atm, that's why I'm posting here.
A part of my code is attached.
Can anyone help me?
Thank you very much,
Sébastien
02-26-2013 05:26 AM
You can delete this, I solved my problem.
Ty !
02-27-2013 04:43 AM
Or not !
I find an other solution to "solve" my problem, but I'm still interested to know HOW to restore a rectangle and not an Oval from the 4 coordonates I have.
I've setted those 4 coordonates to my "ROI Descriptor IN", Rectangle is set as you can see on the capture but it restores me an Oval which has the good coordonates of the rectangle.
It's probably a stupid change, but I don't get it, and it's annoying me.
Thank you,
Sébastien.
02-27-2013 10:28 PM
Hi Zapii
Attach your program.
03-07-2013 11:24 AM
Hi,
Sorry for my late reply.
I can't join the whole VI for professionals reasons, but I created two which contain my problem.
You need the 2 following VI, and start SaveROItoTXTasRectangle.vi
1) Select a video in the path system (.avi would be better I think)
2) Draw a rectangle
3) Save it as default area when it's asked.
4) Lauch again the program
5) The default area will have the same coordinates but it will suggest an Oval and not a rectangle as I wished
I don't know what I have to change, even if I have an idea that problem is that I don't define the type to "Rectangle - Rotated", but no idea how to set it differently.
Thank you,
Regards,
Sébastien.
03-08-2013 07:41 AM
Hi,
I finally solved the problem by saving it to an XML and not to a TXT.
It may help someone, so here is my VI.
Cheers,
Zepiii
PS : You can close the subjet.