1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-20 04:25:42 +08:00
Commit Graph

26 Commits

Author SHA1 Message Date
Alexander Alekhin
fe4221e9b5 Merge branch 4.x 2021-10-15 22:11:02 +00:00
Alexander Alekhin
b83d965efd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-08-28 21:30:23 +00:00
Stephen McDowell
ed199a3498 remove executable bit for various files 2021-08-23 16:57:33 -06:00
Rostislav Vasilikhin
b9ad0d45c9 Merge pull request #2936 from savuor:rgbd_to_3d
Moving RGBD parts to 3d

* KinFu reference removed

* include files removed

* test, perf and misc files for rgbd removed (placed in main repo)

* src files removed

* KinFu & family in contrib

* forgot to move test_colored_kinfu.cpp to contrib

* CMake: extra dependency removed

* test_precomp: namespace removed

* include headers list fixed

* namespaces fixed

* 2 demos moved to main repo

* volParams in demos: resolution and pose

* minors

* params.pose, resolution -> by elem

* %s%KinFu pipelines: ICP -> Odometry, pyramids -> OdometryFrame, submaps ->> namespace detail

* DynaFu TSDF: Intr -> Matx33f

* colored KinFu: keeping colors, proper caching

* all KinFus: proper caching

* ICP call: Affine3f -> Matx44d

* returning linemode back to contrib

* params.pose is Mat now

* adding forgotten file

* minor compilation fix

* VolumeType -> VolumeParams

* (temporarily) removing bindings from a field

* pyopencv_linemod -> contrib

* wrap Volume, VolumeType from enum to int

* fixing headers paths

* render...() fixed

* makeVolume(... resolution -> [X, Y, Z])

* *KinfuParams: fields wrapped

* trailing whitespaces

* adding LONG tags to tests

* OdometryFrame::create -> Odometry::makeOdometryFrame(); rerun builders

* VolumeType -> VolumeKind

* WillowGarage license removed

* Odometry: static const-mimicking functions to internal constants

* workarounds for ICP maxRotation and maxTranslation

* explicitly include 3d/detail headers

* minor (mostly to rerun buildbot)
2021-08-22 13:18:48 +00:00
Artem Saratovtsev
d5317d6297 Merge pull request #2964 from DumDereDum:icp_docs
ICP Docs

* add first info

* add main info

* minor fix

* defgroup fix

* move docs to rgbd.hpp

* try to fix

* add f

* fix with f

* minor fix

* final fix

* whitespace fix

* info fix

* uppercase letter

* create md docs

* try to do math in md

* first draft

* minor fix | add to the web docs

* minor fixes

* minor fixes

* add T

* minor fix of meaning

* Update kinfu_icp.markdown

* Update kinfu_icp.markdown

* More edits

* whitespace

* minor changes

Co-authored-by: Rostislav Vasilikhin <savuor@gmail.com>
2021-07-04 21:55:23 +00:00
DumDereDum
da6a95e0db Merge pull request #2878 from DumDereDum:colored_kinfu
Colored Kinect Fusion

* create dummy unworked classes

* dummy class works

* colored kinfu demo minor changes

* add simple rgb reader and writer

* add rgb info to tsdf

* add new raycast

* replace TsdfVoxel with RGBTsdfVoxel; integrate done

* add colors info to raycast

* just render colors

* color processing fix

* intergrate color fix

* add simple shift; minor fixes

* add cv_errors for not implemented functions

* minor fixes

* made calibration

* makeColoredFrameFromDepth works

* remove comments

* makeColoredFrameFromDepth fix

* RGBSoure remove extra code

* RGBSoure remove extra code 1

* simple fix of bug with rgb size

* minor fix

* docs fix

* docs fix

* unused parameter fix

* warnings fix

* fix tsdf errors; rgbd_perf warnings

* fix errors

* minor fix

* debug print

* debug print 2

* debug print 3

* invoker fix

* minor fix

* remove debug cout

* add simple tests

* docs fix

* warnings fix

