1

i have point clusters in my point cloud and want to fit a line though these clusters along the highest density, to predict the x,y coordinate at a certain height. These clusters can mostly be described as "pole like objects" with noise and a slight slope.

On my search i mainly stumbled across multiple linear regression, but i got the feeling that they wont help solving this. Any ideas are much appreciated!

Example data:

x y z
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.3 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.3
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.8 5530846.3 256.2
360155.8 5530846.3 256.2
360155.9 5530846.4 256.2
360155.8 5530846.3 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.8 5530846.3 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.3
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2
360155.9 5530846.4 256.2

Solution: I am an idiot. Apparently i've made a mistake which led me to think the simplest solution would not work. But it does.

I simply use the linear regression from sklearn and use x,y coordiantes together as y and the height as x value in the regression. Works quite well in my case.

3
  • Hi. Could you please add an example point cloud in your question? Maybe with 30 points max. Commented Mar 12, 2024 at 14:48
  • @Stef Hey, thanks for the reponse! I added a table and try formating it the way stackoverflow suggests it. If you just want the csv-format, that would be no problem of course. Commented Mar 14, 2024 at 12:39
  • 1
    @Stef Sorry for comment-bombing you but i found a solution. I think i messed something up, which led me to the conclusion that the simplest way does not work. Well, it does. Commented Mar 14, 2024 at 13:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.