09-04-2019 07:43 PM
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
09-04-2019 10:04 PM
It would be useful to see an example shape and cloud.
What operations are allowed (translation, scaling, rotation, mirror, etc.)?
09-05-2019 12:27 PM
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:
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
09-05-2019 01:05 PM
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.
09-05-2019 02:08 PM
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?
Many thanks,
~AVD
09-05-2019 02:56 PM
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