kopia lustrzana https://github.com/OpenDroneMap/ODM
rodzic
034c30575b
commit
eecf475bdf
modules/odm_georef/src
tests/test_data
|
@ -29,7 +29,8 @@ GeorefGCP::~GeorefGCP()
|
|||
|
||||
void GeorefGCP::extractGCP(std::istringstream &gcpStream)
|
||||
{
|
||||
gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_ >> idgcp_;
|
||||
// gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_;
|
||||
gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_ >> idgcp_;
|
||||
}
|
||||
|
||||
Vec3 GeorefGCP::getPos()
|
||||
|
@ -682,7 +683,9 @@ void Georef::readGCPs()
|
|||
{
|
||||
std::istringstream istr(gcpString);
|
||||
GeorefGCP gcp;
|
||||
if ( ! gcpString[0] || gcpString[0] == '#' ) { /* skip comments */
|
||||
// if ( ! gcpString[0] || gcpString[0] == '#' ) { /* skip comments */
|
||||
//TODO skip empty lines too
|
||||
if ( istr.peek() == '#' || istr.peek() == '\r' || istr.peek() == '\n' ) { /* skip comments */
|
||||
continue;
|
||||
}
|
||||
gcp.extractGCP(istr);
|
||||
|
@ -690,7 +693,7 @@ void Georef::readGCPs()
|
|||
++nrGCPs;
|
||||
|
||||
// log_<<"x_: "<<gcp.x_<<" y_: "<<gcp.y_<<" z_: "<<gcp.z_<<" pixelX_: "<<gcp.pixelX_<<" pixelY_: "<<gcp.pixelY_<<" image: "<<gcp.image_<<"\n";
|
||||
log_<< setiosflags(ios::fixed) << setprecision(3) <<"x_: "<< gcp.x_ <<" y_: "<< gcp.y_<<" z_: "<< gcp.z_ <<" pixelX_: "<<gcp.pixelX_<<" pixelY_: "<<gcp.pixelY_<<" image: "<<gcp.image_ <<" idgcp_: " << gcp.idgcp_ << "\n"; // more readeable
|
||||
log_<< setiosflags(ios::fixed) << setprecision(3) << "x_: " << gcp.x_ << " y_: " << gcp.y_<< " z_: " << gcp.z_ <<" pixelX_: " << gcp.pixelX_ << " pixelY_: " << gcp.pixelY_ << " image: " << gcp.image_ << " idgcp_: " << gcp.idgcp_ << '\n'; // more readeable
|
||||
}
|
||||
|
||||
// Check if the GCPs have corresponding images in the bundle files and if they don't, remove them from the GCP-list
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
EPSG:32617
|
||||
## comment: the first line must contain EPSG. ( mandatory )
|
||||
## x1 y1 z1 pixelx1 pixely1 imagename1 idGCP
|
||||
## 0/0 of Pixel Coord = Upper left corner pixelX(column_0..) pixelY(row_0..)
|
||||
## x1 y1 z1 pixelx1 pixely1 imagename1 idGCP ( idGCP optional )
|
||||
# order by GCP
|
||||
# GCP01
|
||||
274914.738 4603349.014 400 1229.676 514.215 DJI_0068.JPG HV01
|
||||
274914.738 4603349.014 400 1268.023 31.309 DJI_0104.JPG HV01
|
||||
#274914.738 4603349.014 400 1350.499 -1506.619 1JI_0076.JPG badHV01
|
||||
274914.738 4603349.014 400 1350.499 1506.619 1JI_0076.JPG HV01
|
||||
# this is a comment. skip this and empty lines
|
||||
|
||||
# GCP02
|
||||
274915.887 4603307.715 400 1276.695 1043.561 DJI_0068.JPG HV02
|
||||
274915.887 4603307.715 400 750.239 81.604 DJI_0104.JPG HV02
|
||||
274915.887 4603307.715 400 336.897 634.845 DJI_0083.JPG HV02
|
||||
274915.887 4603307.715 400 1344.332 956.654 1JI_0076.JPG HV02
|
||||
# this is a comment, skip
|
||||
# GCP02, no idGCP ( old format )
|
||||
274915.887 4603307.715 400 1276.695 1043.561 DJI_0068.JPG
|
||||
274915.887 4603307.715 400 750.239 81.604 DJI_0104.JPG
|
||||
274915.887 4603307.715 400 336.897 634.845 DJI_0083.JPG
|
||||
274915.887 4603307.715 400 1344.332 956.654 1JI_0076.JPG
|
||||
# GCP03
|
||||
274985.284 4603319.756 400 2125.152 841.227 DJI_0068.JPG HV03
|
||||
274985.284 4603319.756 400 919.044 903.661 DJI_0104.JPG HV03
|
||||
|
|
|
@ -27,40 +27,33 @@ GCP_PointNr,X_Coordinate,Y_Coordinate
|
|||
|
||||
-----------
|
||||
Better human readable gcp_list.txt
|
||||
----
|
||||
WGS84 UTM 32N
|
||||
## x1 y1 z1 pixelx1 pixely1 imagename1
|
||||
## 0/0 of Pixel Coordinate = Upper left hand corner
|
||||
|
||||
|
||||
|
||||
# GCP 1
|
||||
274914.738,4603349.014,400,2121.02804,-405.91779,DJI_0068.JPG
|
||||
274914.738,4603349.014,400,2113.45101,-52.37843,DJI_0104.JPG
|
||||
274914.738,4603349.014,400,2251.05140,-2510.08324,1JI_0076.JPG
|
||||
|
||||
|
||||
# GCP 2
|
||||
274915.887,4603307.715,400,2189.08075,-1266.93925,DJI_0068.JPG
|
||||
274915.887,4603307.715,400,1249.52906,-136.41574,DJI_0104.JPG
|
||||
274915.887,4603307.715,400561.05432,-1057.69568,DJI_0083.JPG
|
||||
274915.887,4603307.715,400,2239.44947,-1593.32652,1JI_0076.JPG
|
||||
|
||||
# GCP 3
|
||||
274985.284,4603319.756,400,3619.20999,-978.85879,DJI_0068.JPG
|
||||
274985.284,4603319.756,400,1506.89252,-1535.16355,DJI_0104.JPG
|
||||
274985.284,4603319.756,400,783.53534,-1793.26811,1JI_0076.JPG
|
||||
|
||||
|
||||
# GCP 4
|
||||
274920.710,4603258.802,400,2342.84463,-2285.96671,DJI_0068.JPG
|
||||
274920.710,4603258.802,400,305.37748,-303.36595,DJI_0104.JPG
|
||||
274920.710,4603258.802,400,1531.52745,-896.39311,DJI_0083.JPG
|
||||
274920.710,4603258.802,400,3671.08645,-2198.67114,DJI_0063.JPG
|
||||
274920.710,4603258.802,400.1007.75409,-1286.05432,DJI_0074.JPG
|
||||
|
||||
# GCP 5
|
||||
274879.571,4603204.279,400,2693.25350,-1682.97313,DJI_0083.JPG
|
||||
274879.571,4603204.279,400,2513.14252,-1413.82886,DJI_0063.JPG
|
||||
274879.571,4603204.279,400,2150.56951,-2093.38493,DJI_0074.JPG
|
||||
|
||||
-----------
|
||||
EPSG:32617
|
||||
## comment: the first line must contain EPSG. ( mandatory )
|
||||
## x1 y1 z1 pixelx1 pixely1 imagename1 idGCP
|
||||
## 0/0 of Pixel Coord = Upper left corner pixelX(column_0..) pixelY(row_0..)
|
||||
# GCP01
|
||||
274914.738 4603349.014 400 1229.676 514.215 DJI_0068.JPG HV01
|
||||
274914.738 4603349.014 400 1268.023 31.309 DJI_0104.JPG HV01
|
||||
274914.738 4603349.014 400 1350.499 1506.619 1JI_0076.JPG HV01
|
||||
# this is a comment, skip.
|
||||
# GCP02, no idGCP ( old format )
|
||||
274915.887 4603307.715 400 1276.695 1043.561 DJI_0068.JPG
|
||||
274915.887 4603307.715 400 750.239 81.604 DJI_0104.JPG
|
||||
274915.887 4603307.715 400 336.897 634.845 DJI_0083.JPG
|
||||
274915.887 4603307.715 400 1344.332 956.654 1JI_0076.JPG
|
||||
# GCP03
|
||||
274985.284 4603319.756 400 2125.152 841.227 DJI_0068.JPG HV03
|
||||
274985.284 4603319.756 400 919.044 903.661 DJI_0104.JPG HV03
|
||||
274985.284 4603319.756 400 483.157 1088.268 1JI_0076.JPG HV03
|
||||
# GCP04
|
||||
274920.710 4603258.802 400 1376.513 1662.513 DJI_0068.JPG HV04
|
||||
274920.710 4603258.802 400 183.508 181.808 DJI_0104.JPG HV04
|
||||
274920.710 4603258.802 400 919.236 537.724 DJI_0083.JPG HV04
|
||||
274920.710 4603258.802 400 2202.425 1319.122 DJI_0063.JPG HV04
|
||||
274920.710 4603258.802 400 604.750 771.373 DJI_0074.JPG HV04
|
||||
# GCP05
|
||||
274879.571 4603204.279 400 1617.581 1008.779 DJI_0083.JPG HV05
|
||||
274879.571 4603204.279 400 1505.237 849.416 DJI_0063.JPG HV05
|
||||
274879.571 4603204.279 400 1291.725 1257.747 DJI_0074.JPG HV05
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@ EPSG:32617
|
|||
## comment: the first line must contain EPSG. ( mandatory )
|
||||
## x1 y1 z1 pixelx1 pixely1 imagename1 idGCP
|
||||
## 0/0 of Pixel Coord = Upper left corner pixelX(column_0..) pixelY(row_0..)
|
||||
# this is a comment. skip this and empty lines
|
||||
|
||||
# this is a comment. skip
|
||||
# order by photo
|
||||
274920.710 4603258.802 400 2202.425 1319.122 DJI_0063.JPG HV04
|
||||
274879.571 4603204.279 400 1505.237 849.416 DJI_0063.JPG HV05
|
||||
|
|
Ładowanie…
Reference in New Issue