LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern matching functions for XY data points?

Hello forums,

 

I am aware of the IMAQ pattern matching VIs which are very handy for matching patterns in image data. I'm looking for the same functionality but for sets of XY data points (should be much easier right?). Are there any such functions available in LabVIEW?

My end goal is to find a shape (defined by a set of XY points) in a 2D point-cloud data set.

 

Thanks,

 

~AVD

0 Kudos
Message 1 of 6
(2,917 Views)

It would be useful to see an example shape and cloud.

 

What operations are allowed (translation, scaling, rotation, mirror, etc.)?

 

0 Kudos
Message 2 of 6
(2,882 Views)

Hi altenback,

 

Thanks for the response, please find example data sets and my initial attempt at matching attached here. My code uses the geometric centroid of the ideal shape and the raw data to try match them together.

My steps in the code so far are:

  1. Import raw data and 'nominal' shape to fit to the data
  2. Remove data points below a certain threshold in raw data (noisy data)
  3. Remove the 'same' data points below the threshold in the shape
  4. Calculate the geometric centroids of both of these point clouds and match them up

The problem with this is we don't actually know the value for 'Y threshold nominal', this is the position of the LiDAR in the pipe which changes as the system moves throughout the pipe. To find this position we somehow need to find a best fit for the pipe shape to the raw data. In addition the raw LiDAR data can be pretty noisy and which can be thrown off at certain points by objects in the pipe.

Please refer to my other DF post for additional information on the first part of the problem - link here.

 


@altenbach wrote:

What operations are allowed (translation, scaling, rotation, mirror, etc.)?

 

All operations apart from scaling of the nominal pipe shape are allowed. We have been told that the pipe height is 1500mm so this should remain as a constant.

 

Thanks,

 

~AVD

Download All
0 Kudos
Message 3 of 6
(2,821 Views)

So you want to match the blue shape to the green data. Right?

There are considerable distortions in the green data. Would the expected result her be the pipe shape rotated clockwise by about 30 degrees to match the tips? (What about the "corner" to the right? Seems there is another local mminimum)

Do you have a mathematical description for the egg shape?

 

In the meantime, I'll have a look at your other thread.

0 Kudos
Message 4 of 6
(2,810 Views)

Yes that's basically it, match the blue shape to the green data.

There are (and will be) considerable distortions in this data, and actually the data set attached here is a good dataset! I'm trying to build a robust algorithm that will work for as many cases as possible and for data that may be quite bad...

At the moment we're really just using the top arc of the pipe for fitting as this seems to be the most reliable, but we'd like to use as much of the pipe as possible for fitting.

The LiDAR device itself collects data in the range of 0-270 deg in 811 steps which results in angular steps of 0.333 deg.

I don't have a mathematical description of the pipe as yet, I generated the point cloud for the pipe using Fusion 360 - see image below. It consists of four circles in tangent to each other. I'm not sure if a formula for this shape could be described mathematically?

F360_egg43.jpg

 

Many thanks,

 

~AVD

0 Kudos
Message 5 of 6
(2,795 Views)

That is reminiscent of a project I did and called "Measuring the diameter of a Pretzel" (see here).

 

The math was the same as the path that would be drawn out of a circle where the center is moving along a straight line.

 

So it is the equation of a circle with the center moving a long a straight line.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,760 Views)