kopia lustrzana https://github.com/OpenDroneMap/ODM
rodzic
7549af1f69
commit
e830298797
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#GPL2 jmenezes ODM extract exif lon/lat project to utm with proj4; 2017-05-28
|
||||||
|
# line 23 tab bugfix 2017-07-11
|
||||||
|
# apt-get install exiftool geotiff-bin
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
echo "run inside /images/ directory" 1>&2
|
||||||
|
echo $(basename $0)" zone [S|N] > camera_wgs84utm.txt" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
Z=$1
|
||||||
|
case $2 in
|
||||||
|
s|S) printf "EPSG:327%02d\n" $Z; H=south
|
||||||
|
;;
|
||||||
|
n|N) printf "EPSG:326%02d\n" $Z; H=north
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
for i in *[jpg,JPG,tif,TIF]; do
|
||||||
|
exiftool $i | grep GPS | grep Position | \
|
||||||
|
awk -F \: -v img=$i '{ print $2","img }' | tr -d [:blank:] | \
|
||||||
|
sed s/deg/d/g | tr \, \\t | awk '{ print $2,$1,$3 }' | \
|
||||||
|
proj -f "%.3f" +proj=utm +zone=$Z +$H +ellps=WGS84
|
||||||
|
done | sed s/\ /\\t/g
|
||||||
|
exit 0
|
|
@ -1,4 +1,4 @@
|
||||||
// to format log_ output
|
// to format log_ output; version 2018-02-18
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -19,7 +19,7 @@ std::ostream& operator<<(std::ostream &os, const GeorefSystem &geo)
|
||||||
}
|
}
|
||||||
|
|
||||||
GeorefGCP::GeorefGCP()
|
GeorefGCP::GeorefGCP()
|
||||||
:x_(0.0), y_(0.0), z_(0.0), use_(false), localX_(0.0), localY_(0.0), localZ_(0.0),cameraIndex_(0), pixelX_(0.0), pixelY_(0.0), image_("")
|
:x_(0.0), y_(0.0), z_(0.0), use_(false), localX_(0.0), localY_(0.0), localZ_(0.0),cameraIndex_(0), pixelX_(0.0), pixelY_(0.0), image_(""), idgcp_("")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ GeorefGCP::~GeorefGCP()
|
||||||
|
|
||||||
void GeorefGCP::extractGCP(std::istringstream &gcpStream)
|
void GeorefGCP::extractGCP(std::istringstream &gcpStream)
|
||||||
{
|
{
|
||||||
gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_;
|
gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_ >> idgcp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3 GeorefGCP::getPos()
|
Vec3 GeorefGCP::getPos()
|
||||||
|
@ -687,7 +687,7 @@ void Georef::readGCPs()
|
||||||
++nrGCPs;
|
++nrGCPs;
|
||||||
|
|
||||||
// log_<<"x_: "<<gcp.x_<<" y_: "<<gcp.y_<<" z_: "<<gcp.z_<<" pixelX_: "<<gcp.pixelX_<<" pixelY_: "<<gcp.pixelY_<<" image: "<<gcp.image_<<"\n";
|
// 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_<<"\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
|
// Check if the GCPs have corresponding images in the bundle files and if they don't, remove them from the GCP-list
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct GeorefGCP
|
||||||
double pixelY_; /**< The pixels y-position for the GCP in the corresponding image **/
|
double pixelY_; /**< The pixels y-position for the GCP in the corresponding image **/
|
||||||
|
|
||||||
std::string image_; /**< The corresponding image for the GCP **/
|
std::string image_; /**< The corresponding image for the GCP **/
|
||||||
|
std::string idgcp_; /**< The corresponding identification for the GCP **/
|
||||||
|
|
||||||
GeorefGCP();
|
GeorefGCP();
|
||||||
~GeorefGCP();
|
~GeorefGCP();
|
||||||
|
|
Ładowanie…
Reference in New Issue