I have a line scanner output that is scanning the geometry of a surface. Typically the output looks something like this:

enter image description here

Where the x and y axis refers to the coordinate system in mm. (ignore the red dots). This data is essentially a 2d point cloud.

So what i am trying to achieve is to detect the corner points of this scan. I try to start using image processing techniques, for example using a harris corner detector.

However, the issue with this is that this data has a resolution of up to 0.01um vs a possible area size of 140mm X 100mm of all possible data points. If i were to convert this to 2d image, it would be a very large file, with most of the pixels being empty.

My question is that is there a better way to go about processing this type of data; or is there an alternative way to apply techniques such as the harris corner without resorting to conversion into an image.

  • $\begingroup$ Just to be clear - the data is the form of [x,y] coordinates, but neither the x or y coordinates are evenly spaced? $\endgroup$ – geometrikal Sep 2 '15 at 4:45
  • $\begingroup$ @geometrikal The coordinates are evenly spaced; only the drawing of the axis for display is not. $\endgroup$ – John Tan Sep 2 '15 at 5:12
  • $\begingroup$ Can you just treat it as a 1-D signal then, and look for jumps in $y$? $\endgroup$ – geometrikal Sep 2 '15 at 5:32
  • $\begingroup$ Where are those "corner points" that you want to find ? Please be explicit. $\endgroup$ – Yves Daoust Sep 3 '15 at 12:35
  • $\begingroup$ @geometrikal Yes I have tried that (looking for the 2nd derivatives), but the jumps are very noisy, and give a lot of false readings. In fact, the red dots on the image indicate mark out the boundaries where the 2nd derivatives are above a certain threshold. $\endgroup$ – John Tan Sep 4 '15 at 1:51

A first suggestion (without being sure to understand the question).

After sorting on X, try a line fit in a short sliding window (say 4 units long) and observe the correlation coefficient.

In smooth areas, the fit will be excellent. It will degrade at corners. Looking at the plot of the correlation, you should be able to set a suitable detection threshold.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.