Fixes#22799
Replaces #21559 which was taken as a base
Connected PR in contrib: [#3388@contrib](https://github.com/opencv/opencv_contrib/pull/3388)
### Changes
OK, now this is more Odometry-related PR than Volume-related. Anyway,
* `Volume` class gets wrapped
* The same was done for helper classes like `VolumeSettings`, `OdometryFrame` and `OdometrySettings`
* `OdometryFrame` constructor signature changed to more convenient where depth goes on 1st place, RGB image on 2nd.
This works better for depth-only `Odometry` algorithms.
* `OdometryFrame` is checked for amount of pyramid layers inside `Odometry::compute()`
* `Odometry` was fully wrapped + more docs added
* Added Python tests for `Odometry`, `OdometryFrame` and `Volume`
* Added Python sample for `Volume`
* Minor fixes including better var names
### Pull Request Readiness Checklist
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
### Changes
* Duplicated code removal in TSDF tests by implementing them with fixtures and GTest params
* e.g. separate OCL tests file removed
* as a result, more test cases are covered
* the same's done for perf tests
### Pull Request Readiness Checklist
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
Corresponding contrib PR: #3382@contrib
Changes
- Volume::raycast(): camera intrinsics can be explicitly passed to the function. If not, the ones from current volume settings are used
- getVolumeDimensions() renamed to getVolumeStrides() because they are strides actually
- TSDF tests: OpenCLStatusRevert and parametrized fixture
- ColorTSDF::integrate(): extra RGB projector is redundant, removed
- Minor changes
This PR contains:
- a new property enableGrowth which controls should the HashTSDF be extended during integration by adding new volume units or not
- a new method getBoundingBox which calculates the size of currently occupied data
- a set of tests to check that new functionality
- a fix for TSDF GPU reset (data is correctly zeroed now using floatToTsdf() function)
minor changes
There's a bug which appears when volume pose contains non-trivial rotation.
It results in wrong depth integration which can be observed during raycasting
or points/normals export.
- This PR fixes the bug for both CPU and OpenCL
- There is a reproducer for the bug
- The copy behavior of VolumeSettings fixed (now copy constructor creates a deep copy)
- Minor changes (e.g. unused vars removed)
Complement PR: #3366@contrib
Changes
OdometryFrame losts its getters: a user can provide data at construction stage only, pyramids and other generated data is read-only now
OdometryFrame is based on UMats: no TMat templates inside, CPU operations are done with UMat::getMat() method, chaining issues are solved ad-hoc
No more Odometry::createOdometryFrame() method, frames are compatible with all odometry algorithms
Normals computer is cached inside Odometry and exposed to API as well as its settings
Volume::raycast() won't return the result in OdometryFrame anymore
Added test for Odometry::prepareFrame*() & other test fixes
Minor code improvements
TODOs:
fix TODOs in code
lower acceptable accuracy errors
variables refactoring
levmarq fix
initIntrinsicParams2D() refactoring
undo LM fix
cameraCalcJErr: made a lambda; warnings fixed; vars rearranged & renamed, jacobian buffers, perViewErrors and allErrors fix, etc.
stereoCalibrate: internal vars in callback
stereoCalibrate: capture only useful variables
stereoCalibrate: perViewError fix + minors
rvecs and tvecs are not pointers anymore
no extra lambda
newObjPoints: no pointers
stdDevs: no pointers
_Jo removed: not used
Range::all() -> rowRange, colRange
param and mask are std::vectors now
indices shortened
tabs
less func-scoped vars; TODOs
less formatting & renaming changes
trailing whitespaces
less diff
less changes
less changes
Range::all() back
perViewErr ptr fix
NINTRINSIC captured
try to fix warning
trying to fix a warning
fix warnings, another attempt
RgbdNormals: setMethod() removed as useless
RgbdNormals: tests + cross product, to be fixed
+ cross product
LINEMOD: diffThreshold param added + tests fixed
minor
diffThreshold fix
points3dToDepth16U fix
normals computer diffThreshold fix
random plane generation fixed + diffThreshold fix
Rendered normals test rewritten to GTest Params
random plane generation: scale
RGBD_Normals tests: thresholds tuned
Rendered normals tests: 64F support added
Random planes normal tests rewritten to GTest Params
LINEMOD and CrossProduct fix
SRI threshold raised
NormalsRandomPlanes: thresholds raised
assert on unknown alg; minor
fix
frame size reduced
TIFF replaced by YAML.GZ
depthTo3d test changed
cv::transform is used
fix warning
nanMask()
flipAxes()
absDotPixel() + forgotten code
helper functions removed
RGBDNormals: checkNormals() and compare LINEMOD's pts3d to depth input
Rendered: another criteria; thresholds; LINEMOD's pts3d to depth input comparison
thresholds raised a bit
SRI slightly optimized
assert change
normal tests refactored, parametrized, split
trailing namespace, thresholds raised
SRI caching optimized a lot
normal tests rewritten to fixture, no loop
minor
runCase() joined with testIt()
thresholds were put into GTest params
ternary operator
RgbdNormalsTest merged into NormalsRandomPlanes; RgbdPlanes moved closer to tests
normal test minor refactoring
plane finder tests refactored to GTest Params
skip tests
thresholds raised
plane test minor
plane tests: timers dropped, nPlanes put into GTest Params; refactoring
generated normals tests: minor refactoring
flipAxes() templated
rendered normals tests refactored: thresholds to GTest Params
CV_Error -> ASSERT_FALSE
Add normal estimation and region growing algorithm for point cloud
* Add normal estimation and region growing algorithm for point cloud
* 1.Modified documentation for normal estimation;2.Converted curvature in region growing to absolute values;3.Changed the data type of threshold from float to double;4.Fixed some bugs;
* Finished documentation
* Add tests for normal estimation. Test the normal and curvature of each point in the plane and sphere of the point cloud.
* Fix some warnings caused by to small numbers in test
* Change the test to calculate the average difference instead of comparing each normal and curvature
* Fixed the bugs found by testing
* Redesigned the interface and fixed problems:
1. Make the interface compatible with radius search.
2. Make region growing optionally sortable on results.
3. Modified the region growing interface.
4. Format reference.
5. Removed sphere test.
* Fix warnings
* Remove flann dependency
* Move the flann dependency to the corresponding test
GSoC module to save and load point cloud
* Add functionality to read point cloud data from files
* address issues found on review, add tests for mesh, refactor
* enable fail-safe execution and empty arrays as output
* Some improvements for point cloud io module
Co-authored-by: Julie Bareeva <julia.bareeva@xperience.ai>