-
-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute texture patch #988
base: develop
Are you sure you want to change the base?
Conversation
@@ -4086,6 +4134,46 @@ REAL Mesh::ComputeVolume() const | |||
volume += ComputeTriangleVolume(vertices[face[0]], vertices[face[1]], vertices[face[2]]); | |||
return volume; | |||
} | |||
|
|||
String Mesh::PlotTexturePatch(const FIndex dbgFaceId, FaceIdxArr& face_patch_ids, cv::Mat& imgOut, const bool bSaveToFile) const { |
There was a problem hiding this comment.
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
@@ -60,6 +60,7 @@ class Scene | |||
Window window; | |||
ImageArr images; // scene photos | |||
ImageArr textures; // mesh textures | |||
MVS::Mesh::FaceIdxArr face_patch_ids; |
There was a problem hiding this comment.
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?
@@ -398,6 +398,54 @@ void Mesh::ComputeNormalVertices() | |||
} | |||
#endif | |||
|
|||
uint32_t Mesh::ComputeTexturePatchFaces(FaceIdxArr& face_patch_ids) const { |
There was a problem hiding this comment.
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
@@ -4086,6 +4134,46 @@ REAL Mesh::ComputeVolume() const | |||
volume += ComputeTriangleVolume(vertices[face[0]], vertices[face[1]], vertices[face[2]]); | |||
return volume; | |||
} | |||
|
|||
String Mesh::PlotTexturePatch(const FIndex dbgFaceId, FaceIdxArr& face_patch_ids, cv::Mat& imgOut, const bool bSaveToFile) const { |
There was a problem hiding this comment.
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
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.