1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00
Commit Graph

9 Commits

Author SHA1 Message Date
Akash Sharma
7022f4e3e0 Merge pull request #2619 from akashsharma02:submap
[GSoC] Add Submaps and PoseGraph optimization for Large Scale Depth Fusion

* - Add HashTSDF class
    - Implement Integrate function (untested)

* Integration seems to be working, raycasting does not

* Update integration code

* Integration and Raycasting fixes, (both work now)

* - Format code
- Clean up comments and few fixes

* Add Kinect Fusion backup file

* - Add interpolation for vertices and normals (slow and unreliable!)
- Format code
- Delete kinfu_back.cpp

* Bug fix for integration and noisy odometry

* - Create volume abstract class
- Address Review comments

* - Add getPoints and getNormals function
- Fix formatting according to comments
- Move volume abstract class to include/opencv2/rgbd/
- Write factory method for creating TSDFVolumes
- Small bug fixes
- Minor fixes according to comments

* - Add tests for hashTSDF
- Fix raycasting bug causing to loop forever
- Suppress warnings by explicit conversion
- Disable hashTsdf test until we figure out memory leak
- style changes
- Add missing license in a few files, correct precomp.hpp usage

* - Use CRTP based static polymorphism to choose between CPU and GPU for
HashTSDF volume

* Create submap and submapMgr
Implement overlap_ratio check to create new submaps

