#include "tlvisEdge_pick.h"#include <tina/sys/sysDef.h>#include <tina/sys/sysPro.h>#include <tina/math/mathDef.h>#include <tina/math/mathPro.h>#include <tina/geometry/geomDef.h>#include <tina/geometry/geomPro.h>#include <tina/image/imgDef.h>#include <tina/image/imgPro.h>#include <tina/vision/visDef.h>#include <tina/vision/visPro.h>#include <tinatool/draw/drawDef.h>#include <tinatool/draw/drawPro.h>#include <tinatool/tlbase/tlbasePro.h>Include dependency graph for tlvisEdge_pick.c:

Go to the source code of this file.
|
||||||||||||||||
|
Definition at line 177 of file tlvisEdge_pick.c. References point, Tv, tv_cross2(), tv_edge_string(), and tv_pixel2(). Referenced by pick_corr_match_draw(), pick_mlist_draw(), stereo_corr_match_draw(), and stereo_match_list_draw().
00178 {
00179 Point2 *point;
00180
00181 switch (type)
00182 {
00183 case CORNER:
00184 tv_cross2(tv, ((Edgel *) ptr)->pos, 7);
00185 break;
00186 case EDGE:
00187 point = (Point2 *)prop_get(((Edgel *)ptr)->props, POINT2);
00188 tv_pixel2(tv, point->p);
00189 break;
00190 case STRING:
00191 tv_edge_string(tv, (Tstring *) ptr);
00192 break;
00193 }
00194 }
|
Here is the call graph for this function:

|
|
Definition at line 441 of file tlvisEdge_pick.c. References left_pick_closest_corr_match(), PICK_CLOSEST, pick_corr_match_draw(), pick_define(), PICK_DRAW, PICK_FUNC, PICK_NAME, PICK_REPAINT, print_corr_match(), and Tv_pick.
00442 {
00443 return (pick_define(
00444 PICK_NAME, "corr match",
00445 PICK_CLOSEST, left_pick_closest_corr_match,
00446 PICK_DRAW, pick_corr_match_draw,
00447 PICK_FUNC, print_corr_match,
00448 PICK_REPAINT, false,
00449 NULL));
00450 }
|
Here is the call graph for this function:

|
|
Definition at line 430 of file tlvisEdge_pick.c. References left_pick_closest_matchlist(), PICK_CLOSEST, pick_define(), PICK_DRAW, PICK_FUNC, pick_mlist_draw(), PICK_NAME, PICK_REPAINT, print_matchlist(), and Tv_pick. Referenced by stereo_test_tool().
00431 {
00432 return (pick_define(
00433 PICK_NAME, "edge match",
00434 PICK_CLOSEST, left_pick_closest_matchlist,
00435 PICK_DRAW, pick_mlist_draw,
00436 PICK_FUNC, print_matchlist,
00437 PICK_REPAINT, false,
00438 NULL));
00439 }
|
Here is the call graph for this function:

|
|
Definition at line 400 of file tlvisEdge_pick.c. References left_pick_closest_edge(), PICK_CLOSEST, pick_define(), PICK_DRAW, pick_edge_draw(), PICK_FUNC, PICK_NAME, print_edges(), and Tv_pick. Referenced by edge_tool(), and st_corr_tool().
00401 {
00402 return (pick_define(
00403 PICK_NAME, "edge",
00404 PICK_CLOSEST, left_pick_closest_edge,
00405 PICK_DRAW, pick_edge_draw,
00406 PICK_FUNC, print_edges,
00407 NULL));
00408 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 97 of file tlvisEdge_pick.c. References left_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by left_edge_corr_matches().
00098 {
00099 Imrect *er = left_edges();
00100 int r, c;
00101 Vec2 v = {Vec2_id};
00102
00103 *type = LIST;
00104 v = tv_backproj2(tv, pos);
00105 r = tina_int(vec2_y(v));
00106 c = tina_int(vec2_x(v));
00107 return (er_closest(er, r, c, SEARCH_RADIUS, edge_prop_get, (void *) MATCH));
00108 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 71 of file tlvisEdge_pick.c. References left_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by left_edge_print().
00072 {
00073 Imrect *er = left_edges();
00074 int r, c;
00075 Vec2 v = {Vec2_id};
00076
00077 *type = EDGE;
00078 v = tv_backproj2(tv, pos);
00079 r = tina_int(vec2_y(v));
00080 c = tina_int(vec2_x(v));
00081 return (er_closest(er, r, c, SEARCH_RADIUS, (void *(*) ()) NULL, NULL));
00082 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 84 of file tlvisEdge_pick.c. References left_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by left_edge_matches().
00085 {
00086 Imrect *er = left_edges();
00087 int r, c;
00088 Vec2 v = {Vec2_id};
00089
00090 *type = LIST;
00091 v = tv_backproj2(tv, pos);
00092 r = tina_int(vec2_y(v));
00093 c = tina_int(vec2_x(v));
00094 return (er_closest(er, r, c, SEARCH_RADIUS, edge_sindex_prop_get, (void *) MLIST));
00095 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 123 of file tlvisEdge_pick.c. References left_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by left_string_matches().
00124 {
00125 Imrect *er = left_edges();
00126 Edgel *edge;
00127 int r, c;
00128 Vec2 v = {Vec2_id};
00129
00130 *type = EDGE;
00131 v = tv_backproj2(tv, pos);
00132 r = tina_int(vec2_y(v));
00133 c = tina_int(vec2_x(v));
00134 edge = er_closest(er, r, c, SEARCH_RADIUS, (void *(*) ()) NULL, NULL);
00135 if (edge == NULL)
00136 return (NULL);
00137
00138 return (prop_get(edge->props, STRING));
00139 }
|
Here is the call graph for this function:

|
|
Definition at line 463 of file tlvisEdge_pick.c. References left_pick_closest_string(), PICK_CLOSEST, pick_define(), PICK_DRAW, PICK_FUNC, PICK_NAME, PICK_REPAINT, picklist_match_string_draw(), tv_edge_string(), and Tv_pick. Referenced by stereo_test_tool().
00464 {
00465 return (pick_define(
00466 PICK_NAME, "string match",
00467 PICK_CLOSEST, left_pick_closest_string,
00468 PICK_DRAW, tv_edge_string,
00469 PICK_FUNC, picklist_match_string_draw,
00470 PICK_REPAINT, false,
00471 NULL));
00472 }
|
Here is the call graph for this function:

|
|
Definition at line 307 of file tlvisEdge_pick.c. References stereo_match_list_draw(). Referenced by picklist_match_string_draw().
00308 {
00309 List *ptr;
00310 List *end;
00311
00312 if (es == NULL)
00313 return;
00314
00315 end = es->end;
00316 for (ptr = es->start;; ptr = ptr->next)
00317 {
00318 Tstring *sub = prop_get(((Edgel *) (ptr->to))->props, SINDEX);
00319
00320 stereo_match_list_draw((List *) prop_get(sub->props, MLIST));
00321 ptr = sub->end;
00322 if (ptr == end)
00323 break;
00324 }
00325 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 155 of file tlvisEdge_pick.c. References mono_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by mono_print().
00156 {
00157 Imrect *er = mono_edges();
00158 int r, c;
00159 Vec2 v = {Vec2_id};
00160
00161 *type = EDGE;
00162 v = tv_backproj2(tv, pos);
00163 r = tina_int(vec2_y(v));
00164 c = tina_int(vec2_x(v));
00165 return ((void *) er_closest(er, r, c, SEARCH_RADIUS, (void *(*) ()) NULL,
00166 NULL));
00167 }
|
Here is the call graph for this function:

|
|
Definition at line 420 of file tlvisEdge_pick.c. References mono_pick_closest_edge(), PICK_CLOSEST, pick_define(), PICK_DRAW, pick_edge_draw(), PICK_FUNC, PICK_NAME, print_edges(), and Tv_pick. Referenced by corner_tool(), and edge_tool().
00421 {
00422 return (pick_define(
00423 PICK_NAME, "edge",
00424 PICK_CLOSEST, mono_pick_closest_edge,
00425 PICK_DRAW, pick_edge_draw,
00426 PICK_FUNC, print_edges,
00427 NULL));
00428 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 211 of file tlvisEdge_pick.c. References draw_matchable(), left_tv(), right_tv(), Tv, tv_get_color(), and tv_set_color(). Referenced by left_edge_corr_matches(), and right_edge_corr_matches().
00212 {
00213 Tv *tv2 = NULL;
00214 int old_color;
00215
00216 if (tv1 == left_tv())
00217 tv2 = right_tv();
00218
00219 if (tv1 == right_tv())
00220 tv2 = left_tv();
00221
00222 if (match == NULL || tv1 == NULL || tv2 == NULL)
00223 return;
00224
00225 old_color = tv_get_color(tv2);
00226 tv_set_color(tv2, green);
00227
00228 draw_matchable(tv2, match->to2, EDGE);
00229
00230 tv_set_color(tv2, old_color);
00231
00232 old_color = tv_get_color(tv1);
00233 tv_set_color(tv1, green);
00234
00235 draw_matchable(tv1, match->to1, EDGE);
00236
00237 tv_set_color(tv1, old_color);
00238 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 169 of file tlvisEdge_pick.c. References Tv, and tv_cross2(). Referenced by left_edge_print(), mono_print(), and right_edge_print().
00170 {
00171 if (edge == NULL || type != EDGE)
00172 return;
00173
00174 tv_cross2(tv, edge_image_pos(edge), 7);
00175 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 196 of file tlvisEdge_pick.c. References draw_matchable(), and Tv. Referenced by left_edge_matches().
00197 {
00198 List *lptr;
00199 Match *match;
00200
00201 if (mlist == NULL || type != LIST)
00202 return;
00203
00204 for (lptr = mlist; lptr != NULL; lptr = lptr->next)
00205 {
00206 match = (Match *) lptr->to;
00207 draw_matchable(tv, match->to1, match->type);
00208 }
00209 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 327 of file tlvisEdge_pick.c. References left_tv(), match_string_draw(), right_tv(), Tv, tv_reset_draw(), tv_save_draw(), tv_set_color(), and yellow. Referenced by left_string_matches().
00328 {
00329 List *p;
00330 Tv *tvl = left_tv();
00331 Tv *tvr = right_tv();
00332
00333 tv_save_draw(tvl);
00334 tv_save_draw(tvr);
00335 tv_set_color(tvl, yellow);
00336 tv_set_color(tvr, yellow);
00337 for (p = picklist; p != NULL; p = p->next)
00338 match_string_draw((Tstring *) p->to);
00339 tv_reset_draw(tvl);
00340 tv_reset_draw(tvr);
00341 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 377 of file tlvisEdge_pick.c. References stereo_corr_match_draw(), and Tv. Referenced by left_edge_corr_matches(), and right_edge_corr_matches().
00378 {
00379 List *p, *other_p;
00380 int num = 1;
00381 Bool repeated_pick;
00382
00383 for (p = picklist; p != NULL; p = p->next)
00384 {
00385 repeated_pick = false;
00386
00387 /* check for the same edge being picked more than once */
00388 for (other_p = p->next; other_p != NULL; other_p = other_p->next)
00389 if (other_p->to == p->to)
00390 repeated_pick = true;
00391
00392 if (repeated_pick)
00393 continue;
00394
00395 stereo_corr_match_draw(tv, (Match *)p->to, num);
00396 num++;
00397 }
00398 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 343 of file tlvisEdge_pick.c. References Tv. Referenced by left_edge_print(), mono_print(), and right_edge_print().
00344 {
00345 List *p;
00346
00347 for (p = picklist; p != NULL; p = p->next)
00348 edge_format((Edgel *) p->to);
00349 }
|
|
||||||||||||
|
Definition at line 366 of file tlvisEdge_pick.c. References stereo_match_list_draw(), and Tv. Referenced by left_edge_matches().
00367 {
00368 List *p;
00369
00370 for (p = picklist; p != NULL; p = p->next)
00371 {
00372 stereo_match_list_draw((List *) p->to);
00373 em_list_format((List *) p->to);
00374 }
00375 }
|
Here is the call graph for this function:

|
|
Definition at line 452 of file tlvisEdge_pick.c. References PICK_CLOSEST, pick_corr_match_draw(), pick_define(), PICK_DRAW, PICK_FUNC, PICK_NAME, PICK_REPAINT, print_corr_match(), right_pick_closest_corr_match(), and Tv_pick.
00453 {
00454 return (pick_define(
00455 PICK_NAME, "corr match",
00456 PICK_CLOSEST, right_pick_closest_corr_match,
00457 PICK_DRAW, pick_corr_match_draw,
00458 PICK_FUNC, print_corr_match,
00459 PICK_REPAINT, false,
00460 NULL));
00461 }
|
Here is the call graph for this function:

|
|
Definition at line 410 of file tlvisEdge_pick.c. References PICK_CLOSEST, pick_define(), PICK_DRAW, pick_edge_draw(), PICK_FUNC, PICK_NAME, print_edges(), right_pick_closest_edge(), and Tv_pick. Referenced by edge_tool(), and st_corr_tool().
00411 {
00412 return (pick_define(
00413 PICK_NAME, "edge",
00414 PICK_CLOSEST, right_pick_closest_edge,
00415 PICK_DRAW, pick_edge_draw,
00416 PICK_FUNC, print_edges,
00417 NULL));
00418 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 110 of file tlvisEdge_pick.c. References right_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by right_edge_corr_matches().
00111 {
00112 Imrect *er = right_edges();
00113 int r, c;
00114 Vec2 v = {Vec2_id};
00115
00116 *type = LIST;
00117 v = tv_backproj2(tv, pos);
00118 r = tina_int(vec2_y(v));
00119 c = tina_int(vec2_x(v));
00120 return (er_closest(er, r, c, SEARCH_RADIUS, edge_prop_get, (void *) MATCH));
00121 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 141 of file tlvisEdge_pick.c. References right_edges(), SEARCH_RADIUS, Tv, and tv_backproj2(). Referenced by right_edge_print().
00142 {
00143 Imrect *er = right_edges();
00144 int r, c;
00145 Vec2 v = {Vec2_id};
00146
00147 *type = EDGE;
00148 v = tv_backproj2(tv, pos);
00149 r = tina_int(vec2_y(v));
00150 c = tina_int(vec2_x(v));
00151 return ((void *) er_closest(er, r, c, SEARCH_RADIUS, (void *(*) ()) NULL,
00152 NULL));
00153 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 258 of file tlvisEdge_pick.c. References draw_matchable(), left_tv(), point, right_tv(), Tv, tv_cltext2(), tv_get_color(), and tv_set_color(). Referenced by draw_corr_match_edgels(), and print_corr_match().
00259 {
00260 Tv *tv2 = NULL;
00261 Edgel *edge1, *edge2;
00262 Vec2 pos;
00263 Point2 *point;
00264 char numstr[10];
00265 int old_color;
00266
00267 sprintf(numstr, "%d", num);
00268
00269 if (tv1 == left_tv())
00270 tv2 = right_tv();
00271
00272 if (tv1 == right_tv())
00273 tv2 = left_tv();
00274
00275 if (match == NULL || tv1 == NULL || tv2 == NULL)
00276 return;
00277
00278 old_color = tv_get_color(tv2);
00279 tv_set_color(tv2, green);
00280
00281 edge2 = (Edgel *)match->to2;
00282 draw_matchable(tv2, (void *)edge2, EDGE);
00283
00284 point = (Point2 *)prop_get(edge2->props, POINT2);
00285 pos = point->p;
00286 vec2_x(pos) = (float)tina_int(vec2_x(pos));
00287 vec2_y(pos) = (float)tina_int(vec2_y(pos)) + 0.5;
00288 tv_cltext2(tv2, numstr, pos);
00289
00290 tv_set_color(tv2, old_color);
00291
00292 old_color = tv_get_color(tv1);
00293 tv_set_color(tv1, green);
00294
00295 edge1 = (Edgel *)match->to1;
00296 draw_matchable(tv1, (void *)edge1, EDGE);
00297
00298 point = (Point2 *)prop_get(edge1->props, POINT2);
00299 pos = point->p;
00300 vec2_x(pos) = (float)tina_int(vec2_x(pos));
00301 vec2_y(pos) = (float)tina_int(vec2_y(pos)) + 0.5;
00302 tv_cltext2(tv1, numstr, pos);
00303
00304 tv_set_color(tv1, old_color);
00305 }
|
Here is the call graph for this function:

|
|
Definition at line 240 of file tlvisEdge_pick.c. References draw_matchable(), left_tv(), right_tv(), and Tv. Referenced by match_string_draw(), and print_matchlist().
00241 {
00242 Tv *tvl = left_tv();
00243 Tv *tvr = right_tv();
00244 List *lptr;
00245 Match *match;
00246
00247 if (mlist == NULL)
00248 return;
00249
00250 for (lptr = mlist; lptr != NULL; lptr = lptr->next)
00251 {
00252 match = (Match *) lptr->to;
00253 draw_matchable(tvl, match->to1, match->type);
00254 draw_matchable(tvr, match->to2, match->type);
00255 }
00256 }
|
Here is the call graph for this function:

|
|
Definition at line 69 of file tlvisEdge_pick.c. Referenced by left_pick_closest_corr_match(), left_pick_closest_edge(), left_pick_closest_matchlist(), left_pick_closest_string(), mono_pick_closest_edge(), right_pick_closest_corr_match(), and right_pick_closest_edge(). |
1.3.6