kopia lustrzana https://github.com/OpenDroneMap/ODM
Merge branch 'master' of https://github.com/OpenDroneMap/OpenDroneMap into reflectance
commit
7b94d25c0c
|
@ -278,7 +278,7 @@ inline T maxRange(){
|
|||
|
||||
template <typename T>
|
||||
void OdmOrthoPhoto::initBands(int count){
|
||||
size_t pixelCount = static_cast<size_t>(width * height);
|
||||
size_t pixelCount = static_cast<size_t>(width) * static_cast<size_t>(height);
|
||||
|
||||
// Channels
|
||||
for (int i = 0; i < count; i++){
|
||||
|
@ -292,7 +292,7 @@ void OdmOrthoPhoto::initBands(int count){
|
|||
|
||||
template <typename T>
|
||||
void OdmOrthoPhoto::initAlphaBand(){
|
||||
size_t pixelCount = static_cast<size_t>(width * height);
|
||||
size_t pixelCount = static_cast<size_t>(width) * static_cast<size_t>(height);
|
||||
// Alpha
|
||||
if (alphaBand == nullptr){
|
||||
T *arr = new T[pixelCount];
|
||||
|
@ -308,7 +308,7 @@ void OdmOrthoPhoto::finalizeAlphaBand(){
|
|||
// Adjust alpha band values, only pixels that have
|
||||
// values on all bands should be visible
|
||||
|
||||
size_t pixelCount = static_cast<size_t>(width * height);
|
||||
size_t pixelCount = static_cast<size_t>(width) * static_cast<size_t>(height);
|
||||
int channels = bands.size();
|
||||
|
||||
T *arr = reinterpret_cast<T *>(alphaBand);
|
||||
|
@ -935,7 +935,7 @@ void OdmOrthoPhoto::renderPixel(int row, int col, float s, float t, const cv::Ma
|
|||
top = static_cast<int>(topF);
|
||||
|
||||
// The interpolated color values.
|
||||
size_t idx = static_cast<size_t>(row * width + col);
|
||||
size_t idx = static_cast<size_t>(row) * static_cast<size_t>(width) + static_cast<size_t>(col);
|
||||
T *data = reinterpret_cast<T *>(texture.data); // Faster access
|
||||
int numChannels = texture.channels();
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue