Skip to content

Conversation

@MikeCernea
Copy link
Collaborator

Add a method to calculate texture patches and added a feature in Viewer to visualize the texture for a selected face.
In Viewer open a scene with cameras, then drag and drop the obj file for textured mesh.

  • hold Ctrl+Shift and click on a face to see the texture patch in a new window
  • hold Ctrl+Alt+Shift and click on a face to save the texture patch for that face in a jpg file

@cdcseacave cdcseacave changed the base branch from master to develop May 12, 2023 20:33
return volume;
}

String Mesh::PlotTexturePatch(const FIndex dbgFaceId, FaceIdxArr& face_patch_ids, cv::Mat& imgOut, const bool bSaveToFile) const {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably want const face_patch_ids

Window window;
ImageArr images; // scene photos
ImageArr textures; // mesh textures
MVS::Mesh::FaceIdxArr face_patch_ids;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why placing it here as you seem to be using it only in Scene::CastRay?

}
#endif

uint32_t Mesh::ComputeTexturePatchFaces(FaceIdxArr& face_patch_ids) const {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short description of what the fucntion does and what returns

return volume;
}

String Mesh::PlotTexturePatch(const FIndex dbgFaceId, FaceIdxArr& face_patch_ids, cv::Mat& imgOut, const bool bSaveToFile) const {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short description of what the fucntion does and what returns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants