Agisoft Metashape
Agisoft Metashape => Feature Requests => Topic started by: eltama on December 23, 2020, 01:55:11 PM
-
Hi all
It will be great to select every point cloud by specific color or selection with that color, like select - silmilar in Photoshop.
Have a nice day.
Elmar
-
Hello Elmar,
If you are speaking about dense point cloud, then you can use Tools Menu -> Dense Cloud -> Select Points by Color option in the Model view mode.
-
Hello Alexey
I mean sparse point, but thanks for the tip, I always create mesh from depth map, is much better for my works.
Marry Xmas
-
Hello Elmar,
The following script example shows how to select the tie points according to the RGB color values and tolerance:
import Metashape, sys
doc = Metashape.app.document
chunk = doc.chunk #active chunk
point_cloud = chunk.point_cloud
points = point_cloud.points
tracks = point_cloud.tracks
r = 217 #int(sys.argv[1])
g = 175 #int(sys.argv[2])
b = 164 #int(sys.argv[3])
tolerance = 10 #int(sys.argv[4])
for point in points:
color = tracks[point.track_id].color
if ((abs(color[0] - r) < tolerance) or (abs(color[1] - g) < tolerance) or (abs(color[2] - b) < tolerance)):
point.selected = True
Metashape.app.update()
print("Selected.\n")
-
Thak you Alexey ;)
very usefull script.