@@ -95,10 +95,10 @@ void normalIntegration(const sfmData::SfMData& sfmData,
95
95
96
96
if (sfmData.getPoses ().size () > 0 )
97
97
{
98
- for (auto & poseIt : sfmData.getPoses ())
98
+ for (auto & [idPose, cameraPose] : sfmData.getPoses (). valueRange ())
99
99
{
100
100
// Read associated normal map :
101
- image::readImage (inputPath + " /" + std::to_string (poseIt. first ) + " _normals.png" , normalsImPNG, image::EImageColorSpace::NO_CONVERSION);
101
+ image::readImage (inputPath + " /" + std::to_string (idPose ) + " _normals.png" , normalsImPNG, image::EImageColorSpace::NO_CONVERSION);
102
102
103
103
int nbCols = normalsImPNG.cols ();
104
104
int nbRows = normalsImPNG.rows ();
@@ -107,7 +107,7 @@ void normalIntegration(const sfmData::SfMData& sfmData,
107
107
for (auto & viewIt : sfmData.getViews ())
108
108
{
109
109
poseId = viewIt.second ->getPoseId ();
110
- if (poseId == poseIt. first )
110
+ if (poseId == idPose )
111
111
{
112
112
viewId = viewIt.first ;
113
113
// Get intrinsics associated with this view :
@@ -184,10 +184,10 @@ void normalIntegration(const sfmData::SfMData& sfmData,
184
184
// AliceVision uses distance-to-origin convention
185
185
convertZtoDistance (depthMap, distanceMap, K);
186
186
187
- std::string pathToDM = outputFolder + " /" + std::to_string (poseIt. first ) + " _depthMap.exr" ;
187
+ std::string pathToDM = outputFolder + " /" + std::to_string (idPose ) + " _depthMap.exr" ;
188
188
189
189
// Create pose for metadata
190
- const geometry::Pose3 pose = poseIt. second .getTransform ();
190
+ const geometry::Pose3 pose = cameraPose .getTransform ();
191
191
std::shared_ptr<camera::IntrinsicBase> cam = sfmData.getIntrinsics ().at (intrinsicId);
192
192
std::shared_ptr<camera::Pinhole> camPinHole = std::dynamic_pointer_cast<camera::Pinhole>(cam);
193
193
Mat34 P = camPinHole->getProjectiveEquivalent (pose);
0 commit comments