Get the Calibrated Results from IMAQ Detect Shapes.vi

Updated Nov 7, 2018

Reported In

Software

  • Vision Assistant
  • Vision Development Module
  • LabVIEW

Issue Details

I am passing a calibrated image into the IMAQ Detect Shapes function. However, the results are returned in units of pixels rather than in calibrated real-world units. How can I get my results in real units?

Solution

IMAQ Detect Shapes will only return results in pixels. The easiest way to return the results in real-world units is to use the Vision Assistant block:
  1. Place a new Vision Assistant block on the block diagram.
  2. In the Vision Assistant configuration window, click on the Machine Vision tab.
  3. Add a Shape Detection step and configure the step with the necessary parameters to detect the shapes you want.
  4. Click OK to save the step settings.
  5. Click Select Controls and make sure that the calibrated results is checked in the Indicators box.
  6. Click Finish to close Vision Assistant. You can now pass images into the Vision Assistant block and it will return the results in calibrated units.
If you do need to use the lower-level Vision functions instead of Vision Assistant, you can see how Vision Assistant is converting the results to real-world units by converting the Vision Assistant block to LabVIEW code. To do so:
  1. After configuring Vision Assistant as described above, right-click on the Vision Assistant block on your block diagram and select Open Front Panel. This will convert the Vision Assistant into a subVI.
  2. Open the subVI and view the block diagram. After the IMAQ Detect Shapes function, you should see a subVI that converts the results to calibrated units as indicated here:
  1. You can look at the block diagram of this subVI to see how the pixel results are converted to calibrated results.

WAS THIS ARTICLE HELPFUL?

Not Helpful