Skip to content
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

[DepthMap] Depth map improvements #1296

Merged
merged 238 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
74d9550
[depthMap] Reorganization of gpu cache
gregoire-dl Jan 19, 2022
65bd130
[depthMap] Rename commonStructures to memory
gregoire-dl Jan 19, 2022
da39a91
[depthMap] Remove redundant variables
gregoire-dl Jan 20, 2022
f87e347
[depthMap] Add CudaROI struct
gregoire-dl Jan 20, 2022
ff2ce96
[depthMap] Remove plane_sweeping_cuda
gregoire-dl Jan 20, 2022
afb2468
[depthMap] CUDA file reorganisation
gregoire-dl Jan 20, 2022
14a12a7
[depthMap] Remove MultiViewParams and ImagesCache dependencies in Dev…
gregoire-dl Jan 21, 2022
8645e2a
[depthMap] Remove CudaROI
gregoire-dl Jan 21, 2022
3ea8ec1
[depthMap] Add new ROI struct
gregoire-dl Jan 21, 2022
c27d5ae
[depthMap] hostUtils: Remove tic / toc
gregoire-dl Jan 21, 2022
0a4edd4
[depthMap] ROI: Remove useless checks
gregoire-dl Jan 21, 2022
3ab8420
[depthMap] Sgm: Add ROI to cuda_volumeComputeSimilarity
gregoire-dl Jan 21, 2022
25e4dee
[depthMap] Sgm: Add ROI to cuda_volumeRetrieveBestDepth
gregoire-dl Jan 21, 2022
fdb559b
[depthMap] Sgm: New CUDA function cuda_volumeOptimize
gregoire-dl Jan 21, 2022
d4f81be
[depthMap] ROI: Fix type comparison
gregoire-dl Jan 24, 2022
e113f89
[depthMap] planeSweeping: Add doc
gregoire-dl Jan 24, 2022
2106552
[depthMap] Add DeviceStreamManager
gregoire-dl Jan 24, 2022
8173caf
[depthMap] deviceSimilarityVolumeKernels: Fix unused value parameter
gregoire-dl Jan 24, 2022
1ffba2c
[depthMap] DepthSimMap: Add accessors
gregoire-dl Jan 26, 2022
c6598dd
[depthMap] Refine: Add ROIs and remove unnecessary host/device memory…
gregoire-dl Jan 26, 2022
c72cd4f
[depthMap] Remove class PlansSweepingCuda
gregoire-dl Jan 26, 2022
26a3e0f
[depthMap] Cuda: compNCCby3DptsYK refactoring
gregoire-dl Jan 31, 2022
121235b
[depthMap] planeSweeping: Add TSimRefine definition
gregoire-dl Jan 31, 2022
1137270
[depthMap] imageProcessing: Add volume gaussian smoothing functions
gregoire-dl Jan 31, 2022
03131e2
[depthMap] RefineParams: Add volume strategy parameters
gregoire-dl Jan 31, 2022
720c9bb
[depthMap] volumeIO: Add volume cross export / Add documentation
gregoire-dl Jan 31, 2022
581edcf
[depthMap] Sgm: Fix optimized volume export
gregoire-dl Jan 31, 2022
a96d003
[depthMap] Refine: Add volume strategy
gregoire-dl Jan 31, 2022
650ff5d
[depthMap] Refine: Fix some cast
gregoire-dl Jan 31, 2022
299ad8b
[depthMap] RefineParams: By default do not use the volume strategy
gregoire-dl Jan 31, 2022
755a72a
[depthMap] planeSweeping: Merge deviceRefine and deviceFuse
gregoire-dl Jan 31, 2022
a7b08ba
[depthMap] Sgm: Remove code duplication
gregoire-dl Feb 2, 2022
30d9f43
[depthMap] Roi: allows code sharing between NVCC and other compilers
gregoire-dl Feb 4, 2022
a0411ac
[depthMap] Add new class SgmDepthList
gregoire-dl Feb 4, 2022
549c4e7
[depthMap] CUDA: Move host/common files
gregoire-dl Feb 4, 2022
31d347b
[depthMap] SgmParams: Remove cpp file
gregoire-dl Feb 4, 2022
1574cff
[mvsData] imageIO: Add ROI to writeImage functions
gregoire-dl Feb 14, 2022
8a80045
[mvsUtils] fileIO: Add tile support for function getFileNameFromViewId
gregoire-dl Feb 14, 2022
a73250d
[mvsUtils] MultiViewParams: Add volume / volumeCross / 9pCSV file types
gregoire-dl Feb 14, 2022
623946d
[depthMap] ROI: Add useful functions / methods
gregoire-dl Feb 14, 2022
e27c8b8
[depthMap] Sgm/Refine: Use tilling for the entire workflow
gregoire-dl Feb 14, 2022
9796d84
[depthMap] DeviceCamera: Add useful CHECK_CUDA_ERROR
gregoire-dl Feb 14, 2022
2406264
[depthMap] Sgm/Refine: Build ROI list from given ROI width/height
gregoire-dl Feb 15, 2022
09d9e1d
[depthMap] ROI: Fix range error in countains methods
gregoire-dl Feb 16, 2022
a40a7c8
[depthMap] DepthSimMap: Fix constructor height initialization
gregoire-dl Feb 16, 2022
4e7adea
[depthMap] Sgm/Refine: Add tile coverage
gregoire-dl Feb 16, 2022
73b4d9a
[depthMap] DepthSimMap: load tiles with coverage
gregoire-dl Feb 16, 2022
019a585
[depthMap] ROI: Add Range struct
gregoire-dl Feb 21, 2022
7e74b9a
[depthMap] ROI: Remove 3d ROI
gregoire-dl Feb 21, 2022
fa19878
[depthMap] DepthSimMap: Fix width/height calculation
gregoire-dl Feb 21, 2022
2641c5e
[depthMap] DepthSimMap: loadFromTiles with border weight
gregoire-dl Feb 25, 2022
4592c35
[depthMap] ROI: Fix downscaleRange function
gregoire-dl Feb 25, 2022
7318d59
[depthMap] DeviceStreamManager: Add nbStreams accessor
gregoire-dl Mar 3, 2022
9027547
[depthMap] Sgm/Refine: Add stream private member
gregoire-dl Mar 3, 2022
6ec14ff
[depthMap] DeviceCamera: Add missing include
gregoire-dl Mar 3, 2022
6d63049
[depthMap] deviceDepthSimilarityMap: Fix wrong assert
gregoire-dl Mar 3, 2022
a4c608c
[depthMap] deviceSimilarityVolumeKernels: Fix float value
gregoire-dl Mar 3, 2022
d4c4f69
[software] depthMapEstimation: Add tile parameters
gregoire-dl Mar 3, 2022
5b59903
[software] depthMapEstimation: Add Sgm/Refine missing user parameters
gregoire-dl Mar 3, 2022
b3de67a
[software] depthMapEstimation: Update sgmP2Weighting parameter
gregoire-dl Mar 3, 2022
d2d1191
[software] depthMapEstimation: Update software version from 2 to 3
gregoire-dl Mar 3, 2022
0632bb5
[depthMap] Sgm/Refine: Fix untilled intermediate results
gregoire-dl Mar 4, 2022
ccdf578
[depthMap] volumeIO: fix sampleSize in exportSimilaritySamplesCSV
gregoire-dl Mar 9, 2022
f330fda
[depthMap] DeviceStreamManager: Fix wrong assert
gregoire-dl Mar 9, 2022
4f60312
[depthMap] Refine: Change log verbose level
gregoire-dl Mar 9, 2022
b1da6a5
[depthMap] DepthSimMap: Fix wrong width/height calculation
gregoire-dl Mar 9, 2022
cad8399
[depthMap] BufPtr: Fix integer overflow in pointer calculation
gregoire-dl Mar 9, 2022
66ba0da
[mvsUtils] Move ROI header from depthMap to mvsUtils
gregoire-dl Mar 9, 2022
8b8ca4d
[mvsUtils] Move TileParams header from depthMap to mvsUtils
gregoire-dl Mar 9, 2022
e132213
[mvsData] Move ROI header from mvsUtils to mvsData
gregoire-dl Mar 9, 2022
6738214
[mvsData] ROI: Update documentation
gregoire-dl Mar 9, 2022
9e14b44
[mvsData] ROI: Remove namespace
gregoire-dl Mar 9, 2022
1f6f37e
[mvsUtils] TileParams: Add comments
gregoire-dl Mar 9, 2022
4c71d0e
[mvsUtils] TileParams: Update namespace
gregoire-dl Mar 9, 2022
a258f74
[depthMap] Sgm/SgmDepthList/Refine: Improve constructor parameters co…
gregoire-dl Mar 9, 2022
5ad8da9
[mvsUtils] TileParams: Add getTileList function
gregoire-dl Mar 14, 2022
3985695
[mvsUtils] Add depthSimMapIO functions
gregoire-dl Mar 14, 2022
73e1d40
[mvs] Use depthSimMapIO functions for all MVS depth/sim map IO
gregoire-dl Mar 14, 2022
ca3dcbe
[depthMap] DepthSimMap: Use std::vector instead of StaticVector
gregoire-dl Mar 14, 2022
2d2ad90
[depthMap] planeSweeping: Do not average similarity in refineBestDepth
gregoire-dl Mar 14, 2022
535593b
[software] depthMapEstimation: Add mergeTiles option
gregoire-dl Mar 14, 2022
75ddab1
[software] depthMapEstimation: Fix options typo
gregoire-dl Mar 14, 2022
5d72489
[depthMap] Refine: Remove RefineFuse legacy
gregoire-dl Mar 14, 2022
5614a28
[depthMap] Code reorganization to perform one R camera tile per CUDA …
gregoire-dl Mar 23, 2022
d90b992
[depthMap] depthMap: remove CUDA streams limitation
gregoire-dl Mar 23, 2022
06488bd
[depthMap] Sgm/Refine: Remove useless timers
gregoire-dl Mar 24, 2022
1c2c898
[depthMap] depthMap: Add tile list computation
gregoire-dl Mar 24, 2022
6e1ce43
[depthMap] Refine: Fix const const error
gregoire-dl Mar 24, 2022
16c5d39
[depthMap] depthMapUtils: Add function resetDepthSimMap
gregoire-dl Mar 25, 2022
785b16d
[depthMap] depthMap: Improve tile list compuation / remove full Rc li…
gregoire-dl Mar 25, 2022
68b4ede
[depthMap] DeviceCache: Add omp parallel for
gregoire-dl Mar 25, 2022
39114e3
[depthMap] depthMap: Log theoretical Sgm/Refine device memory cost
gregoire-dl Mar 25, 2022
7416f69
[depthMap] Sgm: Particular case only one Tc for an Rc
gregoire-dl Jun 21, 2022
9ed7a89
[depthMap] depthMap: Based tile size on process image
gregoire-dl Jun 23, 2022
727ee98
[depthMap] Sgm: Add option maxTCams per tile
gregoire-dl Jun 23, 2022
790fb9f
[gpu] gpuInformationCUDA: Print CUDA build version
gregoire-dl Jun 23, 2022
99f2ddc
[depthMap] DepthMapParams: Reorganize Sgm/Refine parameters
gregoire-dl Jun 24, 2022
c0d6620
[mvsUtils] TileParams: Remove mergeTiles parameter
gregoire-dl Jun 24, 2022
33355b3
[depthMap] SgmDepthList: Use a plateau function filter to select the …
gregoire-dl Jun 24, 2022
c4e9e1c
[mvsUtils] MultiViewParams: Move findTileNearestCams function from Sg…
gregoire-dl Jun 24, 2022
894415f
[depthMap] depthMapEstimation: Compute final Sgm/Refine T cameras lis…
gregoire-dl Jun 24, 2022
199c3ef
[mvsUtils] TileParams: Remove pragma once in cpp
gregoire-dl Jun 27, 2022
f19456c
[mvsData] ROI: Add function inflateROI
gregoire-dl Jun 27, 2022
7e208f3
[depthMap] SgmDepthList: Inflate ROI in function getMinMaxMidNbDepthF…
gregoire-dl Jun 27, 2022
9baf435
[depthMap] SgmDepthList: Fix wrong ROI center in function getDepthsTc
gregoire-dl Jun 27, 2022
e9cd79e
[depthMap] depthMap: Export debug mesh with bounding-boxes pattern pe…
gregoire-dl Jun 28, 2022
95b9cbc
[depthMap] depthMap: Enhance typo/comments/logs
gregoire-dl Jun 28, 2022
d451e5c
[depthMap] Sgm/Refine: Add documentation
gregoire-dl Jun 28, 2022
4e18950
[depthMap] SgmParams: By default use fixed scale = 2, stepXY = 2
gregoire-dl Jun 28, 2022
1dd9800
[mvsUtils] TileParams: Remove function getTileDimensions
gregoire-dl Jun 28, 2022
cf672c9
[software] depthMapEstimation: check min/max view angle
gregoire-dl Jun 28, 2022
5010c68
[software] depthMapEstimation: Check if tile dimensions are able to b…
gregoire-dl Jun 28, 2022
e0a2c69
[mvsUtils] TileParams: Change default size to 1024x1024
gregoire-dl Jun 29, 2022
ed319af
[depthMap] Tile: Use a new Tile structure in SgmDepthList/Sgm/Refine …
gregoire-dl Jun 29, 2022
dc312b2
[depthMap] DepthMapParams: fix typo
gregoire-dl Jun 29, 2022
2e0eec2
[depthMap] depthMap: Fix errors in memory estimation / enhance log in…
gregoire-dl Jun 29, 2022
e58bec5
[software] depthMapEstimation: Fix tileParams wrong initialization sp…
gregoire-dl Jun 29, 2022
02dc640
[depthMap] Cuda: Add CudaDeviceMemoryPitched 3D allocation log info
gregoire-dl Jun 29, 2022
8ad9699
[depthMap] depthMap: Write depth/similarity map at once
gregoire-dl Jun 30, 2022
13bd455
[depthMap] DepthMapParams: Remove mergeTiles option
gregoire-dl Jul 1, 2022
8cd2d51
[depthMap] SgmDepthList: Add camera first/last depth getter
gregoire-dl Jul 1, 2022
c1ff402
[mvsUtils] depthSimMapIO: Fix missing tile error & Add function to re…
gregoire-dl Jul 1, 2022
f0fab28
[mvsData] ROI: Fix unit range error in inflateRange
gregoire-dl Jul 1, 2022
8670388
[depthMap] SgmDepthList: Fix getMinMaxMidNbDepthFromSfM initialize mi…
gregoire-dl Jul 1, 2022
2313bcc
[depthMap] depthMapUtils: export tiles obj in a single file with min/…
gregoire-dl Jul 1, 2022
3e9d595
[mvsUtils] depthSimMapIO: Add margin to tile additive weighting
gregoire-dl Jul 1, 2022
de3951c
[depthMap] SgmDepthList: Reduce thresholds based on landmarks as we a…
gregoire-dl Jul 1, 2022
51c6aef
[depthMap] clamp tile roi to image size
fabiencastan Jul 9, 2022
0d9fb0d
[depthMap] DeviceCache: Print replaced camera id / view id / downscale
gregoire-dl Jul 22, 2022
0da9a40
[depthMap] depthMap: Fix handling of empty ROI tiles
gregoire-dl Jul 22, 2022
4bd69e1
[depthMap] depthMapUtils: Fix handling of empty ROI tiles in merge
gregoire-dl Jul 22, 2022
c750004
[mvsUtils] depthSimMapIO: Fix handling of empty ROI tiles
gregoire-dl Jul 22, 2022
75dd47d
Merge branch 'dev/depthMapStream-rebased' into dev/depthMapImprovements
gregoire-dl Oct 20, 2022
dc9384c
[depthMap] SgmDepthList: Ensure depth list size is not greater than m…
gregoire-dl Oct 13, 2022
b4ab0ae
[depthMap] CudaDeviceMemoryPitched: Fix size method call
gregoire-dl Oct 13, 2022
da5f06a
[depthMap] DepthMapParams: Add useRefine option
gregoire-dl Oct 13, 2022
c742803
[depthMap] RefineParams: Remove constness for scale and stepXY options
gregoire-dl Oct 13, 2022
648bfd3
[depthMap] Cuda: Move eig33.cuh from normalMapping to device folder
gregoire-dl Oct 17, 2022
f992089
[depthMap] planeSweeping: Add function for normals computation from d…
gregoire-dl Oct 17, 2022
d7a5790
[depthMap] depthMapUtils: Add writeDeviceImage for float3 buffer
gregoire-dl Oct 17, 2022
0e1a9fb
[depthMap] Refine: Compute and use normal map on patch computation
gregoire-dl Oct 17, 2022
3a8616a
[depthMap] deviceDepthSimilarityMapKernels: Fix patch index error
gregoire-dl Oct 21, 2022
8d6db21
[depthMap] RefineParams: Disable useNormalMap option
gregoire-dl Oct 21, 2022
1f16d04
[depthMap] deviceDepthSimilarityMap: wsh=4 for cuda_depthSimMapComput…
gregoire-dl Oct 25, 2022
37eee91
[depthMap] deviceDepthSimilarityMap: Add cuda function cuda_normalMap…
gregoire-dl Oct 25, 2022
efb46af
[depthMap] Fix: SGM normal map option for Refine patch computation
gregoire-dl Oct 25, 2022
e9a0003
[depthMap] depthMapUtils: Add first/last depth faces in tile pattern …
gregoire-dl Nov 4, 2022
4a23d90
[depthMap] depthMapUtils: Fix openGL display export
gregoire-dl Nov 4, 2022
1259769
[software] depthMapEstimation: Add SGM option seedsRangeInflate
gregoire-dl Nov 4, 2022
65b4754
[depthMap] Sgm: Update second best uninitialized similarity volume va…
gregoire-dl Nov 4, 2022
6d30c53
[depthMap] Cuda: Fix device memory typo
gregoire-dl Nov 4, 2022
d8eb0f9
[depthMap] Small typo fixes
gregoire-dl Nov 4, 2022
ebd9ed6
[depthMap] Cuda: Add support for device half texture and half volume
gregoire-dl Nov 7, 2022
ccbc135
[depthMap] Cuda: Use preprocessor macros for half type include
gregoire-dl Nov 10, 2022
d2260aa
Merge branch 'develop' into 'dev/depthMapImprovements'
gregoire-dl Nov 16, 2022
2bc244b
[depthMap] SgmDepthList: Quick fix for epipolar line computation
gregoire-dl Nov 16, 2022
e89445d
[depthMap] deviceDepthSimilarityMapKernels: Fix imgColorVariance text…
gregoire-dl Nov 21, 2022
9878cd8
[depthMap] deviceDepthSimilarityMapKernels: Fix typo
gregoire-dl Nov 21, 2022
ad77ea7
[depthMap] deviceDepthSimilarityMap: Fix depthTex binding
gregoire-dl Nov 21, 2022
5932542
[depthMap] deviceColorConversion: Remove pragma once from cu file
gregoire-dl Nov 21, 2022
75d0b4d
[depthMap] memory: fix CudaRGBA wrong Half definition
gregoire-dl Nov 21, 2022
c9ce717
[depthMap] matrix: Use double in angleBetwABandAC computation
gregoire-dl Nov 21, 2022
e93886d
[depthMap] SgmDepthList: Fix use relative magin for min/max depth ra…
gregoire-dl Nov 21, 2022
229befe
[depthMap] SgmDepthList: Add debug logs
gregoire-dl Nov 21, 2022
8f6c9bb
[depthMap] SgmDepthList: Change ROI inflation factor to 1.4
gregoire-dl Nov 22, 2022
eb698c9
[mvsUtils] MultiViewParams: Remove unused method
gregoire-dl Nov 22, 2022
6425864
[mvsUtils] MultiViewParams: Fix tile nearest cameras
gregoire-dl Nov 22, 2022
af2531e
[depthMap] SgmDepthList: Add method getRcTcDepthRangeFromSfM
gregoire-dl Nov 22, 2022
15e0e7c
[depthMap] SgmDepthList: Use min/max depth from SfM to compute the se…
gregoire-dl Nov 22, 2022
e885a0a
[software] depthMapEstimation: Add multiple options for intermediate …
gregoire-dl Nov 23, 2022
eeb26dc
[software] depthMapEstimation: Remove option maxSideXY
gregoire-dl Nov 23, 2022
38aba69
[depthMap] SgmDepthList: Fix epipolar line 2d middle point computation
gregoire-dl Nov 25, 2022
f2b73be
[depthMap] SgmDepthList: Refectoring & use std::vector instead of Sta…
gregoire-dl Nov 28, 2022
c383549
[depthMap] SgmDepthList: Use find instead of an if loop
gregoire-dl Nov 28, 2022
8fa5c10
[depthMap] SgmDepthList: Use tile full-size ROI for observation selec…
gregoire-dl Nov 28, 2022
d2586c4
[depthMap] SgmDepthList: Fix log typo
gregoire-dl Nov 28, 2022
03fdb00
[depthMap] SgmDepthList: Split check in multiple if for readability
gregoire-dl Nov 28, 2022
537b98e
[depthMap] SgmDepthList: Add default min/max/mid depth function
gregoire-dl Nov 28, 2022
546114d
[depthMap] volumeIO: Remove StaticVector header
gregoire-dl Nov 28, 2022
52bb15a
[depthMap] computeOnMultiGPUs: Remove StaticVector header
gregoire-dl Nov 28, 2022
112053d
[depthMap] volumeIO: Remove unused headers
gregoire-dl Nov 28, 2022
7e1b715
[depthMap] Sgm & Refine: Use divideRoundUp instead of ceil
gregoire-dl Nov 28, 2022
99cc417
[mvsUtils] TileParams & depthSimMapIO: use divideRoundUp instead of ceil
gregoire-dl Nov 28, 2022
7639ba5
[depthMap] SgmDepthList: Fix wrong assert condition
gregoire-dl Nov 29, 2022
dbeb1a4
[depthMap] SgmDepthList: Remove default min/max/mid depth function
gregoire-dl Nov 29, 2022
bb6082a
[depthMap] SgmDepthList: Fix errors with debug depth txt files
gregoire-dl Nov 29, 2022
475588a
[depthMap] SgmDepthList: Add check if not enought depth found from SfM
gregoire-dl Nov 29, 2022
6b35161
[depthMap] SgmDepthList: Use continue instead of neasted if
gregoire-dl Nov 29, 2022
9ee7a2a
[depthMap] SgmDepthList: Fix intersection condition error
gregoire-dl Nov 29, 2022
0e79b66
[depthMap] SgmDepthList: Avoid margin to set negative first depth
gregoire-dl Nov 29, 2022
c357602
[depthMap] SgmDepthList: Refactor function computeRcTcDepths
gregoire-dl Nov 29, 2022
7dcc19f
[depthMap] SgmDepthList: Add epsilon to depth comparison in function …
gregoire-dl Nov 30, 2022
f502627
[depthMap] Cuda: Rename hostUtils to divUp
gregoire-dl Dec 7, 2022
7a29185
[depthMap] depthMap: Fix missing ;
gregoire-dl Dec 7, 2022
2fee950
[depthMap] memory: Remove unused and deprecated method bindToTexture
gregoire-dl Dec 7, 2022
3188161
[depthMap] SgmDepthList: Disable checkPair over epipolar segment 3d p…
gregoire-dl Dec 13, 2022
08d983f
[mvsUtils] TileParams: Change tilling layout design
gregoire-dl Dec 13, 2022
00889da
[depthMap] depthMap: Improve scale/stepXY logs
gregoire-dl Dec 13, 2022
99e7091
[depthMap] deviceSimilarityVolumeKernels: Handle case originalDepth e…
gregoire-dl Dec 13, 2022
bb2ad1e
[depthMap] deviceDepthSimilarityMapKernels: Fix use ROI in map upscal…
gregoire-dl Dec 13, 2022
5c48a95
[gpu] gpu: Handle and print cudaMemGetInfo errors
gregoire-dl Dec 13, 2022
39aeea1
[depthMap] depthMap: Update depthMapParams for single tile computation
gregoire-dl Dec 13, 2022
11d5e07
Merge branch 'develop' into 'dev/depthMapImprovements'
gregoire-dl Dec 19, 2022
c9b647a
[depthMap] DepthMapParams: Rename option autoAdjustSmallImage
gregoire-dl Dec 19, 2022
2a1837a
[mvsUtils] TileParams: Fix one line per tile log
gregoire-dl Dec 19, 2022
5dab7a3
[mvsUtils] depthSimMapIO: Fix ROI list from maximum image size
gregoire-dl Dec 19, 2022
0c41d04
[depthMap] SgmParams: Set maxDepths default value to 1500
gregoire-dl Dec 20, 2022
8fd3db3
[depthMap] SgmParams: Add constness to updateUninitializedSim & fix typo
gregoire-dl Dec 20, 2022
96d3ff8
[depthMap] depthMap: Remove hard coded Sgm maximum size
gregoire-dl Dec 20, 2022
72641eb
[mvsUtils] TileParams: Compute tile ROI list from maxDownscale parameter
gregoire-dl Dec 20, 2022
9f04bb2
[depthMap] Cuda: Use half type in Refine similarity volume
gregoire-dl Dec 20, 2022
18a2b09
[depthMap] Cuda: Use half type for RGBA textures
gregoire-dl Dec 20, 2022
7f3d1e6
[depthMap] Cuda: Remove unused variables in depth/sim map optimize ke…
gregoire-dl Jan 6, 2023
e6dac97
[depthMap] Cuda: Fix depth maps computation alpha masking
gregoire-dl Jan 6, 2023
7908450
[fuseCut] Fuser: Fix T camera dimensions error
gregoire-dl Jan 6, 2023
806c60a
[depthMap] depthMapUtils: Fix error in ROI vertices computation
gregoire-dl Jan 9, 2023
a52d19f
[depthMap] Cuda: Rename midDepthSimMap into midDepthPixSizeMap
gregoire-dl Jan 9, 2023
bc0b050
[depthMap] depthMap: Fix override tile padding parameter
gregoire-dl Jan 10, 2023
125fa89
Merge branch 'develop' into dev/depthMapImprovements
gregoire-dl Jan 10, 2023
2e32273
[mvsData] MSVC build fix
fabiencastan Jan 10, 2023
19aa523
[mvsUtils] Tiling: Fix typo
gregoire-dl Jan 10, 2023
697be8a
[depthMap] Tiling: Fix typo
gregoire-dl Jan 10, 2023
c3e94f9
[depthMap] SgmDepthList: Remove maxDepthsPerTc parameter
gregoire-dl Jan 10, 2023
06f1ee1
[depthMap] RefineParams: Rename useRefineFuse & useColorOptimization
gregoire-dl Jan 10, 2023
f7fe269
[software] depthMapEstimation: Update GammaC & GammaP descriptions
gregoire-dl Jan 10, 2023
684cadb
[software] depthMapEstimation: Remove useless parameter check
gregoire-dl Jan 10, 2023
f086910
[software] depthMapEstimation: Update command-line parameters descrip…
gregoire-dl Jan 11, 2023
b880950
[depthMap] RefineParams: Rename optimizationNbIterations parameter
gregoire-dl Jan 11, 2023
a8798d5
[depthMap] RefineParams: Change parameter name and logic for refineHa…
gregoire-dl Jan 11, 2023
cfd2342
[depthMap] SgmParams: Rename depthListPerTile parameter
gregoire-dl Jan 11, 2023
4c91907
[depthMap] Refine: Add information logs
gregoire-dl Jan 11, 2023
9ffe937
[depthMap] Cuda: deviceSimilarityVolume: Impove variable name unifomity
gregoire-dl Jan 11, 2023
cb5d614
[depthMap] Cuda: deviceDepthSimilarityMap: Impove variable name unifo…
gregoire-dl Jan 11, 2023
d535a4b
[software] depthMapEstimation: Improve export parameter descriptions
gregoire-dl Jan 11, 2023
6bffd8b
[depthMap] Cuda: deviceDepthSimilarityMap: Fix wrong texture coordinates
gregoire-dl Jan 13, 2023
96ad376
[depthMap] Cuda: deviceDepthSimilarityMap: Fix Rc texture stepXY
gregoire-dl Jan 16, 2023
0acb24c
[software] depthMapEstimation: Check that SGM downscale is a multiple…
gregoire-dl Jan 16, 2023
4a6a0dc
[depthMap] Cuda: Perform half type operations in float
gregoire-dl Jan 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions src/aliceVision/depthMap/BufPtr.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// This file is part of the AliceVision project.
// Copyright (c) 2017 AliceVision contributors.
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

