Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you measure the change in area of an irregular shape?

Hello everyone,

 

This irregular shape is previously unspecified (other than the fact that it is white on a black background). Changes in the area would cause a motor to either speed up (increase) or slow down (decrease).

 

I'm completely new to Labview and I'm still trying to figure out the jists of it. I have been playing around with the vision assistant. Any help would be appreaciated.

 

Thanks.

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

Just create a binary image using automatic thresholding (or fixed threshold if it is a constant), then use particle measurement to measure the area of the particle.  If it returns multiple particles, you probably want the largest one.  You might have to clean up the binary image by removing edge particles, etc. before using particle measurement.

 

You should be able to measure the area several times a second easily, possibly at the frame rate of the camera.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 5
(4,177 Views)

Initially (when I'm creating the code), would I take a picture of the setup? If so, how could I integrate the camera into the code?

 

 

0 Kudos
Message 3 of 5
(4,175 Views)

Yes, you would need to start by taking a picture.  There should be a bunch of examples for acquiring and analyzing images.  A simple Grab will work well.

 

Your program will probably be a while loop with a stop button.  Inside the loop, you will acquire a new image, process it, and do something with the results.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 5
(4,171 Views)
0 Kudos
Message 5 of 5
(4,059 Views)