Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

finding circle pattern

is there anyway to find a circle pattern  (i am only interested in the grid cordinates of the center of the circle) in the camera feild of view ....without it being in a set location or a set size on the screen?
0 Kudos
Message 1 of 11
(4,741 Views)
ok i sucessfully found out how to do this using threshold and circle dection.....but when i try to make a grid the onyl data i can play with is still grid /pixel cordinates.when i look at the block diagram.. i need real time measurement in inches away from the center of the image 320,240
0 Kudos
Message 2 of 11
(4,735 Views)

I'm far from sure I understood your problem. The IMAQ Find Circular Edge returns the X and Y coordinates of the located circle.

Calculating the distance (in pixels) from the center of the image (640x480) should not be a problem :

d = ((x-320)^2 + (y-240)^2)^0.5

then you have to multiply the result by the pixel length. Means that you have a way to calibrate your vision system...

 

Chilly Charly    (aka CC)
0 Kudos
Message 3 of 11
(4,715 Views)
ya thanks ....but i thought there might be a way to change the 0,0 of the image file to the center using the calibrate image tool...in this tool you can specify unit lengh in inches or mm or um or anything by clicking two points..therefor the output data would give me inches or any unit away from the origin for the x and y axis
0 Kudos
Message 4 of 11
(4,703 Views)
another problem i ran into was trying to print the data to a file ....when you measure using the circle tool it outputs a icon called circle data which is a 1d array cluster of 4 elements.. i can't find the proper way to export this (data pos x posy radius and core area) all four to a simple text file...after i figure this out i will need to import them into excel which i am trying to find out how to do via (write data to xl.vi) i basically don't know how to work with the arrays yet....any book i could buy to help me learn labview.. because i have absolutly no documentation. thanks alot
0 Kudos
Message 5 of 11
(4,706 Views)

Hi Lenox,

Thank you for using our discussion forums. To learn how to write array data to a text file I would recommend Write to Text File.vi shipping example included with LabVIEW. To find this example start LabVIEW and select Find Examples... from the Help menu. On the Browse tab select Fundamentals>>File Input and Output>>Write to Text File.vi.

If you are interested in learning more about LabVIEW I would recommend looking over the following link:

How Can I Learn LabVIEW?

I hope this helps. Please let me know if you have any further questions. Have a great day!

Regards,
Nipun M
Applications Engineer
National Instruments
www.ni.com/academic

0 Kudos
Message 6 of 11
(4,691 Views)

The circle data is an array of cluster of 4 elements.

Since you have apparently only one circle, you can extract a single cluster as first element of the array, using an index array function. Then you can convert the cluster to an array, and save this array in a shreadsheet type file. See the attachment.

 

Chilly Charly    (aka CC)
0 Kudos
Message 7 of 11
(4,683 Views)
thanks chilly...anyway you can convert that file to be compatible with lab view 7.0 its giving me an error saying it was done with 7.1
0 Kudos
Message 8 of 11
(4,664 Views)
alright thanks i followed ur instructions and they work @@!!! woudl you have any sujestions on how to export just the first 2 cells of the array to data i/o lines?
0 Kudos
Message 9 of 11
(4,659 Views)

Sorry for the delay !

Here is a 7.0 version with an "Array Subset" function added, to get the 2 first cells only.

 

Chilly Charly    (aka CC)
Message 10 of 11
(4,650 Views)