// allows code sharing between NVCC and other compilers
#if defined(__NVCC__)
#define CUDA_HOST_DEVICE __host__ __device__
#define CUDA_HOST __host__
#else
#define CUDA_HOST_DEVICE
#define CUDA_HOST
#endif

namespace aliceVision {
namespace depthMap {

template <typename T>
class BufPtr
{
public:

CUDA_HOST_DEVICE BufPtr(T* ptr, size_t pitch)
: _ptr( (unsigned char*)ptr )
, _pitch( pitch )
{}

CUDA_HOST_DEVICE inline T* ptr() { return (T*)(_ptr); }
CUDA_HOST_DEVICE inline T* row(size_t y) { return (T*)(_ptr + y * _pitch); }
CUDA_HOST_DEVICE inline T& at(size_t x, size_t y) { return row(y)[x]; }

CUDA_HOST_DEVICE inline const T* ptr() const { return (const T*)(_ptr); }
CUDA_HOST_DEVICE inline const T* row(size_t y) const { return (const T*)(_ptr + y * _pitch); }
CUDA_HOST_DEVICE inline const T& at(size_t x, size_t y) const { return row(y)[x]; }

private:
BufPtr();
BufPtr(const BufPtr&);
BufPtr& operator*=(const BufPtr&);

unsigned char* const _ptr;
const size_t _pitch;
};


template <typename T>
static inline T* get3DBufferAt_h(T* ptr, size_t spitch, size_t pitch, size_t x, size_t y, size_t z)
{
return ((T*)(((char*)ptr) + z * spitch + y * pitch)) + x;
}

template <typename T>
static inline const T* get3DBufferAt_h(const T* ptr, size_t spitch, size_t pitch, size_t x, size_t y, size_t z)
{
return ((const T*)(((const char*)ptr) + z * spitch + y * pitch)) + x;
}

} // namespace depthMap
} // namespace aliceVision