* Early draft of posegraph and submaps (Doesn't even compile)

* Minor cleanup (no compilation)

* Track all submaps (no posegraph update yet)

* Return inliers from ICP for weighting the constraints
(Huber threshold based inliers pending)

* Add updating constraints between submaps and retain same current map

* Fix constraints creation between submaps and allow for switching between
submaps

* - Fix bug in allocate volumeUnits
 - Simplify calculation of visibleBlocks

* Remove inlier calculation in fast_icp (not required)

* Modify readFile to allow reading other datasets easily

* - Implement posegraph update, Gauss newton is unstable

 - Minor changes to Gauss newton and Sparse matrix. Residual still
increases slightly over iterations

* Implement simplified levenberg marquardt

* Bug fixes for Levenberg Marquardt and minor changes

* minor changes

* Fixes, but Optimizer is still not well behaved

* Working Ceres optimizer

* - Reorganize IO code for samples in a separate file
- Minor fix for Ceres preprocessor definition
- Remove unused generatorJacobian, will be used for opencv implementation
of levenberg marquardt
- Doxygen docs fix
- Minor preprocessor fixes

* - Reorganize IO code for samples in a separate file
- Minor fix for Ceres preprocessor definition
- Remove unused generatorJacobian, will be used for opencv implementation
of levenberg marquardt
- Doxygen docs fix
- Minor preprocessor fixes
- Move inline functions to header, and make function params const
references

* - Add Python bindings for volume struct
- Remove makeVolume(const VolumeParams&) Python binding due to compilation
issues
- Minor changes according to comments

* - Remove dynafu::Params() since it is identical to kinfu::Params()
- Use common functions for dynafu_demo
- Suppress "unreachable code" in volume.cpp

* Minor API changes

* Minor

* Remove CRTP for HashTSDF class

* Bug fixes for HashTSDF integration
2020-10-13 19:19:15 +00:00
Akash Sharma
468345511f Merge pull request #2566 from akashsharma02:master
[GSoC] Add new Hashtable based TSDF volume to RGBD module

* - Add HashTSDF class
    - Implement Integrate function (untested)

* Integration seems to be working, raycasting does not

* Update integration code

* Integration and Raycasting fixes, (both work now)

* - Format code
- Clean up comments and few fixes

* Add Kinect Fusion backup file

* - Add interpolation for vertices and normals (slow and unreliable!)
- Format code
- Delete kinfu_back.cpp

* Bug fix for integration and noisy odometry

* - Create volume abstract class
- Address Review comments

* - Add getPoints and getNormals function
- Fix formatting according to comments
- Move volume abstract class to include/opencv2/rgbd/
- Write factory method for creating TSDFVolumes
- Small bug fixes
- Minor fixes according to comments

* - Add tests for hashTSDF
- Fix raycasting bug causing to loop forever
- Suppress warnings by explicit conversion
- Disable hashTsdf test until we figure out memory leak
- style changes
- Add missing license in a few files, correct precomp.hpp usage
2020-07-03 21:31:39 +00:00
Rostislav Vasilikhin
a1d873092f Merge pull request #2133 from savuor:kinfu_truncate
KinectFusion: several updates (#2133)

* truncateThreshold added

* demo updated for RealSense

* first Kinect2, then RealSense

* more distance-based parameters
2019-06-05 15:32:20 +03:00
soyer
1441c8e443 The kinfu_demo should open the default camera if I don't specify the camera in the cli 2018-10-15 15:25:02 +02:00
Alexander Alekhin
79052e15a3 fix build 2018-10-09 14:26:16 +00:00
Rostislav Vasilikhin
75bcd397af KinectFusion big update: OpenCL support, etc. (#1798)
* KinFu demo: idle mode added

* undistort added

* KinFu demo: depth recorder added

* TSDFVolume gets voxelSize, voxelSizeInv, truncDist members; decorative fixes

* TSDFVolumeGPU::integrate(): host code compiles

* TSDFVolume: truncDist fixed

* TSDFVolume::integrate(): initial OCL version is done

* TSDFVolume::integrate(): OCL: minor fixes

* kinfu: small fixes

* TSDFVolume::raycast(): initial GPU version is done

* USE_INTRINSICS directive for centralized enable/disable opt. code

* TSDF Volume supports 3 different sizes/resolutions on each dimension

* TSDFVolume: serviceMembers moved to parent class

* TSDFVolumeGPU: mem order changed, gave perf boost 4x

* Frame: fixed UMat as InputArray; TSDF: comments, TODOs, minor fixes

* Frame::getPointsNormals(); minors

* FrameGPU: initial version (not working)

* minor

* FrameGPU: several fixes

* added OCL "fast" options

* ICP OCL: initial slow version is done (host-side reduce)

* ICP OCL: reduce is done, buggy

* KinFu Frame: more args fixes

* ICP OCL: small fixes to kernel

* ICP OCL reduce works

* OCL code refactored

* ICP OCL: less allocations, better speed

* ICP OCL: pose matrix made arg

* Render OCL: small fix

* Demo: using UMats everywhere

* TSDF integrate OCL: put const arg into kernel arg

* Platform parameter partially removed, implementation choice is done through OCL availability check

* Frame and FrameGenerator removed (other code is in following commits)

* CPU render: 4b instead of 3b

* ICP: no Frame class use, one class for both CPU and GPU code

* demo: fix for UMat chain

* TSDF: no Frame or FrameGenerator use

* KinFu: no Frame or FrameGenerator, parametrized for Mat or UMat based on OCL availability

* KinFu::setParams() removed since it has no effect anyway

* TSDF::raycast OCL: fixed normals rendering

* ScopeTime -> CV_TRACE

* 3-dims resolution and size passed to API

* fixed unexpected fails of ICP OCL

* voxels made cubic again

* args fixed a little

* fixed volSize calculation

* Tests: inequal, OCL, unified scene test function

* kinfu_frame: input types fixed

* fixed for Intel HD Graphics

* KinFu demo: setUseOptimized instead of setUseOpenCL

* tsdf: data types fixed

* TSDF OCL: fetch normals implemented

* roundDownPow2 -> utils.hpp

* TSDF OCL: fetch points+normals implemented

* TSDF OCL: NoSize, other fixes for kernel args

* Frame OCL: HAVE_OPENCL, NoSize, other kernel args fixed

* ICP OCL: HAVE_OPENCL, NoSize and other kernel fixes

* KinFu demo fixes: volume size and too long delay

* whitespace fix

* TSDF: allowed sizes not divisable by 32

* TSDF: fixed type traits; added optimization TODOs

* KinFu made non-free

* minor fixes: cast and whitespace

* fixed FastICP test

* warnings fixed: implicit type conversions

* OCL kernels: local args made through KernelArg::Local(lsz) call

* MSVC warnings fixed

* a workaround for broken OCV's bilateral

* KinFu tests made a bit faster

* build fixed until 3.4 isn't merged to master

* warnings fixed, test time shortened
2018-10-09 12:26:54 +03:00
Pavel Rojtberg
9e787377dc kinfu: allow basic wrapping for bindings
for this
- move Params struct out of class
- use static create instead of pimpl
- allow demo to be compiled without VIZ
2018-06-25 14:27:00 +02:00
Rostislav Vasilikhin
e351caedf7 KinectFusion demo: live input support added (#1671)
* KinFu demo: added support for live demo, some bugs fixed

* minor fixes

* Kinect2 workarounds and defaults added
2018-06-25 14:09:39 +03:00
Rostislav Vasilikhin
42a889ef4f KinectFusion implemented (#1627)
* empty kinfu module created

* KinFu: skeleton is done

* some intermediate state fixed

* fixed normal calculation

* bilinear depth interp: fixing missing data

* TSDF integration optimized

* TSDF: adding constness

* utils: isNaN; Intr::Projector const reference fixed

* TSDF raycast: quality improvements

* TSDF fetchCloud is done

* render() added

* ICP implemented

* debug code moved to demo.cpp

* less TODOs

* partial refactoring

* TSDF: fetchPoints() and fetchNormals() rewritten in parallel manner

* platform choose added

* reordered

* data types isolated off the platform

* minor fixes

* ScopeTime added

* fixed iterations gathering

* volume::integrate() parallelized but works slow (big overhead for

* raycast is done in parallel

* got rid of kftype and p3type

* fetchNormals() fixed

* less code duplication

* nan check reduced, interpolate() refactored to fetchVoxel()

* ICP: optimizations

* TSDF: bilinear specialized

* TSDF: voxelSizeInv pushed away

* TSDF: interpolation optimized

* TSDF::integrate: parallel_for now works fast

* Frame::render: pow -> float ipow<int p>(x)

* ICP::getAb: parallel_for

* ICP::getAb: time print disabled

* ICP::getAb::bilinear: 2 calls joined

* refactored, extra functions removed

* optimized to use only 27 elems

* ICP::getAb: better optimized

* Points and Normals data type expanded to 4 channels

* ICP optimized (doesn't work)

* ICP::getAb is on intrinsics and it works

* NaN check is faster

* ICP::getAB: minors

* added non-SIMD code as fallback

* TSDF::fetchVoxel and interpolation: got rid of coord check

* TSDF::fetchVoxel: refactor

* TSDF::raycast: local copies of members

* TSDF::interpolate: refactored for simplier vectorization

* TSDF::getNormal: refactored for simplier vectorization

* minor

* include "intrin.hpp" moved to precomp.hpp

* TSDF::coords shifts moved to class body

* TSDF::getNormal vectorized

* TSDF::getNormal: little improvements

* TSDF::interpolate: little improvements

* TSDF::raycast vectorized

* more to precomp.hpp

* TSDF: minor optimizations

* TSDF::raycast cycles optimized

* TSDF::fetchPointsNormals instead of separate p and n

* TSDF::bilinearInterpolate: little speedup

* TSDF::interpolate: speed up

* TSDF::interpolate: more compact code

* TSDF::getNormal and raycast main cycle made faster

* ICP: few improvements

* Frame: a lot of parts parallelized

* TSDF::fetchPointsNormals minor improvements

* TSDF::integrate and bilinear vectorized

* TSDF::interpolate and getNormal: interpolation vectorized

* ICP: minor changes

* gradientDeltaFactor removed, coarseParams() added

* TSDF::raycast: fixed bug with tmin/tmax

* minors

* baseZ fixed

* ICP: interpolation fixed, non-parallelized code fixed

* TSDF::interpolate: bilinear fixed, less artifacts

* TSDF: minor refactoring

* TSDF: some members moved to parent class

* added tests for KinFu

* KinFu documented

* docs fixed

* warnings fixed

* license added, overrides added

* minors

* ScopeTime moved to separate file

* less memory allocations

* demo improved, java binding disabled

* viz module made optional

* fix to demo

* frameGenerator interface: got rid of refs to cv::Ptr

* demo made interactive

* trying to fix build

* trying to fix warnings

* warning fixed

* demo fixed

* raycast_step_factor tuned

* legal info added

* don't reset if ICP failed

* refactoring: KinFu::operator() => update()

* KinFu::KinFuParams => ::Params

* get/setParams

* fetch => get

* all src moved to cv::kinfu namespace

* struct Intr made internal

* kinfu_module merged into rgbd module

* License preambule updated

* minors

* frame.* renamed to kinfu_frame.*

* warnings fixed

* more warnings fixed

* RGBD normals: a fix against Inf/Nan values

* FastICP: fixed transformation direction

* RGBD Odometry tests: added epsilon for id transform; minors

* RGBD Odometry tests enabled

* modules list fixed
2018-05-31 14:18:25 +03:00