LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Object measurement from an Image

Solved!
Go to solution

I am a college student working on my senior design project.  I have some experience in LabVIEW, but the current project is a bit over my head.  We need to measure the width of a object in pixels and then output the value for further calculations.  I know of the EdgeDetection VI, but the output is not what I need.  What VIs can allow me to fine two edges of an object and what modules are they in?  I'm not looking for someone to solve the problem,  but I would be extremely grateful if a more experienced LabVIEW user could point me in the right direction.

0 Kudos
Message 1 of 5
(4,353 Views)

The question is -- do you want to have the code find the "image" for you (meaning it has to have sufficient "smarts" to know about edges and may need to do some transformation if the object-to-be-measured is at an angle), or can you "draw a shape" that overlays the object and ask its size (in pixels)?  I assume that if the object is tilted, you want "screen distance in pixels", i.e. if the object is a square of 100 x 100 pixels, and you rotate it 45°, you want the measurement of the width to be (still) 100 pixels.

 

Doing this by "Machine Vision" is something of a challenge.  The first step is usually to turn the image into a Binary Image, i.e. all pixels are either Black or White (there are various "thresholding" functions that help with this).  Now the task of finding "edges" is much simpler, but still some work.

 

If you can do this "manually", the Image Indicator (found on the Vision Palette) has a series of "tools" that you can use to draw a "Region of Interest", one of which is a (tilted) rectangle whose size you can adjust to whatever you want to measure.  You can then use VIs and Property Nodes to find out the dimensions (in pixels, if memory serves) of the ROI.

 

Bob Schor

0 Kudos
Message 2 of 5
(4,345 Views)

Bob,

 

Thank you for the reply to the post.

 

Yes it would be ideal for the LabVIEW program to automatically find the width of the image.  It can be assumed that the "rectangle" being measured is going to be perpendicular if this will simplify the process.  Our first plan is for the program to be automatic, but the secondary plan will be using tools to measure the object.

 

A bit of background on the project, it is meant to be a fairly cheap alternative to manual measurement for drilling ventral holes on to teeth that have been ground into the surface of a rotor shaft.  The position of the drill is stored on the machine but there have been issues will error.  Our tolerance for the holes is on the order of 8 thousandths.  Yes, I know how paradoxical it is for a solution to be cheap and precise, but it is the task that has been set for us.  A camera in a tool holder will capture an image and then use the image to double check the machine position before final drilling.

 

syoung73

0 Kudos
Message 3 of 5
(4,295 Views)
Solution
Accepted by topic author syoung73

The LabVIEW Vision Development Module (and Vision Acquisition Drivers) are reasonably capable of doing "Machine Vision", where they identify shapes, make measurements, etc.  There is even a (fairly recent) book on the subject, "Practical Guide to Machine Vision Software" (sub-titled "An Introduction with LabVIEW") that seems to be a reasonably thorough and readable guide to this interesting, but slightly-under-documented, topic.  I don't have much experience with the "Machine Vision" side of the LabVIEW Vision modules, but may be able to answer specific questions ...

 

Bob Schor

 

Message 4 of 5
(4,286 Views)

@Bob_Schor wrote:

The LabVIEW Vision Development Module (and Vision Acquisition Drivers) are reasonably capable of doing "Machine Vision", where they identify shapes, make measurements, etc.  There is even a (fairly recent) book on the subject, "Practical Guide to Machine Vision Software" (sub-titled "An Introduction with LabVIEW") that seems to be a reasonably thorough and readable guide to this interesting, but slightly-under-documented, topic.  I don't have much experience with the "Machine Vision" side of the LabVIEW Vision modules, but may be able to answer specific questions ...

 

Bob Schor

 


Bob:

Thanks for the book tip, I will be writing up a req today and that's no Bob_Schor 🙂

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 5
(4,275 Views)