~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina6/tina-tools/tinatool/tlvision/tlvisCorr_tool.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**********
  2  *
  3  * Copyright (c) 2003, Division of Imaging Science and Biomedical Engineering,
  4  * University of Manchester, UK.  All rights reserved.
  5  *
  6  * Redistribution and use in source and binary forms, with or without modification,
  7  * are permitted provided that the following conditions are met:
  8  *
  9  *   . Redistributions of source code must retain the above copyright notice,
 10  *     this list of conditions and the following disclaimer.
 11  *
 12  *   . Redistributions in binary form must reproduce the above copyright notice,
 13  *     this list of conditions and the following disclaimer in the documentation
 14  *     and/or other materials provided with the distribution.
 15  *
 16  *   . Neither the name of the University of Manchester nor the names of its
 17  *     contributors may be used to endorse or promote products derived from this
 18  *     software without specific prior written permission.
 19  *
 20  *
 21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 31  * POSSIBILITY OF SUCH DAMAGE.
 32  *
 33  **********
 34  *
 35  * Program :   TINA
 36  * File    :  $Source: /home/tina/cvs/tina-tools/tinatool/tlvision/tlvisCorr_tool.c,v $
 37  * Date    :  $Date: 2009/03/27 16:01:50 $
 38  * Version :  $Revision: 1.4 $
 39  * CVS Id  :  $Id: tlvisCorr_tool.c,v 1.4 2009/03/27 16:01:50 paul Exp $
 40  *
 41  * Notes :
 42  *
 43  *
 44  *
 45  *********
 46 */
 47 
 48 #include <stdio.h>
 49 #include <limits.h>
 50 #include <math.h>
 51 #include <float.h>
 52 #include <tina/sys/sysDef.h>
 53 #include <tina/sys/sysPro.h>
 54 #include <tina/math/mathDef.h>
 55 #include <tina/math/mathPro.h>
 56 #include <tina/file/fileDef.h>
 57 #include <tina/file/filePro.h>
 58 #include <tina/geometry/geomDef.h>
 59 #include <tina/geometry/geomPro.h>
 60 #include <tina/image/imgDef.h>
 61 #include <tina/image/imgPro.h>
 62 #include <tina/vision/visDef.h>
 63 #include <tina/vision/visPro.h>
 64 
 65 #include <tinatool/wdgts/wdgtsDef.h>
 66 #include <tinatool/wdgts/wdgtsPro.h>
 67 #include <tinatool/draw/drawDef.h>
 68 #include <tinatool/draw/drawPro.h>
 69 #include <tinatool/tlbase/tlbaseDef.h>
 70 #include <tinatool/tlbase/tlbasePro.h>
 71 #include <tinatool/tlvision/tlvisEdge_pick.h>
 72 #include <tinatool/tlvision/tlvisEdge_geom_pick.h>
 73 #include <tinatool/tlvision/tlvisEdge_epi_mouse.h>
 74 
 75 
 76 /* preprocessing params */
 77 
 78 static Enhance enhance_type = diffx_gauss;
 79 static double sigma1 = 2.0, sigma2 = 2.0;
 80 static double precision = 0.001, k1 = 0.5, k2 = -0.5;
 81 static double can_sigma = 1.0, can_precision = 0.01;
 82 static double can_low_edge_th = 3.0, can_up_edge_th = 5.0;
 83 static int can_len_th = 5;
 84 static double vert_error = 1.4;
 85 static int max_ctf_level = 2;
 86 
 87 /* correlation params */
 88 
 89 static double width = 6.0, height = 6.0;
 90 static double stretch = 6.0, compress = 2.0;
 91 static double range = 20.0;
 92 static double Edelta = 3.0;
 93 static double mthresh = 0.5;
 94 static int pickup_range = 10.0;
 95 
 96 /* disp grad params */
 97 
 98 static Bool global_DG = true;
 99 static double gl_limit=1.0, gl_pass=50.0, gl_range=2.0;
