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

Linux Cross Reference
Tina4/src/tools/edge/edge_tool.c

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

  1 /**@(#)
  2 **/
  3 #include <stdio.h>
  4 #include <tina/sys.h>
  5 #include <tina/sysfuncs.h>
  6 #include <tina/math.h>
  7 #include <tina/mathfuncs.h>
  8 #include <tina/vision.h>
  9 #include <tina/visionfuncs.h>
 10 #include <tina/tv.h>
 11 #include <tina/tvfuncs.h>
 12 #include <tina/draw.h>
 13 #include <tina/drawfuncs.h>
 14 #include <tina/toolsfuncs.h>
 15 #include <tina/tw_Xfuncs.h>
 16 
 17 /* Local parameters managed by the edge processing tool */
 18 static double sigma = 1.0, precision = 0.01;
 19 static double low_edge_thres = 3.0, up_edge_thres = 5.0;
 20 static int len_thres = 5;
 21 static double conf_thres = 0.1;
 22 static double low_fit_thres = 1.0;
 23 static double up_fit_thres = 2.0;
 24 static double fit_thres3 = 2.0;
 25 static double lowd = -0.5, upd = 0.5;   /* image disparity */
 26 static double rect_scale = 1.0;
 27 static int max_div = 5;         /* max divergence from fit */
 28 static int sample = 12;         /* initial sample frequency */
 29 static int use_disp_histogram = 1;
 30 
 31 /* Other local variables */
 32 static Bool edges_rectified = false;
 33 static double Disp = 0;         /* major component of disparity */
 34 
 35 /* Make the major component of disparity, ie that produced by the
 36  * rectification process, available to other modules */
 37 double  edge_Disp_get(void)
 38 {
 39     return (Disp);
 40 }
 41 
 42 /* External check to see if edge rectification has been applied */
 43 Bool    edge_edges_rectified_get(void)
 44 {
 45     return (edges_rectified);
 46 }
 47 
 48 #define POLY_PROX 0
 49 #define LINEAR_PROX 1
 50 #define CONIC_PROX 2
 51 #define LINEAR_CONIC_PROX 3
 52 
 53 #define DEFAULT 0
 54 #define JOIN    1
 55 
 56 static int stereo_images = 1;
 57 static int approx_type = LINEAR_CONIC_PROX;
 58 static int options = DEFAULT;
 59 
 60 /********** Callback functions **********/
 61 
 62 /**** pcam callback / function ****/
 63 
 64 /**** canny callback ****/
 65 
 66 static void mono_canny_proc(void)
 67 {
 68     Tv     *tv;
 69     Imrect *im;
 70 
 71     tv = mono_tv_get();
 72     im = mono_image_get();
 73     if (tv != NULL && tv->tv_screen != NULL)    /* get roi from tv */
 74         im = im_subim(im, tv_get_im_roi(tv));
 75     mono_edges_set(canny(im, sigma, precision, low_edge_thres, up_edge_thres, len_thres));
 76     if (tv != NULL && tv->tv_screen != NULL)
 77         im_free(im);
 78     tv_edges_conn(tv, mono_edges_get());
 79     tv_flush(tv);
 80     mono_geom_set((List *) NULL);       /* now out of date */
 81 }
 82 
 83 static unsigned int block_label = 0;    /* no block is labeled 0 */
 84 
 85 static void stereo_canny_proc(void)
 86 {
 87     Tv     *tv;
 88     Imrect *im;
 89 
 90     left_edges_null();
 91     right_edges_null();
 92     ralloc_free_blocked(block_label);   /* actually free up majority */
 93     block_label = ralloc_new_blocked(1024);
 94     (void) ralloc_end_blocked();
 95 
 96     tv = left_tv_get();
 97     im = left_image_get();
 98     if (tv != NULL && tv->tv_screen != NULL)    /* get roi from tv */
 99         im = im_subim(im, tv_get_im_roi(tv));
100     (void) ralloc_start_blocked(block_label);
101     left_edges_set(canny(im, sigma, precision, low_edge_thres, up_edge_thres, len_thres));
102     (void) ralloc_end_blocked();
103     if (tv != NULL && tv->tv_screen != NULL)
104         im_free(im);
105     tv_edges_conn(tv, left_edges_get());
106     tv_flush(tv);
107 
108     tv = right_tv_get();
109     im = right_image_get();
110     if (tv != NULL && tv->tv_screen != NULL)    /* get roi from tv */
111         im = im_subim(im, tv_get_im_roi(tv));
112     (void) ralloc_start_blocked(block_label);
113     right_edges_set(canny(im, sigma, precision, low_edge_thres, up_edge_thres, len_thres));
114     (void) ralloc_end_blocked();
115     if (tv != NULL && tv->tv_screen != NULL)
116         im_free(im);
117     tv_edges_conn(tv, right_edges_get());
118     tv_flush(tv);
119 
120     Disp = 0;
121     edges_rectified = false;
122     left_geom_set((List *) NULL);       /* now out of date */
123     right_geom_set((List *) NULL);      /* now out of date */
124 }
125 
126 static void canny_proc(void)
127 {
128     if (stereo_images)
129         stereo_canny_proc();
130     else
131         mono_canny_proc();
132 }
133 
134 /**** rectify edges callback ****/
135 
136 static void rectify_edges_proc(void)
137 {
138     Imrect *left_er;
139     Imrect *right_er;
140     Camera *lcam;
141     Camera *rcam;
142     Parcam *pcam;
143     Vec2    cleft =
144     {Vec2_id};
145     Vec2    cright =
146     {Vec2_id};
147 
148     if (!stereo_images)
149     {
150         error("edge tool: not in stereo mode", warning);
151         return;
152     }
153     if (edges_rectified == true)
154     {
155         error("edge tool: edges already rectified", warning);
156         return;
157     }
158     left_er = left_edges_get();
159     right_er = right_edges_get();
160     lcam = left_camera();
161     rcam = right_camera();
162 
163     if (left_er == NULL || right_er == NULL)
164     {
165         error("no edges", warning);
166         return;
167     }
168     if (lcam == NULL || rcam == NULL)
169     {
170         error("no camera data", warning);
171         return;
172     }
173     pcam = pcam_get();
174     (void) ralloc_start_blocked(block_label);
175     er_apply_to_all_edges(left_er, edge_save_pos_prop, (void *) IMPOS);
176     er_apply_to_all_edges(right_er, edge_save_pos_prop, (void *) IMPOS);
177     if (lcam->correct_func != NULL)
178         er_correct(left_er, lcam);
179     if (rcam->correct_func != NULL)
180         er_correct(right_er, rcam);
181     er_rectify(left_er, pcam->rect1);
182     er_rectify(right_er, pcam->rect2);
183     (void) ralloc_end_blocked();
184     cleft = rectify_pos(pcam->rect1, vec2(lcam->cx, lcam->cy));
185     cright = rectify_pos(pcam->rect2, vec2(rcam->cx, rcam->cy));
186     Disp = vec2_x(cright) - vec2_x(cleft);
187     edges_rectified = true;
188 }
189 
190 /**** derectify edges callback ****/
191 
192 static void derectify_edges_proc(void)
193 {
194     Imrect *left_er;
195     Imrect *right_er;
196     Parcam *pcam;
197 
198     if (!stereo_images)
199     {
200         error("edge tool: not in stereo mode", warning);
201         return;
202     }
203     if (edges_rectified == false)
204     {
205         error("edge tool: edges not rectified", warning);
206         return;
207     }
208     left_er = left_edges_get();
209     right_er = right_edges_get();
210 
211     if (left_er == NULL || right_er == NULL)
212     {
213         error("no edges", warning);
214         return;
215     }
216     pcam = pcam_get();
217     if (pcam == NULL)
218     {
219         error("no camera data", warning);
220         return;
221     }
222     er_apply_to_all_edges(left_er, edge_get_pos_prop, (void *) IMPOS);
223     er_apply_to_all_edges(right_er, edge_get_pos_prop, (void *) IMPOS);
224 
225     /* old de-rectification without distortion correction NAT 12/5/92
226      * er_derectify(left_er, pcam->derect1); er_derectify(right_er,
227      * pcam->derect2); */
228     edges_rectified = false;
229 }
230 
231 /**** stereo callback ****/
232 
233 static void stereo_proc(void)
234 {
235     Imrect *left_er;
236     Imrect *right_er;
237     float   lowdisp, updisp;
238     Windex *disp_range;
239     void match_func_choice_proc(int val);
240     void match_cost_choice_proc(int val);
241     void st_matches_proc(void);
242     void st_support_proc(void);
243     void string_supp_proc(void);
244     void choose_ordered_proc(void);
245 
246     if (!stereo_images)
247     {
248         error("edge tool: not in stereo mode", warning);
249         return;
250     }
251     left_er = left_edges_get();
252     right_er = right_edges_get();
253 
254     if (left_er == NULL || right_er == NULL)
255     {
256         error("edge tool: no edges available", warning);
257         return;
258     }
259     (void) ralloc_start_blocked(block_label);
260     er_reference_strings(left_er);
261     er_set_sindex(left_er);
262     er_reference_strings(right_er);
263     er_set_sindex(right_er);
264     (void) ralloc_end_blocked();
265 
266     lowdisp = Disp + lowd * left_er->width;
267     updisp = Disp + upd * left_er->width;
268 
269     if (use_disp_histogram)
270     {
271         disp_range = er_disp_hist(left_er, right_er,
272                                   lowdisp, updisp,
273                                   es_match_orandcon);
274     } else
275     {
276         disp_range = er_disp_range_build(left_er, 16, 16);
277         disp_range_fix_disparity(disp_range, lowdisp, updisp);
278     }
279     disp_range_set(disp_range);
280 
281 /*  quick version not reliable NAT 1/1/00
282     (void) ralloc_start_blocked(block_label);
283     er_string_matcher(left_er, right_er, es_match_abs_orient);
284     (void) ralloc_end_blocked();
285 */
286     match_func_choice_proc(3);
287     match_cost_choice_proc(1);
288 
289     st_matches_proc(); /* match_func */
290     st_support_proc(); /* no options */
291     string_supp_proc(); /* match_cost_func */
292     choose_ordered_proc(); /* match_cost_func */
293 }
294 
295 /**** geom2 callback ****/
296 
297 static void stereo_geom2_proc(void)
298 {
299     Imrect *er;
300     Tv     *tv;
301     List   *strings;
302     double  low_th, up_th;
303 
304     if ((er = left_edges_get()) == NULL)
305         return;
306 
307     low_th = (edges_rectified == true) ? low_fit_thres * rect_scale : low_fit_thres;
308     up_th = (edges_rectified == true) ? up_fit_thres * rect_scale : up_fit_thres;
309 
310     strings = (List *) prop_get(er->props, STRING);
311 
312     switch (approx_type)
313     {
314     case POLY_PROX:
315         strings = poly_strings(strings, low_th);
316         break;
317     case LINEAR_PROX:
318         strings = linear_strings(strings, low_th);
319         break;
320     case CONIC_PROX:
321         conic_filter_set(conic_bckf);   /* set bias corrected filter */
322         strings = conic_strings(strings, sample, low_th, up_th, max_div);
323         break;
324     case LINEAR_CONIC_PROX:
325         conic_filter_set(conic_bckf);   /* set bias corrected filter */
326         strings = linear_strings(strings, low_th);
327         poly_strings_find_conics(strings, sample, low_th, up_th, max_div);
328         break;
329     }
330 
331     if (options & JOIN)
332     {
333         Imregion *roi;
334 
335         if (edges_rectified == true)
336         {
337             Rindex *sx = (Rindex *) prop_get(er->props, SINDEX);
338 
339             if (sx != NULL)
340                 roi = roi_copy(sx->region);
341             else
342                 roi = er_bounding_region(er);
343             roi->lx -= 10;
344             roi->ly -= 10;
345             roi->ux += 10;
346             roi->uy += 10;
347         } else
348             roi = roi_copy(er->region);
349 
350         strings = conic_join(strings, roi, conf_thres, low_th, up_th, max_div);
351         rfree((void *) roi);
352     }
353     if (edges_rectified == true)
354     {
355         Parcam *pcam = pcam_get();
356 
357         reclist_list_apply(strings, geom_add_image_pos_prop, (int)NULL, (void *) &pcam->derect1);
358     }
359     left_geom_set(strings);
360     tv = left_tv_get();
361     tv_repaint(tv);
362     reclist_list_draw(tv, strings, (int)NULL, geom_col_draw, NULL);
363 }
364 
365 static void mono_geom2_proc(void)
366 {
367     Imrect *er;
368     Tv     *tv;
369     List   *strings;
370     double  low_th, up_th;
371 
372     if ((er = mono_edges_get()) == NULL)
373         return;
374 
375     low_th = low_fit_thres;
376     up_th = up_fit_thres;
377 
378     if((strings = (List *) prop_get(er->props, STRING))==NULL)
379     {
380         er_find_edge_strings(er);
381         er_rm_edges(er, EDGE_GET_CONN_MASK, EDGE_NOLINK);
382         er_edge_strings_thres(er, len_thres, up_edge_thres);
383         er_set_row_index(er);
384         strings = (List *) prop_get(er->props, STRING);
385     }
386 
387     switch (approx_type)
388     {
389     case POLY_PROX:
390         strings = poly_strings(strings, low_th);
391         break;
392     case LINEAR_PROX:
393         strings = linear_strings(strings, low_th);
394         break;
395     case CONIC_PROX:
396         conic_filter_set(conic_bckf);   /* set bias corrected filter */
397         strings = conic_strings(strings, 12, low_th, up_th, max_div);
398         break;
399     case LINEAR_CONIC_PROX:
400         conic_filter_set(conic_bckf);   /* set bias corrected filter */
401         strings = linear_strings(strings, low_th);
402         poly_strings_find_conics(strings, sample, low_th, up_th, max_div);
403         break;
404     }
405 
406     if (options & JOIN)
407         strings = conic_join(strings, er->region, conf_thres, low_th, up_th, max_div);
408 
409     mono_geom_set(strings);
410     tv = mono_tv_get();
411     tv_repaint(tv);
412     reclist_list_draw(tv, strings, (int)NULL, geom_col_draw, NULL);
413 }
414 
415 static void geom2_proc(void)
416 {
417     if (stereo_images)
418         stereo_geom2_proc();
419     else
420         mono_geom2_proc();
421 }
422 
423 /**** geom callback ****/
424 
425 void   *point3_of_dvec3(Vec3 * vp, int *type)
426 {
427     Vec3    v =
428     {Vec3_id};
429 
430     v = vec3_par_proj_3d(*vp);
431     *type = POINT3;
432     return ((void *) point3_make(v, POINT3));
433 }
434 
435 List   *es2_depth_points(List * es_list)
436 {
437     List   *list3 = NULL;
438     List   *ptr;
439 
440     for (ptr = es_list; ptr != NULL; ptr = ptr->next)
441     {
442         Tstring *es3, *es2 = (Tstring *) ptr->to;
443 
444         es3 = es_build_string3(es2, es2);
445         list3 = ref_addtostart(list3, (void *) es3, STRING);
446     }
447     return (list_reverse(list3));
448 }
449 
450 static void geom3_init(void)
451 {
452     threed_geom_set((List *) NULL);
453 }
454 
455 static void geom3_proc(void)
456 {
457     List   *geom = left_geom_get();
458     List   *threed_list_get();
459 
460     if (geom != NULL)
461         geom = reclist_list_update(geom, geom3_from_geom2, (int)NULL, (void *) &fit_thres3);
462     else                        /* use raw edges */
463     {
464         Imrect *er=left_edges_get();
465         List *geom2;
466 
467         geom2 = (List *) prop_get(er->props, STRING);
468         geom2 = es2_depth_points(geom2);
469         geom = reclist_list_update(geom2, point3_of_dvec3, (int)NULL, NULL);
470         reclist_list_free(geom2, rfree, (int)NULL, NULL);
471     }
472 /* transform to base coordinate frame for combination of head data NAT
473     trans = trans3_inverse(*(pcam->rcam1->transf));
474     reclist_list_apply(geom, geom_transform, NULL, &trans);
475 */
476     geom = list_append(geom, threed_list_get());
477     threed_geom_null();
478     threed_geom_set(geom);
479 }
480 
481 static void left_proc(void)
482 {
483     Parcam *pcam = pcam_get();
484     Transform3 trans =
485     {Transform3_id};
486 
487     if (pcam == NULL || pcam->cam1 == NULL || pcam->rcam1 == NULL ||
488         pcam->cam1->transf == NULL || pcam->rcam1->transf == NULL)
489         return;
490 
491     trans = trans3_inverse(*(pcam->rcam1->transf));
492     trans = trans3_prod(*(pcam->cam1->transf), trans);
493 
494     reclist_list_apply(threed_geom_get(), geom_transform, (int)NULL, (void *) &trans);
495 }
496 
497 
498 /**** Pick function callbacks ****/
499 
500 static void mono_edge_pick_proc(Tv_pick(*func) ( /* ??? */ ))
501 {
502     Tv     *tv = mono_tv_get();
503 
504     tv_set_pick(tv, (*func) ());
505     (void) tv_set_activity(tv, PICK);
506 }
507 
508 static void left_edge_pick_proc(Tv_pick(*func) ( /* ??? */ ))
509 {
510     Tv     *tv = left_tv_get();
511 
512     tv_set_pick(tv, (*func) ());
513     (void) tv_set_activity(tv, PICK);
514 }
515 
516 static void right_edge_pick_proc(Tv_pick(*func) ( /* ??? */ ))
517 {
518     Tv     *tv = right_tv_get();
519 
520     tv_set_pick(tv, (*func) ());
521     (void) tv_set_activity(tv, PICK);
522 }
523 
524 static void left_geom_pick_proc(Tv_pick(*func) ( /* ??? */ ))
525 {
526     Tv     *tv = left_tv_get();
527 
528     tv_set_pick(tv, (*func) ());
529     (void) tv_set_activity(tv, PICK);
530 }
531 
532 static void threed_pick_proc(Tv_pick(*func) ( /* ??? */ ))
533 {
534     Tv     *tv = threed_tv_get();
535 
536     tv_set_pick(tv, (*func) ());
537     (void) tv_set_activity(tv, PICK);
538 }
539 
540 /**** Mouse function callbacks ****/
541 
542 static void mono_mouse_proc(Tv_mouse(*func) ( /* ??? */ ))
543 {
544     Tv     *tv = mono_tv_get();
545 
546     tv_set_mouse(tv, (*func) ());
547     (void) tv_set_activity(tv, MOUSE);
548 }
549 
550 static void left_mouse_proc(Tv_mouse(*func) ( /* ??? */ ))
551 {
552     Tv     *tv = left_tv_get();
553 
554     tv_set_mouse(tv, (*func) ());
555     (void) tv_set_activity(tv, MOUSE);
556 }
557 
558 static void right_mouse_proc(Tv_mouse(*func) ( /* ??? */ ))
559 {
560     Tv     *tv = right_tv_get();
561 
562     tv_set_mouse(tv, (*func) ());
563     (void) tv_set_activity(tv, MOUSE);
564 }
565 
566 static void threed_mouse_proc(Tv_mouse(*func) ( /* ??? */ ))
567 {
568     Tv     *tv = threed_tv_get();
569 
570     tv_set_mouse(tv, (*func) ());
571     (void) tv_set_activity(tv, MOUSE);
572 }
573 
574 /********** Choice item callbacks **********/
575 
576 /**** Image choice callback ****/
577 
578 static void image_choice_proc(int val)
579 {
580     stereo_images = val;
581 }
582 
583 /**** disparity range choice callback ****/
584 
585 static void disp_range_choice_proc(int val)
586 {
587     use_disp_histogram = val;
588 }
589 
590 /**** geom2 choice callback ****/
591 
592 static void geom2_choice_proc(int val)
593 {
594     approx_type = val;
595 }
596 
597 /**** geom2 option callback ****/
598 
599 static void geom2_option_proc(int val)
600 {
601     options = val;
602 }
603 
604 /********** Paramter dialog callbacks **********/
605 
606 void   *tw_fglobal();
607 void   *tw_iglobal();
608 void   *tw_ivalue();
609 
610 /**** Edge parameter dialog box callback ****/
611 
612 static void *sig, *pre, *th1, *th2, *lth;       /* callback handles */
613 
614 static void edge_param_refresh(void)
615 {
616     (void) tw_fglobal_reset(sig);
617     (void) tw_fglobal_reset(pre);
618     (void) tw_fglobal_reset(th1);
619     (void) tw_fglobal_reset(th2);
620     (void) tw_iglobal_reset(lth);
621 }
622 
623 static void edge_param_dialog(void)
624 {
625     static void *dialog = NULL;
626 
627     if (dialog)
628     {
629         tw_show_dialog(dialog);
630         return;
631     }
632     dialog = tw_dialog("Edge Parameters");
633 
634     tw_help_button("edge_tool_parms");
635     tw_newrow();
636     sig = tw_fglobal("Sigma        :", &sigma, 20);
637     tw_newrow();
638     pre = tw_fglobal("Precision    :", &precision, 20);
639     tw_newrow();
640     th1 = tw_fglobal("Lower Thres  :", &low_edge_thres, 20);
641     tw_newrow();
642     th2 = tw_fglobal("Upper Thres  :", &up_edge_thres, 20);
643     tw_newrow();
644     lth = tw_iglobal("Length Thres :", &len_thres, 20);
645 
646     tw_end_dialog();
647 }
648 
649 /**** Stereo paramter dialog callback ****/
650 
651 static void *dps, *rsc, *ldp, *udp;
652 
653 static void stereo_param_refresh(void)
654 {
655     (void) tw_ivalue_reset(dps);
656     (void) tw_fglobal_reset(rsc);
657     (void) tw_fglobal_reset(ldp);
658     (void) tw_fglobal_reset(udp);
659 }
660 
661 static void stereo_param_dialog(void)
662 {
663     static void *dialog = NULL;
664 
665     if (dialog)
666     {
667         tw_show_dialog(dialog);
668         return;
669     }
670     dialog = tw_dialog("Stereo Parameters");
671 
672     dps = tw_ivalue("DP table max:", stereo_dp_max_size_get,
673                     stereo_dp_max_size_set, 20);
674     tw_newrow();
675     rsc = tw_fglobal("Rect scale :", &rect_scale, 20);
676     tw_newrow();
677     ldp = tw_fglobal("Low disp   :", &lowd, 20);
678     tw_newrow();
679     udp = tw_fglobal("Upper disp :", &upd, 20);
680 
681     tw_end_dialog();
682 }
683 
684 /**** Geom paramter dialog callback ****/
685 
686 static void *ct, *lft, *uft, *ft3;
687 
688 static void geom_param_refresh(void)
689 {
690     (void) tw_fglobal_reset(ct);
691     (void) tw_fglobal_reset(lft);
692     (void) tw_fglobal_reset(uft);
693     (void) tw_fglobal_reset(ft3);
694 }
695 
696 static void geom_param_dialog(void)
697 {
698     static void *dialog = NULL;
699 
700     if (dialog)
701     {
702         tw_show_dialog(dialog);
703         return;
704     }
705     dialog = tw_dialog("Geom Parameters");
706 
707     ct = tw_fglobal("Confidence thres :", &conf_thres, 20);
708     tw_newrow();
709     lft = tw_fglobal("Low fit thres :", &low_fit_thres, 20);
710     tw_newrow();
711     uft = tw_fglobal("Up  fit thres :", &up_fit_thres, 20);
712     tw_newrow();
713     ft3 = tw_fglobal("3D  fit thres :", &fit_thres3, 20);
714 
715     tw_end_dialog();
716 }
717 
718 void    edge_tool_refresh(void)
719 {
720     edge_param_refresh();
721     stereo_param_refresh();
722     geom_param_refresh();
723 }
724 
725 /********** Tool creation **********/
726 
727 void    edge_tool(int x, int y)
728 {
729     static void *tool = NULL;
730 
731     if (tool)
732     {
733         tw_show_tool(tool);
734         return;
735     }
736     tool = tw_tool("Edge Tool", x, y);
737 
738     tw_menubar("Pick :",
739                "mono",
740                "null", mono_edge_pick_proc, null_pick,
741                "edge", mono_edge_pick_proc, mono_print,
742                NULL,
743                "left",
744                "null", left_edge_pick_proc, null_pick,
745                "edge", left_edge_pick_proc, left_edge_print,
746                "e mat", left_edge_pick_proc, left_edge_matches,
747                "s mat", left_edge_pick_proc, left_string_matches,
748                NULL,
749                "geoml",
750                "print", left_geom_pick_proc, left_geom_print,
751                "choose", left_geom_pick_proc, left_geom_choose,
752                "delete", left_geom_pick_proc, left_geom_delete,
753                NULL,
754                "right",
755                "null", right_edge_pick_proc, null_pick,
756                "edge", right_edge_pick_proc, right_edge_print,
757                NULL,
758                "threed",
759                "null", threed_pick_proc, null_pick,
760                "print", threed_pick_proc, threed_print,
761                "choose", threed_pick_proc, threed_choose,
762                "delete", threed_pick_proc, threed_delete,
763                "plane", threed_pick_proc, threed_plane,
764 #ifndef lint                    /* lint fails on > 49 arguments */
765                "cone", threed_pick_proc, threed_cone,
766                NULL,
767 #endif                          /* lint */
768                NULL);
769 
770     tw_newrow();
771     tw_menubar("Mouse:",
772                "mono",
773                "null", mono_mouse_proc, null_mouse,
774                NULL,
775                "left",
776                "null", left_mouse_proc, null_mouse,
777                "epi", left_mouse_proc, left_epi_mouse,
778                "rast", left_mouse_proc, left_raster_mouse,
779                NULL,
780                "right",
781                "null", right_mouse_proc, null_mouse,
782                "epi", right_mouse_proc, right_epi_mouse,
783                "rast", right_mouse_proc, right_raster_mouse,
784                NULL,
785                "threed",
786                "null", threed_mouse_proc, null_mouse,
787                NULL,
788                NULL);
789 
790     tw_newrow();
791     tw_help_button("edge_tool");
792     tw_newrow();
793     tw_choice("Image Select:",
794            image_choice_proc, 1, "mono image", "stereo images", NULL);
795 
796     tw_newrow();
797     tw_choice("Disparity range:",
798               disp_range_choice_proc, 1, "uniform", "histogram", NULL);
799 
800     tw_newrow();
801     tw_choice("2D Geom Fit:",
802     geom2_choice_proc, 3, "poly", "linear", "conic", "lin/con", NULL);
803 
804     tw_newrow();
805     tw_check("2D Options :", geom2_option_proc, 0, "join", NULL);
806 
807     tw_newrow();
808     tw_button("canny", canny_proc, NULL);
809     tw_button("edge rectify", rectify_edges_proc, NULL);
810     tw_button("edge derect", derectify_edges_proc, NULL);
811 
812     tw_newrow();
813     tw_button("stereo", stereo_proc, NULL);
814     tw_button("geom2", geom2_proc, NULL);
815     tw_button("init geom3", geom3_init, NULL);
816     tw_button("geom3", geom3_proc, NULL);
817     tw_button("left", left_proc, NULL);
818 
819     tw_newrow();
820     tw_button("Edge Params", edge_param_dialog, NULL);
821     tw_button("Stereo Params", stereo_param_dialog, NULL);
822     tw_button("Geom Params", geom_param_dialog, NULL);
823 
824     tw_end_tool();
825 }
826 

~ [ 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.