-
-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dev/hdrMerge_autoRefLevel
- Loading branch information
Showing
102 changed files
with
9,585 additions
and
6,983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.