100 static double dg_limit=1.0, dg_pass=90.0, dg_range=10.0;
101 
102 /* misc params */
103 
104 static int kernel = 5;
105 static double z_scale = 1.0;
106 static Interp interp = sinc5_interp;
107 float NO_DISP = FLT_MAX;
108 static Bool lr_only = false;
109 static Bool min_disp_cut = true;
110 static Bool fix_ctf_max = true;
111 static double fit_thres3 = 0.8;
112 static void *ft3;
113 
114 /* main tool */
115 
116 static Bool use_TV_ROIs = false;
117 
118 /* global imrects */
119 
120 static Imrect *disp_im = NULL;
121 static Imrect *left_grey_im = NULL;
122 static Imrect *right_grey_im = NULL;
123 static Imrect *left_edge_im = NULL, *right_edge_im = NULL;
124 
125 /* disp_clear_proc: clearing the disparity image prevents
126    temporal bootstrapping */
127 
128 static void disp_clear_proc(void)
129 {
130   im_free(disp_im);
131   disp_im = NULL;
132 }
133 
134 
135 /* stereo_ee_proc: image enhance on stereo image pair and edge detection
136    preprocessed grey scale images are used to drive the stretch-correlation
137    process but the canny edge data images are used to calculate the edge
138    disparities to sub-pixel accuracy */
139 
140 void stereo_ee_proc(void)       
141 {
142   void stereo_ee(Imrect *left_im, Imrect *right_im, Imrect *left_edge_im, Imrect *right_edge_im,
143                int enhance_type, double sigma, double precision,
144                Imrect **left_grey_im, Imrect **right_grey_im);
145   Imrect *left_im = left_image_get(), *right_im = right_image_get();
146   Tv *tvl = NULL, *tvr = NULL;
147 
148   if (left_im == NULL || right_im == NULL)
149     {
150       error("preproc: no image(s)", warning);
151       return;
152     }
153 
154   im_free(left_grey_im);
155   left_grey_im = NULL;
156   im_free(right_grey_im);
157   right_grey_im = NULL;
158 
159   if ((tvl = left_tv_get()) != NULL && (use_TV_ROIs == true)) 
160     {
161       left_im = im_subim(left_im, tv_get_im_roi(tvl));
162       left_image_set(left_im);
163     }
164 
165   if ((tvr = right_tv_get()) != NULL && (use_TV_ROIs == true)) 
166     {
167       right_im = im_subim(right_im, tv_get_im_roi(tvr));
168       right_image_set(right_im);
169     }
170 
171   if (left_im->vtype != float_v)
172     left_image_set(left_im = im_cast(left_im, float_v));
173   if (right_im->vtype != float_v)
174     right_image_set(right_im = im_cast(right_im, float_v));
175 
176   left_edge_im = left_edges_get();
177   right_edge_im = right_edges_get();
178 
179   stereo_ee(left_im, right_im, left_edge_im, right_edge_im,
180                enhance_type, sigma1, precision,
181                &left_grey_im, &right_grey_im);
182 }
183 
184 /* the stretch correlation function */
185 
186 static void stereo_correlate_proc(void)
187 {
188   int    edge_stereo_method(void);
189 
190   Imrect *out_disp_im = NULL;
191 
192   if (!edge_stereo_method())
193   {
194       error("Images not rectified/n",non_fatal);
195       return;
196   }
197 
198 
199   if (left_edge_im == NULL || right_edge_im == NULL)
200     {
201       error("correlate: no edge image(s)", warning);
202       return;
203     }
204 
205   if (left_grey_im == NULL || right_grey_im == NULL)
206     {
207       error("correlate: no grey image(s)", warning);
208       return;
209     }
210   
211   imf_warp_correlate(left_grey_im, right_grey_im, left_edge_im,
212                      right_edge_im, &out_disp_im, disp_im,
213                      
214                      (int)stretch, (int)compress, (int)width, (int)height,
215                      (int)range, Edelta, (float)mthresh,
216                      
217                      global_DG, gl_limit, gl_pass, (int)gl_range,
218 
219                      pickup_range, max_ctf_level, 
220                      min_disp_cut, fix_ctf_max, lr_only);
221   
222   im_free(disp_im);
223   disp_im = out_disp_im;
224 }
225 
226 /* push and pop the current disparity image on/off the stack */
227 
228 static void push_disp_image_proc(void)
229 {
230   if (disp_im == NULL)
231     return;
232 
233   stack_push((void *)im_copy(disp_im), IMRECT, im_free);
234   if (imcalc_tv_get() != NULL) tv_init(imcalc_tv_get());
235   if (imcal2_tv_get() != NULL) tv_init(imcal2_tv_get());
236   image_choice_reset();
237 }
238 
239 static void pop_disp_image_proc(void)
240 {
241   int type;
242   Imrect *temp_im;
243         
244   if (stack_check_types(IMRECT, NULL) == false)
245     {
246       error("correlation_tool: wrong type on stack", warning);
247       return;
248     }
249 
250   im_free(disp_im);
251   disp_im = (Imrect *)stack_pop(&type);
252   if (imcalc_tv_get() != NULL) tv_init(imcalc_tv_get());
253   if (imcal2_tv_get() != NULL) tv_init(imcal2_tv_get());
254   image_choice_reset();
255 
256   if (disp_im->vtype != float_v)
257     {
258       temp_im = disp_im;
259       disp_im = im_cast(temp_im, float_v);
260       im_free(temp_im);
261     }
262 }
263 
264 /* apply disparity gradient filter to a disparity image */
265 
266 static void disparity_gradient_proc(void)
267 {
268   Bool complete = false;
269 
270   if (disp_im == NULL)
271     return;
272   
273   while (complete == false)
274     {
275       disp_im = imf_dispgrad(disp_im, left_edge_im, (float)dg_limit, (float)dg_pass,
276                              (int)dg_range, &complete);
277     }
278 }
279 
280 static void stereo_proc()
281 {
282    stereo_ee_proc();
283    stereo_correlate_proc();
284    disparity_gradient_proc();
285 }
286 
287 /* display a disparity image in threed tv */
288 
289 /*
290 static void display3d_proc(void)
291 {
292   Parcam *pcam;
293   List *geom_list = NULL;
294 
295   if ((pcam = pcam_get()) == NULL || disp_im == NULL)
296     return;
297 
298   par_proj_set(pcam->f / pcam->pixel, pcam->I);
299   geom_list = proj_dispim(disp_im, left_edge_im);
300   threed_geom_set(geom_list);
301 }
302 */
303 
304 static void geom3_init(void)
305 {
306     threed_geom_set((List *) NULL);
307 }
308 
309 static void   *point3_of_dvec3(Vec3 * vp, int *type)
310 {
311     Vec3    v =
312     {Vec3_id};
313 
314     v = vec3_par_proj_3d(*vp);
315     *type = POINT3;
316     return ((void *) point3_make(v, POINT3));
317 }
318 
319 static List   *es2_depth_points_rect(List * es_list)
320 {
321     List   *list3 = NULL;
322     List   *ptr;
323 
324     for (ptr = es_list; ptr != NULL; ptr = ptr->next)
325     {
326         Tstring *es3, *es2 = (Tstring *) ptr->to;
327 
328         es3 = es_build_string3_rect2(es2, es2);
329         list3 = ref_addtostart(list3, (void *) es3, STRING);
330     }
331     return (list_reverse(list3));
332 }
333 
334 static void geom3_proc(void)
335 {
336     List   *geom = left_geom_get();
337     List   *threed_list_get();
338 
339     if (geom != NULL)
340     {
341         geom = reclist_list_update(geom, geom3_from_geom2_rect, 0, (void *) &fit_thres3);
342     }
343     else                        /* use raw edges */
344     {
345         Imrect *er=left_edges_get();
346         List *geom2;
347 
348         geom2 = (List *) prop_get(er->props, STRING);
349         geom2 = es2_depth_points_rect(geom2);
350         geom = reclist_list_update(geom2, point3_of_dvec3, 0, NULL);
351         reclist_list_free(geom2, rfree, 0, NULL);
352     }
353 /* transform to base coordinate frame for combination of head data NAT
354     trans = trans3_inverse(*(pcam->rcam1->transf));
355     reclist_list_apply(geom, geom_transform, NULL, &trans);
356 */
357     geom = list_append(geom, threed_list_get());
358     threed_geom_null();
359     threed_geom_set(geom);
360 }
361 
362 static void left_proc(void)
363 {
364     Parcam *pcam = pcam_get();
365     Transform3 trans =
366     {Transform3_id};
367 
368     if (pcam == NULL || pcam->cam1 == NULL || pcam->rcam1 == NULL ||
369         pcam->cam1->transf == NULL || pcam->rcam1->transf == NULL)
370         return;
371 
372     trans = trans3_inverse(*(pcam->rcam1->transf));
373     trans = trans3_prod(*(pcam->cam1->transf), trans);
374 
375     reclist_list_apply(threed_geom_get(), geom_transform, 0, (void *) &trans);
376 }
377 
378 
379 static void display_disp_proc(void)
380 {
381   List *geom_list = NULL;
382 
383   if (disp_im == NULL)
384     return;
385 
386   geom_list = proj_scaled_dispim(disp_im, z_scale);
387   threed_geom_set(geom_list);
388 }
389 
390 /* dialog box select procedures */
391 
392 static void enhance_choice_proc(int value)
393 {
394   switch (value)
395     {
396     case 0:
397       enhance_type = diffx_gauss;
398       break;
399     case 1:
400       enhance_type = diffx;
401       break;
402     case 2:
403       enhance_type = DoG;
404       break;
405     case 3:
406       enhance_type = gauss;
407       break;
408     case 4:
409       enhance_type = grad;
410       break;
411     case 5:
412       enhance_type = none;
413       break;
414     }
415 }
416 
417 void static global_DG_proc(int value)
418 {
419   switch (value)
420     {
421     case 0:
422       global_DG = false;
423       break;
424     case 1:
425       global_DG = true;
426       break;
427     }
428 }
429 
430 static void interp_func_proc(int num)
431 {
432   switch (num)
433     {
434     case 0:
435       /* use sinc interpolation in rectification, 5*5 kernel */ 
436       interp = sinc5_interp;
437       break;
438     case 1:
439       /* use sinc interpolation in rectification, 3*3 kernel */ 
440       interp = sinc3_interp;
441       break;
442     case 2:
443       /* use quadratic interpolation in rectification */
444       interp = quad_interp;
445       break;
446     }
447 }
448 
449 static void no_disp_proc(int num)
450 {
451   switch (num)
452     {
453     case 0:
454       NO_DISP = FLT_MAX;
455       break;
456     case 1:
457       NO_DISP = 0.0;
458       break;
459     case 2:
460       NO_DISP = -FLT_MAX;
461       break;
462     }
463 }
464 
465 static void min_disp_proc(int num)
466 {
467   switch (num)
468     {
469     case 0:
470       min_disp_cut = false;
471       break;
472     case 1:
473       min_disp_cut = true;
474       break;
475     }
476 }
477 
478 static void fix_ctf_max_proc(int num)
479 {
480   switch (num)
481     {
482     case 0:
483       fix_ctf_max = false;
484       break;
485     case 1:
486       fix_ctf_max = true;
487       break;
488     }
489 }
490 
491 static void max_ctf_level_proc(int num)
492 {
493   switch (num)
494     {
495     case 0:
496       /* process the stereo images at 100% scale only */ 
497       max_ctf_level = 0;
498       break;
499     case 1:
500       /* process the stereo images at 100% and 50% scales */ 
501       max_ctf_level = 1;
502       break;
503     case 2:
504       /* process the stereo images at 100%, 50% and 25% scales */ 
505       max_ctf_level = 2;
506       break;
507     case 3:
508       /* process the stereo images at 100%, 50%, 25% and 12.5% scales */ 
509       max_ctf_level = 3;
510       break;
511     }
512 }
513 
514 static void matching_proc(int num)
515 {
516   switch (num)
517     {
518     case 0:
519       /* only left to right matching performed */
520       lr_only = true;
521       break;
522     case 1:
523       /* two way matching performed for uniqueness */
524       lr_only = false;
525       break;
526     }
527 }
528 
529 static void use_ROIs_proc(int num)
530 {
531   switch (num)
532     {
533     case 0:
534       /* use left and right image ROIs */ 
535       use_TV_ROIs = false;
536       break;
537     case 1:
538       /* use left and right TV ROIs */
539       use_TV_ROIs = true;
540       break;
541     }
542 }
543 
544 /* parameters dialog boxes */
545 
546 void static misc_param_dialog(void)
547 {
548   static void *dialog = NULL;
549 
550   if (dialog)
551     {
552       tw_show_dialog(dialog);
553       return;
554     }
555 
556   dialog = tw_dialog("Misc Params");
557 
558   tw_label("Rank Order Filtering");
559   tw_newrow();
560   tw_iglobal("  kernel size:", &kernel, 10);
561   tw_newrow();
562   tw_label("Image Interpolation:");
563   tw_newrow();
564   tw_choice("  ", interp_func_proc, 0, "sinc 5*5", "sinc 3*3", "quadratic", NULL);
565   tw_newrow();
566   tw_fglobal("project disp Z scale:", &z_scale, 10);
567   tw_newrow();
568   tw_label("No Disparity Value:");
569   tw_newrow();
570   tw_choice("  ", no_disp_proc, 0, "FLT_MAX", "0.0", "-FLT_MAX", NULL);
571   tw_newrow();
572   tw_choice("0 Disparity Cut-off:", min_disp_proc, 1, "off", "on", NULL);
573   tw_newrow();
574   tw_choice("Fix Max CtF Disp:", fix_ctf_max_proc, 1, "off", "on", NULL);
575   tw_newrow();
576   tw_choice("Matching:", matching_proc, 1, "LR only", "LR&RL", NULL);
577 
578   tw_end_dialog();
579 }
580 
581 static void geom_param_dialog(void)
582 {
583     static void *dialog = NULL;
584 
585     if (dialog)
586     {
587         tw_show_dialog(dialog);
588         return;
589     }
590     dialog = tw_dialog("Geom Parameters");
591 
592     ft3 = tw_fglobal("3D  fit thres :", &fit_thres3, 20);
593 
594     tw_end_dialog();
595 }
596 
597 
598 void static preproc_param_dialog(void)
599 {
600   static void *dialog = NULL;
601 
602   if (dialog)
603     {
604       tw_show_dialog(dialog);
605       return;
606     }
607 
608   dialog = tw_dialog("Preproc Params");
609 
610   tw_choice("Enhance:", enhance_choice_proc, 0, "Dx Gauss", "Dx", "DoG",
611             "Gauss", "grad", "none", NULL);
612   tw_newrow();
613   tw_fglobal("  sigma1:", &sigma1, 10);
614   tw_fglobal(" sigma2:", &sigma2, 10);
615   tw_newrow();
616   tw_fglobal("  precision:", &precision, 10);
617   tw_newrow();
618   tw_fglobal("  DoG const1:", &k1, 10);
619   tw_fglobal(" DoG const2:", &k2, 10);
620   tw_newrow();
621   tw_label("Canny Edge Detection");
622   tw_newrow();
623   tw_fglobal("  sigma:", &can_sigma, 10);
624   tw_fglobal(" precision:", &can_precision, 10);
625   tw_newrow();
626   tw_fglobal("  upper thres:", &can_up_edge_th, 10);
627   tw_fglobal(" low thres:", &can_low_edge_th, 10);
628   tw_newrow();
629   tw_iglobal("  length thres:", &can_len_th, 10);
630   tw_fglobal(" vert-err:", &vert_error, 10);
631 
632   tw_end_dialog();
633 }
634 
635 void static correlation_param_dialog(void)
636 {
637   static void *dialog = NULL;
638 
639   if (dialog)
640     {
641       tw_show_dialog(dialog);
642       return;
643     }
644 
645   dialog = tw_dialog("Correlation Params");
646 
647   tw_fglobal("width:", &width, 10);
648   tw_fglobal(" height:", &height, 10);
649   tw_newrow();
650   tw_fglobal("stretch:", &stretch, 10);
651   tw_fglobal(" compress:", &compress, 10);
652   tw_newrow();
653   tw_fglobal("range:", &range, 10);
654   tw_fglobal(" Edelta:", &Edelta, 10);
655   tw_newrow();
656   tw_fglobal("match thresh:", &mthresh, 10);
657   tw_newrow();
658   tw_label("Disparity Feedback");
659   tw_newrow();
660   tw_iglobal("  pick-up search range:", &pickup_range, 10);
661   tw_newrow();
662   tw_label("CtF Scaling");
663   tw_newrow();
664   tw_choice("  Max:", max_ctf_level_proc, 2, "1:1", "1:2", "1:4", "1:8", NULL);
665 
666   tw_end_dialog();
667 }
668 
669 void static disp_grad_param_dialog(void)
670 {
671   static void *dialog = NULL;
672 
673   if (dialog)
674     {
675       tw_show_dialog(dialog);
676       return;
677     }
678 
679   dialog = tw_dialog("Disp Grad Params");
680 
681   tw_label("Global (block level)");
682   tw_newrow();
683   tw_choice("  Global:", global_DG_proc, 1, "off", "on", NULL);
684   tw_newrow();
685   tw_fglobal("  limit:", &gl_limit, 10);
686   tw_newrow();
687   tw_fglobal("  must pass %:", &gl_pass, 10);
688   tw_newrow();
689   tw_fglobal("  range:", &gl_range, 10);
690   tw_newrow();
691   tw_label("Local (individual points)");
692   tw_newrow();
693   tw_fglobal("  limit:", &dg_limit, 10);
694   tw_newrow();
695   tw_fglobal("  must pass %:", &dg_pass, 10);
696   tw_newrow();
697   tw_fglobal("  range:", &dg_range, 10);
698 
699   tw_end_dialog();
700 }
701 
702 /* pick function callbacks */
703 
704 static void left_edge_pick_proc(Tv_pick (*func)( /* ??? */ ))
705 {
706   Tv *tv = left_tv_get();
707 
708   tv_set_pick(tv, (*func) ());
709   (void) tv_set_activity(tv, PICK);
710 }
711 
712 static void right_edge_pick_proc(Tv_pick (*func)( /* ??? */ ))
713 {
714   Tv *tv = right_tv_get();
715 
716   tv_set_pick(tv, (*func) ());
717   (void) tv_set_activity(tv, PICK);
718 }
719 
720 static void threed_pick_proc(Tv_pick (*func)( /* ??? */ ))
721 {
722   Tv *tv = threed_tv_get();
723 
724   tv_set_pick(tv, (*func) ());
725   (void) tv_set_activity(tv, PICK);
726 }
727 
728 /* mouse function callbacks */
729 
730 static void left_mouse_proc(Tv_mouse (*func)( /* ??? */ ))
731 {
732   Tv *tv = left_tv_get();
733 
734   tv_set_mouse(tv, (*func) ());
735   (void) tv_set_activity(tv, MOUSE);
736 }
737 
738 static void right_mouse_proc(Tv_mouse (*func)( /* ??? */ ))
739 {
740   Tv *tv = right_tv_get();
741 
742   tv_set_mouse(tv, (*func) ());
743   (void) tv_set_activity(tv, MOUSE);
744 }
745 
746 /* correlation tool */
747 
748 void st_corr_tool(int x,int y)
749 {
750   static void *tool = NULL;
751 
752   if (tool)
753     {
754       tw_show_tool(tool);
755       return;
756     }
757 
758   tool = tw_tool("Correlation Stereo Tool", x, y);
759   
760   tw_menubar("Pick: ",
761              "Left",
762              "null", left_edge_pick_proc, null_pick,
763              "edge", left_edge_pick_proc, left_edge_print,
764              NULL,
765              "Right",
766              "null", right_edge_pick_proc, null_pick,
767              "edge", right_edge_pick_proc, right_edge_print,
768              NULL,
769              "Threed",
770              "null", threed_pick_proc, null_pick,
771              "print", threed_pick_proc, threed_print,
772              "delete", threed_pick_proc, threed_delete,
773              "src loc", threed_pick_proc, threed_corr_match,
774              NULL,
775              NULL);
776 
777   tw_newrow();
778   tw_menubar("Mouse: ",
779              "Left",
780              "null", left_mouse_proc, null_mouse,
781              "epi", left_mouse_proc, left_epi_mouse,
782              "rast", left_mouse_proc, left_raster_mouse,
783              NULL,
784              "Right",
785              "null", right_mouse_proc, null_mouse,
786              "epi", right_mouse_proc, right_epi_mouse,
787              "rast", right_mouse_proc, right_raster_mouse,
788              NULL,
789              NULL);
790 
791   tw_help_button("corr_stereo_tool");
792   tw_newrow();
793   tw_choice("ROIs:", use_ROIs_proc, 0, "full ims", "use TV ROIs", NULL);
794 
795   tw_newrow();
796   tw_label("Disp IM: ");
797   tw_button("clear", disp_clear_proc, NULL);
798   tw_button("push", push_disp_image_proc, NULL);
799   tw_button("pop", pop_disp_image_proc, NULL);
800 
801   tw_newrow();
802   tw_button("preproc", stereo_ee_proc, NULL);
803   tw_button("correlate", stereo_correlate_proc, NULL);
804   tw_button("disp grad", disparity_gradient_proc, NULL);
805   tw_button("proj disp", display_disp_proc, NULL);
806   tw_newrow();
807 /*
808   tw_button("proj 3D", display3d_proc, NULL);
809 */
810 
811   tw_label("Default: ");
812   tw_button("stereo", stereo_proc, NULL);
813   tw_button("init geom3", geom3_init, NULL);
814   tw_button("geom3", geom3_proc, NULL);
815   tw_button("left", left_proc, NULL);
816 
817   tw_newrow();
818   tw_button("preproc params", preproc_param_dialog, NULL);
819   tw_button("correlate params", correlation_param_dialog, NULL);
820   tw_newrow();
821   tw_button("disp grad params", disp_grad_param_dialog, NULL);
822   tw_button("misc params", misc_param_dialog, NULL);
823   tw_button("Geom Params", geom_param_dialog, NULL);
824 
825 
826   tw_end_tool();
827 }
828 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.