Transform scale rotate .obj to known values

조회 수: 5 (최근 30일)
tim pearce
tim pearce 2023년 12월 14일
답변: tim pearce 2023년 12월 18일
Hi all, I have some .obj files created through photogrammetry I’m looking to transform and rotate and scale to match known dimensions but I’m not really sure where to start. I’ve got about 3000 to process and each is slightly differently aligned so I can’t take that point 1,1,1 is the same in all. Oh and I’m limited to 2018b only due to company policy. Tim

채택된 답변

Gowtham
Gowtham 2023년 12월 18일
Hello Tim,
I understand that you are trying to perform transformations such as rotation and scaling on the available OBJ files to align them properly.
This can be achieved by first converting the OBJ files to PLY format, then utilizing the Point Cloud Processing tools available in the Computer Vision Toolbox.
For a sample demonstration of the above process, kindly refer to the following steps:
  1. Use the Wavefront OBJ toolbox from the file exchange to read the OBJ files and gather necessary data such as vertices.
  2. Transform this data into PLY format using the 'plywrite' function, also available on the file exchange.
  3. Select a reference PLY file as your starting point.
  4. For each OBJ file that has been converted to a PLY file, load it using the 'pcread' function from Point Cloud Processing.
  5. Apply the 'pcregistericp' function to align two point clouds by employing a rigid transformation, which includes translation, rotation, and uniform scaling, based on their corresponding points.
  6. Save the transformed data back into PLY files using the 'pcwrite' function.
  7. Finally, these files can be accessed again using 'pcread' and visually inspected using 'pcshow'.
Kindly refer to the following MATLAB Documentations for further information on how to use the mentioned functions:
Hope this helps!
Best Regards,
Gowtham

추가 답변 (1개)

tim pearce
tim pearce 2023년 12월 18일
Hi thats fabulus thankyou for the help
Kind Regards
Tim

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by