From 759799defe3e388bc9ec7255c79895138194e4fa Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sat, 17 Mar 2007 21:47:58 +0100 Subject: show sample points in separate window --- src/Stitch.cxx | 8 ++++---- src/gipfel.cxx | 14 +++++++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Stitch.cxx b/src/Stitch.cxx index db5d396..7ed97a0 100644 --- a/src/Stitch.cxx +++ b/src/Stitch.cxx @@ -107,7 +107,7 @@ Stitch::vignette_calib(GipfelWidget::sample_mode_t m, int merged_pixel_set; double radius = (double) w / (view_end -view_start); - int max_samples = 10000 * 3, n_samples = 0; + int max_samples = 20000 * 3, n_samples = 0; int ret; int n_vars = 2 + num_pics * 3 ; gsl_matrix *X, *cov; @@ -173,9 +173,9 @@ Stitch::vignette_calib(GipfelWidget::sample_mode_t m, c2[0] > MAX_VALUE * 0.1 && c2[1] > MAX_VALUE * 0.1 && c2[2] > MAX_VALUE * 0.1 && - fabs(c1d[1] / c1d[0] - c2d[1] / c2d[0]) < 0.02 && - fabs(c1d[1] / c1d[2] - c2d[1] / c2d[2]) < 0.02 && - fabs(c1d[2] / c1d[0] - c2d[2] / c2d[0]) < 0.02 ) { + fabs(c1d[1] / c1d[0] - c2d[1] / c2d[0]) < 0.05 && + fabs(c1d[1] / c1d[2] - c2d[1] / c2d[2]) < 0.05 && + fabs(c1d[2] / c1d[0] - c2d[2] / c2d[0]) < 0.05 ) { for (int l = 0; l<3; l++) { gsl_vector_set(wv, n_samples, 1.0); diff --git a/src/gipfel.cxx b/src/gipfel.cxx index e9743d8..410471d 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -569,6 +569,17 @@ stitch(GipfelWidget::sample_mode_t m, } + if (type & STITCH_VIGNETTE_CALIB) { + win = new Fl_Window(0,0, 1000, 400); + scroll = new Fl_Scroll(0, 0, win->w(), win->h()); + PreviewOutputImage *img = + new PreviewOutputImage(0, 0, 1000, 400); + + win->resizable(scroll); + win->show(0, argv); + st->set_output((OutputImage*) img); + st->vignette_calib(m, stitch_w, stitch_h, from, to); + } if (type & STITCH_JPEG) { st->set_output((OutputImage*) new JPEGOutputImage(path, 90)); @@ -600,9 +611,6 @@ stitch(GipfelWidget::sample_mode_t m, win->show(0, argv); st->set_output((OutputImage*) img); - if (type & STITCH_VIGNETTE_CALIB) { - st->vignette_calib(m, stitch_w, stitch_h, from, to); - } st->resample(m, stitch_w, stitch_h, from, to); img->redraw(); -- cgit v1.2.3