Verwandeln Sie eine Konvexhull, die durch eine Liste von 3D-Punktkoordinaten in eine 0-1-Binärmaske definiert ist

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Verwandeln Sie eine Konvexhull, die durch eine Liste von 3D-Punktkoordinaten in eine 0-1-Binärmaske definiert ist

by Anonymous » 09 Sep 2025, 15:37

Ich habe eine Konvexhull, die durch eine Liste der 3D -Punktkoordinate angegeben wird, die von scipy.spatial.convexhull erzeugt wird. Nun ist die Frage, dass ich diese konvexhull, die durch die Liste der Scheitelpunkte definiert ist, in eine 0-1-Binärmaske (ein 0: 1-NP-Array), Punkte innerhalb der konvexen Rumpfregion 1 und Punkte außerhalb der Rumpfregion beträgt 0. Was sollte ich tun?

Code: Select all

from scipy.spatial import ConvexHull
...
hull = ConvexHull(pts)  # pts is a xyz-coordinate list of all points in a point clout
hull_vertices = pts[hull.vertices]  # coordinates of the key points in the convexhull
Was ich möchte: Erstellen Sie eine 0-1-Binärmaske aus den vorherigen konvexhull-Informationen

Top