* minor fix

* function warning fix

* add vectorized code

* minor fixes

* minor speed up

* minor fixes; renaming

* new minor fixes

* bug fix

* minor fix

* test update

* extra code removed

* bugfix; warning fix

* simple interpolation

* minor fix

* color work minor fix

* vectorized interpolation

* minor fix
2021-04-07 20:49:57 +00:00
Rostislav Vasilikhin
1341c05766 Merge pull request #2892 from savuor:posegraph_no_ceres
Pose Graph rewritten without Ceres

* Works well on g2o dataset, cumulative:
1. Pose3d done w/o Eigen types;
2. PoseGraph nodes vector<Node> -> map<int, Node>
3. Eigen is not used in cost function or parametrization
4. Cost function debugged & fixed (original one was wrong), rewritten from Automatic to Analytic

* g2o dataset reading added to PoseGraph

* sparse solver fixes from DynaFu draft

* Eigen cost function and parametrization removed + g2o reading fixed

* refactored: pose error, pose graph edge, pose graph node

* sparse solve: templated

* MyOptimize(): 1st version

* several fixes and TODOs for future

* sparse block matrix: val functions, template type

* works at Ceres quality (cleanup needed)

* MyOptimize() is set to default optimizer

* Ceres thrown away, PoseGraph class and header/source code reorganized

* pose, node, edge -> nested for PoseGraph

* warnings fixed

* jacobiScaling disabled for better performance + minors

* trailing whitespace fixed

* more warnings fixed

* message added: Eigen is required for build + minors

* trying to fix warning

* try to fix "unreachable code" warning

* trying to fix unreachable code, pt.3

* trying to fix unreachable code, pt. 5

* trying to fix unreachable code, pt. the worst + minors

* try to fix unreachable code, pt. the ugliest

* trying to fix unreachable code, pt. the grumpiest

* cout -> CV_LOG_INFO

* quat matrix functions moved outside cv and kinfu namespaces

* unused function fix

* pose graph made public (but in detail namespace) + test for pose graph

* minor: prints

* Pose Graph interface settled

* Pose graph interface and its use updated

* cos -> std::cos

* cout -> CV_LOG_INFO

* pose graph interface updated: implementation

* Pose Graph Node and Edge: extra fields dropped

* more minor refactor-like fixes

* return and finish condition fixed

* more updates to test

* test disabled for Debug builds because 400 sec is too much

* whitespace

* Disable pose graph test if there's no Eigen

* more unused vars

* fixing unused function warning

* less includes

* "verbose" removed

* write obj to file only when debug level is raised

* License + include guard

* skip test using tags and SkipTestException

* suppress "unused function" warning

* minor
2021-04-01 20:59:16 +00:00
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
Alexander Alekhin
dff1422532 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-19 18:58:56 +00:00
Gagandeep Singh
b3ad2c323d Merge pull request #2341 from czgdp1807:issue-2277
Added constructors and destructors for RgbdPlane

* declared constructors and destructors of RgbdPlane

* definitions written

* tests for python bindings added
2019-11-19 21:43:02 +03:00
Apoorv Goel
8b59dffc61 Merge pull request #2161 from UnderscoreAsterisk:dynafu
DynamicFusion Implementation

* Add new nodes from points

* Addition of new node in the field

* Warp nodes demo

