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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting two xy sequences of data

Hi Alex,

 

Yes the angle map is the point-point-point vector angle when moving along the path of the contour points.

It is derived using IPAN99 methode.

 

I am not sure I understand this question.

"how are these "real world objects" transported in the active area of the camera?"

 

It is simply a grey scale image with background illumination.

The syringes are transported on a conveyor system and an image is grabbed on the fly.

 

 

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 11 of 16
(551 Views)

Hi Altenbach

 

That looks great. I will definitively use this approach for the correlation.

It is not given that the defect always is in the same location. It can appear anywhere on the contour.

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 12 of 16
(550 Views)

@altenbach wrote:


Of course you could map the data into 2D arrays and do a 2D cross correlation directly. 😉

 

 


I was about to do that Smiley Very Happy

thank you!

 

@Kahr wrote:

Hi Altenbach

 

That looks great. I will definitively use this approach for the correlation.

It is not given that the defect always is in the same location. It can appear anywhere on the contour.

 this appears to be the proper and necessary pre-processing step  before calculating

any similarity between template and sample.

 

"It is not given that the defect always is in the same location."

That's what I basically had in mind, but was limited by my german tongue

when I asked those cryptic question in Message 8

 

 

0 Kudos
Message 13 of 16
(533 Views)

Hi

 

I've had the time to analyze Your method Altenbach and I am actually back at my original problem - cross correlation is (of course) time consuming and slow.

The generation of the 2D arrays of 600x600 points brings me kind off back into the image domain Smiley Wink

 

On my i7 laptop it takes 350 ms. Using traditional edge based PM in VDM takes 50 ms.

 

So that was the reason for taking a 1D approach with less data points.

 

Kind regards

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 14 of 16
(522 Views)

@Kahr wrote:

 

On my i7 laptop it takes 350 ms. Using traditional edge based PM in VDM takes 50 ms. 

So that was the reason for taking a 1D approach with less data points.

 


That's less than an order of magnitude in speed and I intentionally used 2D array sizes that are way too large, with lots of zeroes on all sides.

 

What precision do you need? You could probably do a pre-alignment, selecting a suitable area around each curve and do the cross-correlation on much smaller 2D arrays. It might also be sufficient to map the data with less resolution when scaling the x and y into the array indices. I am pretty sure you could easily gain more than a factor of 10. 🙂 try it!

 

I have some other ideas, bit it's bed time 😉

0 Kudos
Message 15 of 16
(515 Views)

@altenbach wrote:

@alexderjuengere wrote:

Interesting idea to do a cross-correlation with the derived 1d arrays!  


Of course you could map the data into 2D arrays and do a 2D cross correlation directly. 😉

 

 


wait a second, I think I have re-invented the wheel ...

 

if this is the formula for cross-correlation,

 

 

 

 

the numerator is the product of centered x and centered y, and the denominator is the product of the distances,

but not with regard to 0;0

bur rather to the mean of the template 336;170

 

comparison.PNG

 

dammit.

at least I learned something new.

 

 

 

@ Kahr

good luck in making this quick enough

I think, this is possible, and LabView is capable of doing this

but you will have some work to do...

0 Kudos
Message 16 of 16
(499 Views)