Re: How to find closest point(s) around a specific point in point cloud?
- From: Ed Prochak <edprochak@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 13:57:52 -0700 (PDT)
On Mar 31, 11:03 am, Willem <wil...@xxxxxxxx> wrote:
Ed wrote:
) Wait. Why suggest a linear search of the entire array?
)
) what's wrong with this pseudocode algorithm?
) Given point (P,Q,R)
)
) number of points found = 0
) current distance = 0
) while number of points found < 10
) {
) searcharray=find all points in shell between current distance and
) current distance + 1
Find all points in shell ?
You make it sound as if it's easy, but I don't think it is.
In fact, I think this alone requires a linear search of the array.
Why hard? We are working in integer dimensions.
Given point 5,4,3 the unit shell (points exactly 1 unit away)
includes the points
5,4,4
5,4,2
6,4,3
4,4,3
5,5,3
5,3,3
points in the volume between one and two units away include (NOT in
order of distance!)
4,3,2
5,3,2
6,3,2
4,3,3
6,3,3
4,3,4
5,3,4
6,3,4
4,4,2
6,4,2
4,4,4
6,4,4
4,5,2
5,5,2
and so on.
I did not code it out. maybe I will try that tonight.
maybe it would be easier to consider loops on integer coordinates.
then the first iteration would include these points.
The key of what I am suggesting is not to start the search at 0,0,0.
Maybe I assumed wrong that your suggestion of linear search starts
there and not at the point of interest.
4,3,4
) <snip>
)
) That should find things faster. Defining the "find all points in
) shell" function can be tricky since the array in rectilinear but the
) shell is circular.
Even if the shell were rectilinear it would be more than just 'tricky'.
How are you going to find all points that fall inside a given box without
looking at most (if not all) of the points ?
the coordinates are integers. it is an array space, not a real
coordinate space. That simplifies the search.
So maybe you can call it a linear search from the point of interest.
Ed
.
- References:
- How to find closest point(s) around a specific point in point cloud?
- From: robert
- Re: How to find closest point(s) around a specific point in point cloud?
- From: alex
- Re: How to find closest point(s) around a specific point in point cloud?
- From: Ed Prochak
- Re: How to find closest point(s) around a specific point in point cloud?
- From: Willem
- How to find closest point(s) around a specific point in point cloud?
- Prev by Date: Re: How to find closest point(s) around a specific point in point cloud?
- Next by Date: Re: How to find closest point(s) around a specific point in point cloud?
- Previous by thread: Re: How to find closest point(s) around a specific point in point cloud?
- Next by thread: Re: How to find closest point(s) around a specific point in point cloud?
- Index(es):
Relevant Pages
|