From 99bf70b3a6874a425dece5fc46de60656201c5f8 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sat, 16 Dec 2006 09:14:53 +0100 Subject: remove u0 v0 stuff completely --- src/GipfelWidget.cxx | 8 +++----- src/ImageMetaData.H | 6 ++---- src/ImageMetaData.cxx | 20 ++++++-------------- src/ProjectionTangentialLSQ.cxx | 2 -- src/ViewParams.H | 2 -- 5 files changed, 11 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index f63cc67..aa8469f 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -101,9 +101,8 @@ GipfelWidget::load_image(char *file) { set_tilt_angle(md->get_tilt()); set_projection((Projection::Projection_t) md->get_projection_type()); set_focal_length_35mm(md->get_focal_length_35mm()); - md->get_distortion_params(&pan->parms.k0, &pan->parms.k1, - &pan->parms.u0, &pan->parms.v0); - fprintf(stderr, "%f %f %f %f\n", pan->parms.k0, pan->parms.k1, pan->parms.u0, pan->parms.v0); + md->get_distortion_params(&pan->parms.k0, &pan->parms.k1); + fprintf(stderr, "%f %f\n", pan->parms.k0, pan->parms.k1); delete md; return 0; @@ -134,8 +133,7 @@ GipfelWidget::save_image(char *file) { md->set_tilt(get_tilt_angle()); md->set_focal_length_35mm(get_focal_length_35mm()); md->set_projection_type((int) get_projection()); - md->set_distortion_params(pan->parms.k0, pan->parms.k1, - pan->parms.u0, pan->parms.v0); + md->set_distortion_params(pan->parms.k0, pan->parms.k1); ret = md->save_image(img_file, file); delete md; diff --git a/src/ImageMetaData.H b/src/ImageMetaData.H index e2d8044..da63db6 100644 --- a/src/ImageMetaData.H +++ b/src/ImageMetaData.H @@ -41,8 +41,7 @@ class ImageMetaData { double get_tilt(); double get_focal_length_35mm(); int get_projection_type(); - void get_distortion_params(double *_k0, double *_k1, - double *_u0, double *_v0); + void get_distortion_params(double *_k0, double *_k1); void set_longitude(double v); void set_latitude(double v); @@ -52,7 +51,6 @@ class ImageMetaData { void set_tilt(double v); void set_focal_length_35mm(double v); void set_projection_type(int v); - void set_distortion_params(double _k0, double _k1, - double _u0, double _v0); + void set_distortion_params(double _k0, double _k1); }; #endif diff --git a/src/ImageMetaData.cxx b/src/ImageMetaData.cxx index 78f899c..d59db9d 100644 --- a/src/ImageMetaData.cxx +++ b/src/ImageMetaData.cxx @@ -128,7 +128,7 @@ ImageMetaData::load_image_exif(char *name) { #define GIPFEL_FORMAT_1 "gipfel: longitude %lf, latitude %lf, height %lf, direction %lf, nick %lf, tilt %lf, scale %lf, projection type %d" -#define GIPFEL_FORMAT_2 "gipfel: longitude %lf, latitude %lf, height %lf, direction %lf, nick %lf, tilt %lf, focal_length_35mm %lf, projection type %d, k0 %lf, k1 %lf, u0 %lf, v0 %lf" +#define GIPFEL_FORMAT_2 "gipfel: longitude %lf, latitude %lf, height %lf, direction %lf, nick %lf, tilt %lf, focal_length_35mm %lf, projection type %d, k0 %lf, k1 %lf" int ImageMetaData::load_image_jpgcom(char *name) { @@ -137,7 +137,7 @@ ImageMetaData::load_image_jpgcom(char *name) { pid_t pid; int status; char buf[1024]; - double lo, la, he, dir, ni, ti, fr, _k0, _k1, _u0, _v0; + double lo, la, he, dir, ni, ti, fr, _k0, _k1; int pt; int n, ret = 1; @@ -150,7 +150,7 @@ ImageMetaData::load_image_jpgcom(char *name) { if (p) { while (fgets(buf, sizeof(buf), p) != NULL) { if ((n = sscanf(buf, GIPFEL_FORMAT_2, - &lo, &la, &he, &dir, &ni, &ti, &fr, &pt, &_k0, &_k1, &_u0, &_v0)) >= 8) { + &lo, &la, &he, &dir, &ni, &ti, &fr, &pt, &_k0, &_k1)) >= 8) { longitude = lo; latitude = la; @@ -161,11 +161,9 @@ ImageMetaData::load_image_jpgcom(char *name) { focal_length_35mm = fr; projection_type = pt; - if (n >= 12) { + if (n >= 10) { k0 = _k0; k1 = _k1; - u0 = _u0; - v0 = _v0; } ret = 0; @@ -352,19 +350,13 @@ ImageMetaData::set_projection_type(int v) { } void -ImageMetaData::get_distortion_params(double *_k0, double *_k1, - double *_u0, double *_v0) { +ImageMetaData::get_distortion_params(double *_k0, double *_k1) { *_k0 = k0; *_k1 = k1; - *_u0 = u0; - *_v0 = v0; } void -ImageMetaData::set_distortion_params(double _k0, double _k1, - double _u0, double _v0) { +ImageMetaData::set_distortion_params(double _k0, double _k1) { k0 = _k0; k1 = _k1; - u0 = _u0; - v0 = _v0; } diff --git a/src/ProjectionTangentialLSQ.cxx b/src/ProjectionTangentialLSQ.cxx index 059ad5d..a2ca449 100644 --- a/src/ProjectionTangentialLSQ.cxx +++ b/src/ProjectionTangentialLSQ.cxx @@ -43,8 +43,6 @@ ProjectionTangentialLSQ::comp_params(const Hills *h, ViewParams *parms) { fprintf(stderr, "Performing calibration\n"); parms->k0 = 0.0; parms->k1 = 0.0; - parms->u0 = 0.0; - parms->v0 = 0.0; } m1 = h->get(0); diff --git a/src/ViewParams.H b/src/ViewParams.H index ee18fa6..2048fe2 100644 --- a/src/ViewParams.H +++ b/src/ViewParams.H @@ -15,8 +15,6 @@ class ViewParams { double a_tilt; double k0; double k1; - double u0; - double v0; }; #endif -- cgit v1.2.3