@@ -22,7 +22,8 @@ int main(int argc, char *argv[]) {
22
22
#endif
23
23
24
24
QString depthmapPath = base + " testcenterRel_copia/photogrammetry/Malt/Z_Num7_DeZoom4_STD-MALT.tif" ;
25
- QString orientationXmlPath = base + " testcenterRel_copia/photogrammetry/Ori-Relative/Orientation-L05C12.tif.xml" ;
25
+ QString cameraDepthmap = base + " testcenterRel_copia/datasets/L04C12_depth_rti.tiff" ;
26
+ QString orientationXmlPath = base + " testcenterRel_copia/photogrammetry/Ori-Relative/Orientation-L04C12.tif.xml" ;
26
27
QString maskPath = base + " testcenterRel_copia/photogrammetry/Malt/Masq_STD-MALT_DeZoom4.tif" ;
27
28
QString plyFile = base +" testcenterRel_copia/photogrammetry/AperiCloud_Relative__mini.ply" ;
28
29
Depthmap depth;
@@ -31,6 +32,7 @@ int main(int argc, char *argv[]) {
31
32
QString outputPath = base + " testcenterRel_copia/photogrammetry/depthmap_projectL05C13.png" ;
32
33
QString output_mask = base + " testcenterRel_copia/photogrammetry/mask_test.tif" ;
33
34
QString output_depth = base + " testcenterRel_copia/photogrammetry/depth_test.tif" ;
35
+ QString output_points = base + " testcenterRel_copia/photogrammetry/points_h.txt" ;
34
36
35
37
OrthoDepthmap ortho;
36
38
@@ -52,19 +54,21 @@ int main(int argc, char *argv[]) {
52
54
ortho.verifyPointCloud ();
53
55
ortho.fitLinearRegressionFromPairs ();
54
56
55
- Camera camera;
56
- camera.loadXml (orientationXmlPath);
57
57
CameraDepthmap depthCam;
58
58
// xml per camera e tiff per la depth map
59
59
depthCam.camera .loadXml (orientationXmlPath);
60
- depthCam.loadDepth (qPrintable (depthmapPath));
61
- ortho.integratedCamera (depthCam);
60
+ depthCam.loadDepth (qPrintable (cameraDepthmap));
61
+ if (depthCam.width != depthCam.camera .width || depthCam.height != depthCam.camera .height ){
62
+ cerr << " width is not the same" << endl;
63
+ return -1 ;
64
+ }
65
+ ortho.integratedCamera (depthCam, qPrintable (output_points));
62
66
63
67
64
68
// int pixelX = 165;
65
69
// int pixelY = 144;
66
70
// float pixelZ = 4.5;
67
- ortho.projectToCameraDepthMap (camera, outputPath);
71
+ ortho.projectToCameraDepthMap (depthCam. camera , outputPath);
68
72
Eigen::Matrix3f rotationMatrix;
69
73
Eigen::Vector3f center;
70
74
@@ -144,8 +148,8 @@ lineare per la serie di coppie per trovare a e b). Pesa i punti.
144
148
// realCoordinates[2] = -10.4198828;
145
149
// Eigen::Vector3f imageCoords = camera.projectionToImage(realCoordinates);
146
150
147
- cout << " Rotation matrix:" << endl << camera.rotation << endl;
148
- cout << " Central vector: (" << camera.center << endl;
151
+ // cout << "Rotation matrix:"<< endl << camera.rotation << endl;
152
+ // cout << "Central vector: (" << camera.center << endl;
149
153
// cout << "Real coordinates: (" << realCoordinates[0] << ", "
150
154
// << realCoordinates[1] << ", " << realCoordinates[2] << ")" << endl;
151
155
0 commit comments