* Add newline before {

* Remove 3rd party flann dependency

* Regularisation Heirarchy

* Correct node radius

* Change default growth rate

* New node position = centroid of the neighbourhood

* Enlarge nodes while paused

* Dynafu TSDF

* TSDF demo

* Avoid double calc and adjust initial tsdf weight

* Fix bug that caused some voxels to disappear

* getNodePos helper

* Remove USE_INTRINSIC check

* Correct RT avg calculation and remove redundant knn calc

* Slight perf improvements

* Use LinearIndex

* Debug calculations

* set all nodes' RT

* Various bug fixes

* Separate camera and warpfield

* Add dynafu documentation

* Adhere to coding style

* Add dynafu unit test

* update demo

* 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

* Remove trailing whitespaces

* Replace bool vector with array

* create findNeighbours in WarpField

* Maintain nodesPos matrix in WarpField

* Fix warnings on Windows build

* Remove cameraPose from WarpField

* Use AutoBuffer

* Marching Cubes

* Fix MC

* Split mesh vertices & edges

* Change Mat types in MC

* OpenGL rendering

* Check for HAVE_OPENGL

* Error handling in case HAVE_OPENGL is not defined

* Replace Mat_ with std::vector inside marchCubes

* Parallelise marching cubes

* Fix warpfield and estimate depth inside DynaFuImpl::updateT()

* Linearise depth and use points/normals from MC

* Don't test dynafu without OpenGL support

* Analytical calculation of Jacobian matrices

* Add details about rotation and differentiate graph terms in J_r

* Use derivative of T^-1 from the tutorial

* Remove L2 norm from reg term

* Use chain rule to differentiate data term

* Markdown

* Fix markdown

* Replace MD file by HTML

* Change the data term expression

* Calculate J_d using vector identities

* Rasterize vertex and normals

* Apply warpfield before rendering

* Add CV_UNUSED for normImage to fix warning

* Render float image instead of uint8

* Implement ICP data term and other changes:
1. add option to applyWarp to normals
2. add option to `fetchPointNormals` to return points in voxel coordinates
3. Fix: Use voxel coordinates to update WarpField

* Fix non-OpenGL build

* Intialise newly discovered node transforms with DQB

* Fix data term

* Change data term normal and add kinfu-like distance/angle checks

* Implement regularisation

* Fix warnings

* Credit authors of DQB and table for MC

* cast size_t to int to supress warning

* Correct regularisation and add normal equation set up

* Delete html

* Dynafu unit test
2019-10-21 17:29:49 +03:00
berak
7c628d73e3 rgbd: fix python bindings 2019-01-26 11:37:24 +01: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
Alexander Alekhin
5d0a12833b rgbd: apply CV_OVERRIDE/CV_FINAL 2018-03-28 16:50:00 +03:00
Linus Ericsson
54d65f9d74 Added python bindings for rgbd module (#1284)
* Added python bindings for whole rgbd module

* changed exposed constructors to static Ptr<class>::create() functions

* removed python bindings for isValidDepth*

* removed operator bindings
2017-08-10 13:25:38 +03:00
Hamdi Sahloul
62f5e865bf Expose depthTo3d() and warpFrame() to the Python wrapper 2017-02-15 01:59:04 +09:00
manuele
9c413930d4 Fixed docs and added tests for Linemod 16U depth case 2015-12-17 17:31:41 +03:00
Vadim Pisarevsky
ae00a82dfc Merge pull request #132 from pokeefe:add-rgbd-registration-function 2015-12-12 07:14:06 +00:00
Maksim Shabunin
da7ff82d19 Replaced CV_IMPL_PROPERTY macros in public headers 2015-03-18 17:56:47 +03:00
Maksim Shabunin
05405e3dca Replaced CV_PURE_PROPERTY macros with the code 2015-03-18 17:37:37 +03:00
Maksim Shabunin
34131405df Removed some methods from cv::Algorithm and changed ml module interfaces 2015-02-17 11:45:57 +03:00
Maksim Shabunin
a20c5c8dd9 Doxygen documentation for all modules 2014-12-01 15:54:42 +03:00
Pat O'Keefe
f5ef071c11 Add RGBD registration function that registers depth to an external camera. 2014-11-25 14:49:22 -05:00
Maksim Shabunin
bad3cd2427 Fixed some existing doxygen comments 2014-10-21 16:03:02 +04:00
Vadim Pisarevsky
4906050ea1 added "text" module; added linemod to rgbd module, fixed compile errors in rgbd. 2014-07-28 18:01:19 +04:00
Vincent Rabaud
49a357b948 add an RGBD module 2014-02-13 01:38:46 +01:00