1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #23805 from starga2er777:5.x

GSoC: Modified PLY reader to support color attribute read/write #23805

* Modified PLY reader to support color attribute read/write
* Fix bugs & Modified OBJ reader for color IO
* Replace with correct test file
* Fix I/O of property [w] in OBJ files

### Pull Request Readiness Checklist

**Merged with https://github.com/opencv/opencv_extra/pull/1075**

[Issue for GSoC 2023](https://github.com/opencv/opencv/issues/23624)
The ply loader in 3D module doesn't support color attribute reading. I modified that to support color attribute reading & writing for the color attribute compression as described in proposal.

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Zhangjie Chen
2023-07-25 21:05:56 +08:00
committed by GitHub
parent 18f280b869
commit 4d695cd2f4
9 changed files with 139 additions and 48 deletions
+4 -2
View File
@@ -2636,8 +2636,9 @@ protected:
* @param filename Name of the file.
* @param vertices (vector of Point3f) Point coordinates of a point cloud
* @param normals (vector of Point3f) Point normals of a point cloud
* @param rgb (vector of Point3_<uchar>) Point RGB color of a point cloud
*/
CV_EXPORTS_W void loadPointCloud(const String &filename, OutputArray vertices, OutputArray normals = noArray());
CV_EXPORTS_W void loadPointCloud(const String &filename, OutputArray vertices, OutputArray normals = noArray(), OutputArray rgb = noArray());
/** @brief Saves a point cloud to a specified file.
*
@@ -2647,8 +2648,9 @@ CV_EXPORTS_W void loadPointCloud(const String &filename, OutputArray vertices, O
* @param filename Name of the file.
* @param vertices (vector of Point3f) Point coordinates of a point cloud
* @param normals (vector of Point3f) Point normals of a point cloud
* @param rgb (vector of Point3_<uchar>) Point RGB color of a point cloud
*/
CV_EXPORTS_W void savePointCloud(const String &filename, InputArray vertices, InputArray normals = noArray());
CV_EXPORTS_W void savePointCloud(const String &filename, InputArray vertices, InputArray normals = noArray(), InputArray rgb = noArray());
/** @brief Loads a mesh from a file.
*