From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Blob, change (0,0) location and find out pixel real distance.

Solved!
Go to solution

Hello, I am new to LabView and I was using Blob to get the location info.  But, I need the location using center as (0,0).

But, Blob is using top left corner as (0,0).  

Is there a way to change the Blob to give X,Y location info using center as (0,0) instead of top left corner as (0,0)

Or any other way to convert all Blob location info?

 

Also, is there a tools that can convert pixel to real world distance like mm?

I need to provide info, the detect items is at ??mm from center location (0,0).

 

Thank you for your help.

0 Kudos
Message 1 of 8
(1,347 Views)
Solution
Accepted by topic author DavidW2022

There is no "IMAQ Blob" function. If under the "IMAQ Blob" you mean "IMAQ Particle Report" to analyze Blobs, then you will need two functions -  IMAQ Set Simple Calibration and IMAQ Set Calibration Axis Info, something like this:

imaq calibration.png

Then you will get your real world coordinations and shifted according to your needs.

0 Kudos
Message 2 of 8
(1,321 Views)

Hi Andrey:

  Sorry, my bad.

  I was using the IMAQ Count Objects 2.vi

  Which will find the items and draw a rectangle ROI.

  We call Blob function here.

 

 So, do I apply the two vi you mentions after my IMAQ Count Objects Vi. to get info I want?

 

  Thank you for you help.

0 Kudos
Message 3 of 8
(1,317 Views)

No, I think these two functions are not applicable to IMAQ Count Objects. This function is equipped with own Coordinate System input. I think most easiest way will be to use IMAQ Particle Analysis/IMAQ Particle Analysis Report instead of IMAQ Count Objects (you will get exactly the same result, but in real world coordinates ans shifted ot the center). If you prefer to use IMAQ Count Objects, then you will need to perform coordinate conversion after this function using simple math.

0 Kudos
Message 4 of 8
(1,307 Views)

Hello Andrey:

  Ok, got it.

  I was hoping there is any east way. 

  Ok, I will rewrite my program not to use IMAQ Count object and try the 2 vi you mention.

.  

  P.S. Thank you for your info.  I didn't know I can use IMAQ particle Analysis and IMAQ Particle Analysis report to do the same job as IMAQ Count Object.

0 Kudos
Message 5 of 8
(1,300 Views)
Solution
Accepted by topic author DavidW2022

You're welcome. The advantage of the IMAQ PArticle Analysis is that the coordinates and measurements returned in real world coordinates. The only small thing which was slightly incorrect above is about Set Calibration Axis - you will need three points calibration to get (0,0) Origin shifted to the middle of the image.

Something like that:

Screenshot 2022-09-22 09.01.58.png

Result:

Screenshot 2022-09-22 09.01.44.png

VI is in attached.

Andrey.

 

0 Kudos
Message 6 of 8
(1,270 Views)

Hello Andrey:

  Do you mind convert your version to 21.0.1.

  Your version is 22.3.  I can't open it.

0 Kudos
Message 7 of 8
(1,258 Views)
Solution
Accepted by topic author DavidW2022

No problem, saved in 21.0.1f2 version:

 

0 Kudos
Message 8 of 8
(1,252 Views)