Open Silverster98 opened 2 years ago
I did not use Trimesh before, so I am not aware of this problem. Can you try other libs, and elaborate your problems? What is wrong with ‘Werkraum_withlabels.py`? The label is wrong, or it is not annotated?
On 17 Feb 2022, at 09:53, Zan Wang @.***> wrote:
Loading the 'Werkraum_withlabels.ply' with trimesh, I get a Trimesh object whose visual property is a TextureVisuals objects, while other scenes have a ColorVisuals. And I can't get the visual_colors without ColorVisuals. Besides, I tried to use to_color https://trimsh.org/trimesh.visual.texture.html#trimesh.visual.texture.TextureVisuals.to_color method to covert the TextureVisuals to ColorVisuals, but the converted RGB value of vertices are not correct. Can you provide a correct 'Werkraum_withlabels.ply' file?
— Reply to this email directly, view it on GitHub https://github.com/yz-cnsdqz/PSI-release/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5BAGAJIKC7L5WOBOQRRJLU3SZQPANCNFSM5OUAHASA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.
I did not use Trimesh before, so I am not aware of this problem. Can you try other libs, and elaborate your problems? What is wrong with ‘Werkraum_withlabels.py`? The label is wrong, or it is not annotated? … On 17 Feb 2022, at 09:53, Zan Wang @.***> wrote: Loading the 'Werkraum_withlabels.ply' with trimesh, I get a Trimesh object whose visual property is a TextureVisuals objects, while other scenes have a ColorVisuals. And I can't get the visual_colors without ColorVisuals. Besides, I tried to use to_color https://trimsh.org/trimesh.visual.texture.html#trimesh.visual.texture.TextureVisuals.to_color method to covert the TextureVisuals to ColorVisuals, but the converted RGB value of vertices are not correct. Can you provide a correct 'Werkraum_withlabels.ply' file? — Reply to this email directly, view it on GitHub <#31>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5BAGAJIKC7L5WOBOQRRJLU3SZQPANCNFSM5OUAHASA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.
When I load other scenes, e.g. MPH16
, I can get a correct vertex color (label).
scene = trimesh.load('/Data/PROXE_ExpansionPack/scenes_semantics/MPH16_withlabels.ply', process=False)
print(scene.visual.vertex_colors[1000:1010:, :]) # scene.visual is a ColorVisuals object
"""
the output is:
[[ 5 5 5 255]
[ 5 5 5 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]
[ 35 35 35 255]]
"""
but when I load Werkraum
, the program raise an Exception
Traceback (most recent call last):
File "visualize.py", line 352, in <module>
print(scene.visual.vertex_colors[1000:1010:, :])
AttributeError: 'TextureVisuals' object has no attribute 'vertex_colors'
And I tried to use to_color() which can convert textured visuals to a ColorVisuals
with vertex color calculated from texture. But the RGB value are not correct.
scene = trimesh.load('/Data/PROXE_ExpansionPack/scenes_semantics/Werkraum_withlabels.ply', process=False)
scene.visual = scene.visual.to_color() # scene.visual is a TextureVisuals object
print(scene.visual.vertex_colors[1000:1010:, :])
print(scene.visual.vertex_colors.min())
"""
the output is:
[[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]
[255 255 255 255]]
255
"""
I will try open3d
later..
Loading the 'Werkraum_withlabels.ply' with
trimesh
, I get aTrimesh
object whosevisual
property is aTextureVisuals
objects, while other scenes have aColorVisuals
. And I can't get thevisual_colors
withoutColorVisuals
. Besides, I tried to use to_color method to covert theTextureVisuals
toColorVisuals
, but the converted RGB value of vertices are not correct. Can you provide a correct 'Werkraum_withlabels.ply' file?