From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use 2D array of Pixel-Adresses for Overlay

Hey,

 

I have a Problem, that i am trying to solve using attached c++ code or labview.

 

using the method with Labview, i am comparing 2 Images and writting the Adresses of defected Pixels in a 2D-Array. Now i want to use those adresses to overlay a rectangle on of the Images a Show where the difference is.

for this, i am taking the first and the last Element in my Array, using Array Max & Min to get the Parameter of the Rectangle to overlay. But when there are more than one parts of the Image that should be overlay, the vi overlay a big Rectangle over those parts instead of overlaying the defects individually. I wanted to ask for a method how i can extract the adresses of the Pixels which are associated.

so in the case that the defected Pixels represent 2 differents Regions of my Images, which should be overlayed, what is the best way to get thier Adresses and create 2 Rectangles?

 

I hope someone can help me.

0 Kudos
Message 1 of 7
(2,489 Views)

Here is the code i am using

0 Kudos
Message 2 of 7
(2,481 Views)

LabVIEW has a whole series of VIs designed for what they call "Machine Vision", which includes detecting regions and allowing you to isolate them and use them.  If you want to do this task in LabVIEW, you would be well-advised to learn how NI's Machine Vision VIs work (I believe they begin by transforming the image into a Binary (2-value pixel, either Black or White) Image and then using optimized code to isolate and find "regions" in the image.  A lot of the work is choosing the right VIs and parameters to get the regions you want.

 

If, on the other hand, you are going to (on your own) get an array of 2D Pixel Addresses for your overlay (possibly using code other than LabVIEW?), you might be better off sticking to whatever system you used to get the overlay.  But if you really want to use LabVIEW, look into their Machine Vision routines (do a Web Search for LabVIEW Machine Vision, where you can find topics such as "Tutorial" and "Training").

 

Bob Schor

0 Kudos
Message 3 of 7
(2,477 Views)

Thanks for the reply, i will look for that. I don't know if i Need extra Software for machine Vision.

0 Kudos
Message 4 of 7
(2,470 Views)

Unfortunately, I'm sitting in an airport, and the Machine Vision book is sitting back in my office.  However, we are both using LabVIEW 2016.  Open a Block Diagram and look in the Vision and Motion VIs -- do you see a Folder called Machine Vision?

 

Bob Schor

0 Kudos
Message 5 of 7
(2,463 Views)

Hey Bob,

 

yes i have Machine Vision. I can see it in this Folder.

0 Kudos
Message 6 of 7
(2,430 Views)

So now you need to find the (well-hidden) LabVIEW Vision Documentation.  Assuming you have 32-bit LabVIEW installed on Windows 7:

  • Open Windows (File) Explorer.
  • Go to C:\Program Files (x86)\National Instruments
  • Find the folders "Vision" and "Vision Assistant".  Both have Help folders that can take you to Help Files and Tutorials.
  • Check out Vision\Help\NIVisionLVBasics.chm.  When you expand the Help, you see "Introduction to NI Vision", "Performing Particle Analysis", "Performing Machine Vision Tasks", "Calibrating Images", etc.
  • Check out \Vision Assistant\Documentation\VA_Tutorial.pdf.  This describes the Vision Assistant Tutorial, an Express VI (I tend to dislike Express VIs, but it does summarize some of the "possibilities ...") that may suggest approaches you could take (and would let you "experiment").

Bob Schor

0 Kudos
Message 7 of 7
(2,424 Views)