Identifying Boundary Nodes in a Point Cloud

57 views (last 30 days)
Finlay Price
Finlay Price ungefär 21 timmar ago
Answered: Image Analyst ungefär 8 timmar ago
I have 2 point clouds which represent the nodes of 2 3D separate lattices. There is a small gap between the lattices where they don't join together correctly. The boundary face closest to the other body is jagged. I want to identify these bounadry nodes so I can connect them and join my lattices (but the joining part is something I can do in external softwares). Does anyone have any suggestions on how I could go about identifying these boudary nodes? I have tried using the "boundary" function but I am trying with a criteria for identifying the nodes. Any help would be greatly appreciated. I have attached a picture of the nodes for reference.
  1 Comment
Steven Lord
Steven Lord ungefär 19 timmar ago
So to confirm I understand what your goal is, in the second of the pictures above (the first one in 2-dimensional view) you'd want to identify specifically that the point at around Z = 36 and Y = 21 is missing as are Z = 33 and Y = 18 or 19, Z = 30 and Y = 15, and Z = 27 and Y = 11 or 12? And then your next step would be to somehow include them in either the red or blue points using some criteria to decide which color they should be?
Would you also want to detect that (for example) Z = 39 and Y = 11 or 12 is also missing even though it's not next to or on the boundary between the red and blue points?
Or do you just want to turn this grid with holes into a grid without holes to represent the union of the red and blue regions? Since you mentioned you're planning to "join my lattices" this would probably be easiest, identifying the unique Z and Y coordinates (perhaps with a tolerance by using uniquetol) and then doing some sort of gridding and/or interpolation.

Sign in to comment.

Answers (3)

Matt J
Matt J ungefär 19 timmar ago
If the regions are supposed to be convex, you can use convhull or convhulln.
  4 Comments
Finlay Price
Finlay Price ungefär 14 timmar ago
Yes that’s correct, however I only want the closest (e.g) red points to the blue points, not all the other red internals. See the image I’ve attached below. This is where I am having problems as I am struggling to find a way to define or create a criteria to identify only the nodes on that jagged face that as closest to the blue nodes. I have .step files which wholly contains each set of points. So one file for the red points and one file for the blue points if you think that would help.
Matt J
Matt J ungefär 9 timmar ago
Edited: Matt J ungefär 8 timmar ago
See the image I’ve attached below.
There are no images below.
however I only want the closest (e.g) red points to the blue points, not all the other red internals.
But convhull doesn't give you the internal points. It gives you only the points on the boundary of the cloud's convex envelope. Some of those boundary faces you are not interested, the ones on the planes x=0, y=0, etc... But you said you agree that the vertices on those other faces can easily be located and eliminated from the list of points convhull() gives you. If so, I don't see the problem. If you eliminate the vertices you are not looking for, what's left has to be the vertices that you are looking for.

Sign in to comment.


Walter Roberson
Walter Roberson ungefär 14 timmar ago
Your red nodes are sometimes immediately adjacent to your blue nodes. There is no way you will be automatically able to differentiate the nodes -- not unless there is some attached property that can tell them apart (such as color or reflectivity or infrared emission.)
  1 Comment
Finlay Price
Finlay Price ungefär 13 timmar ago
I can differentiate between both the red and blue points okay. They are derived from two separate .csv’s which contain their xyz coordinates. It’s more identify the closest ones to each other on those jagged faces :/

Sign in to comment.


Image Analyst
Image Analyst ungefär 8 timmar ago
Maybe use either pdist2 or knnsearch to identify blue points that are closest to red points. In other words, pairs that have minimum distance between them.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!