-
Notifications
You must be signed in to change notification settings - Fork 5.9k
new Volume pipeline #3162
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
new Volume pipeline #3162
Conversation
| //! @addtogroup kinect_fusion | ||
| //! @{ | ||
|
|
||
| struct CV_EXPORTS_W VolumeParams |
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 this class is in this file? It's not used in kinfu.cpp or anywhere else.
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.
| Number of voxels in each dimension for volumeUnit | ||
| Applicable only for hashTSDF. | ||
| */ | ||
| CV_PROP_RW int unitResolution = { 0 }; |
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.
just = 0;
other parameters should be initialized too (by default ctor, see below existing code).
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.
done
| /** @brief Default set of parameters that provide higher quality reconstruction | ||
| at the cost of slow performance. | ||
| */ | ||
| CV_WRAP static Ptr<VolumeParams> defaultParams(int _volumeType); |
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.
again, underscore prefix in public header.
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.
done
| /** @brief Default set of parameters that provide higher quality reconstruction | ||
| at the cost of slow performance. | ||
| */ | ||
| CV_WRAP static Ptr<VolumeParams> defaultParams(int _volumeType); |
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.
int
enum
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.
done
| /** @brief Kind of Volume | ||
| Values can be TSDF (single volume) or HASHTSDF (hashtable of volume units) | ||
| */ | ||
| CV_PROP_RW int kind; |
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.
int
Why int? You have already defined enum type above.
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.
done
modules/rgbd/src/large_kinfu.cpp
Outdated
| vs.setTsdfTruncateDistance(params.volumeParams.tsdfTruncDist); | ||
| vs.setMaxWeight(params.volumeParams.maxWeight); | ||
| vs.setVolumeResolution(Vec3i(params.volumeParams.unitResolution, | ||
| params.volumeParams.unitResolution, params.volumeParams.unitResolution)); |
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.
broken indentation
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.
done
|
Link on the main "opencv" PR must be added in the description. |
| CV_PROP_RW float voxelSize = volumSize / 512.f; | ||
|
|
||
| /** @brief TSDF truncation distance | ||
| Distances greater than value from surface will be truncated to 1.0 |
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.
Blank line is necessary after @brief here and below.
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.
done
| CV_PROP_RW VolumeType kind = VolumeType::TSDF; | ||
|
|
||
| /** @brief Resolution of voxel space | ||
| Number of voxels in each dimension. |
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.
Blank line is necessary after @brief line here and below.
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.
done
| struct CV_EXPORTS_W VolumeParams | ||
| { | ||
| /** @brief Kind of Volume | ||
| Values can be TSDF (single volume) or HASHTSDF (hashtable of volume units) |
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.
broken indentation
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.
done
modules/rgbd/src/large_kinfu.cpp
Outdated
| params.resolutionZ = 512; | ||
| params.voxelSize = volumeSize / 512.f; | ||
| params.depthTruncThreshold = 0.f; // depthTruncThreshold not required for TSDF | ||
| params.tsdfTruncDist = 7 * params.voxelSize; //! About 0.04f in meters |
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.
//!
There is not doxygen in the source code.
Comment is incorrect due to missing <.
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.
done
| */ | ||
| CV_PROP_RW int resolutionX = 128; | ||
| CV_PROP_RW int resolutionY = 128; | ||
| CV_PROP_RW int resolutionZ = 128; |
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.
Each member should be documented.
Why we can't use Vec3i?
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.
it was in the previous version of the code and this structure will be removed in future
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.
The true reason to use 3 ints instead of Vec3i is that Vec3i does not work well with bindings generator
| }; | ||
| struct CV_EXPORTS_W Params |
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.
Empty space between declarations.
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.
done
Main PR: opencv/opencv#21189
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.