142 changes: 99 additions & 43 deletions src/aliceVision/depthMap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,75 +1,130 @@
# Headers
set(depthMap_files_headers
BufPtr.hpp
computeOnMultiGPUs.hpp
depthMap.hpp
DepthSimMap.hpp
depthMapUtils.hpp
DepthMapParams.hpp
Refine.hpp
RefineParams.hpp
Sgm.hpp
SgmDepthList.hpp
SgmParams.hpp
Tile.hpp
volumeIO.hpp
)

# Sources
set(depthMap_files_sources
computeOnMultiGPUs.cpp
depthMap.cpp
DepthSimMap.cpp
depthMapUtils.cpp
Refine.cpp
Sgm.cpp
SgmParams.cpp
SgmDepthList.cpp
volumeIO.cpp
)

# Cuda Headers
set(depthMap_cuda_files_headers
# Headers
cuda/deviceCommon/device_patch_es_glob.hpp
cuda/planeSweeping/host_utils.h
cuda/planeSweeping/plane_sweeping_cuda.hpp
# deviceCommon
cuda/deviceCommon/device_color.cu
cuda/deviceCommon/device_global.cu
cuda/deviceCommon/device_matrix.cu
cuda/deviceCommon/device_matrix.cuh
cuda/deviceCommon/device_patch_es.cu
cuda/deviceCommon/device_simStat.cu
cuda/deviceCommon/device_operators.cuh
cuda/deviceCommon/device_utils.cuh
cuda/deviceCommon/device_utils.h
# planeSweeping
cuda/planeSweeping/device_code.cu
cuda/planeSweeping/device_code_refine.cu
cuda/planeSweeping/device_code_volume.cu
cuda/planeSweeping/device_code_fuse.cu
# normalmap
cuda/normalmap/device_eig33.cuh
# Cuda Host Headers Only
set(depthMap_cuda_host_headers
cuda/host/LRUCameraCache.hpp
cuda/host/LRUCache.hpp
cuda/host/divUp.hpp
cuda/host/memory.hpp
)

set_source_files_properties(${depthMap_cuda_files_headers}
# Cuda Host Sources
set(depthMap_cuda_host_sources
cuda/host/utils.hpp
cuda/host/utils.cpp
cuda/host/DeviceStreamManager.cpp
cuda/host/DeviceStreamManager.hpp
cuda/host/DeviceCache.cpp
cuda/host/DeviceCache.hpp
cuda/host/DeviceCamera.cpp
cuda/host/DeviceCamera.hpp
)

# device CUDA Headers Only
set(depthMap_cuda_device_headers
cuda/device/buffer.cuh
cuda/device/color.cuh
cuda/device/eig33.cuh
cuda/device/matrix.cuh
cuda/device/operators.cuh
cuda/device/Patch.cuh
cuda/device/SimStat.cuh
)

# device CUDA Sources
set(depthMap_cuda_device_sources
cuda/device/DeviceCameraParams.hpp
cuda/device/DeviceCameraParams.cu
)

# imageProcessing CUDA Sources
set(depthMap_cuda_imageProcessing_sources
cuda/imageProcessing/deviceGaussianFilter.hpp
cuda/imageProcessing/deviceGaussianFilter.cu
cuda/imageProcessing/deviceColorConversion.hpp
cuda/imageProcessing/deviceColorConversion.cu
)

# normalMapping CUDA Headers Only
set(depthMap_cuda_normalMapping_headers
cuda/normalMapping/deviceNormalMapKernels.cuh
)

# normalMapping CUDA Sources
set(depthMap_cuda_normalMapping_sources
cuda/normalMapping/deviceNormalMap.hpp
cuda/normalMapping/deviceNormalMap.cu
cuda/normalMapping/DeviceNormalMapper.hpp
cuda/normalMapping/DeviceNormalMapper.cpp
)

# planeSweeping CUDA Headers Only
set(depthMap_cuda_planeSweeping_headers
cuda/planeSweeping/deviceDepthSimilarityMapKernels.cuh
cuda/planeSweeping/deviceSimilarityVolumeKernels.cuh
)

# planeSweeping CUDA Sources
set(depthMap_cuda_planeSweeping_sources
cuda/planeSweeping/similarity.hpp
cuda/planeSweeping/deviceDepthSimilarityMap.hpp
cuda/planeSweeping/deviceDepthSimilarityMap.cu
cuda/planeSweeping/deviceSimilarityVolume.hpp
cuda/planeSweeping/deviceSimilarityVolume.cu
)

set_source_files_properties(${depthMap_cuda_host_headers}
${depthMap_cuda_device_headers}
${depthMap_cuda_normalMapping_headers}
${depthMap_cuda_planeSweeping_headers}

PROPERTIES HEADER_FILE_ONLY true
)

source_group("aliceVision_depthMap_cuda_host" FILES ${depthMap_cuda_host_headers} ${depthMap_cuda_host_sources})
source_group("aliceVision_depthMap_cuda_device" FILES ${depthMap_cuda_device_headers} ${depthMap_cuda_device_sources})
source_group("aliceVision_depthMap_cuda_imageProcessing" FILES ${depthMap_cuda_imageProcessing_sources})
source_group("aliceVision_depthMap_cuda_normalMapping" FILES ${depthMap_cuda_normalMapping_headers} ${depthMap_cuda_normalMapping_sources})
source_group("aliceVision_depthMap_cuda_planeSweeping" FILES ${depthMap_cuda_planeSweeping_headers} ${depthMap_cuda_planeSweeping_sources})

# Cuda Sources
set(depthMap_cuda_files_sources
cuda/commonStructures.hpp
cuda/FrameCacheMemory.cpp
cuda/FrameCacheMemory.hpp
cuda/LRUCache.hpp
cuda/OneTC.hpp
cuda/PlaneSweepingCuda.cpp
cuda/PlaneSweepingCuda.hpp
cuda/planeSweeping/plane_sweeping_cuda.hpp
cuda/planeSweeping/plane_sweeping_cuda.cu
cuda/normalmap/normal_map.hpp
cuda/normalmap/normal_map.cu
cuda/images/gauss_filter.hpp
cuda/images/gauss_filter.cu
${depthMap_cuda_files_headers}
${depthMap_cuda_host_headers}
${depthMap_cuda_host_sources}
${depthMap_cuda_device_headers}
${depthMap_cuda_device_sources}
${depthMap_cuda_imageProcessing_sources}
${depthMap_cuda_normalMapping_headers}
${depthMap_cuda_normalMapping_sources}
${depthMap_cuda_planeSweeping_headers}
${depthMap_cuda_planeSweeping_sources}
)

source_group("aliceVision_depthMap_cuda" FILES ${depthMap_cuda_files_sources})

alicevision_add_library(aliceVision_depthMap
USE_CUDA
SOURCES
Expand All @@ -81,6 +136,7 @@ alicevision_add_library(aliceVision_depthMap
aliceVision_mvsUtils
aliceVision_system
Boost::filesystem
assimp::assimp
${CUDA_CUDADEVRT_LIBRARY}
${CUDA_CUBLAS_LIBRARIES} #TODO shouldn't be here, but required to build on some machines
PRIVATE_LINKS
Expand Down
37 changes: 37 additions & 0 deletions src/aliceVision/depthMap/DepthMapParams.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// This file is part of the AliceVision project.
// Copyright (c) 2022 AliceVision contributors.
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include <aliceVision/mvsUtils/TileParams.hpp>
#include <aliceVision/depthMap/SgmParams.hpp>
#include <aliceVision/depthMap/RefineParams.hpp>

namespace aliceVision {
namespace depthMap {

/**
* @brief Depth Map Parameters
*/
struct DepthMapParams
{
// user parameters

mvsUtils::TileParams tileParams; //< tiling parameters
SgmParams sgmParams; //< parameters of Sgm process
RefineParams refineParams; //< parameters of Refine process
int maxTCams = 10; //< global T cameras maximum
bool chooseTCamsPerTile = true; //< choose T cameras per R tile or for the entire R image
bool exportTilePattern = false; //< export tile pattern obj
bool autoAdjustSmallImage = true; //< allow program to override parameters for the single tile case

// constant parameters

const bool useRefine = true; //< for debug purposes: enable or disable Refine process
};

} // namespace depthMap
} // namespace aliceVision
Loading