X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=pi_referential.cc;h=3fe7a27820ecbe101d3aa0d3cd6ec172bff09623;hp=8c0e8ac78c7ad097baca929dfa70a458d5f28425;hb=8236ef5635eda3f1532acc126ce0569d6bb8869e;hpb=28fa0ccaecec204d1781135c75c2b2ab13153312 diff --git a/pi_referential.cc b/pi_referential.cc index 8c0e8ac..3fe7a27 100644 --- a/pi_referential.cc +++ b/pi_referential.cc @@ -52,11 +52,6 @@ void PiReferential::draw_frame(RGBImage *image, r = 255; g = 0; b = 0; break; - case PiReferential::RM_BODY: - case PiReferential::RM_BODY_EDGES: - r = 0; g = 128; b = 255; - break; - default: cerr << "INCONSISTENCY" << endl; abort(); @@ -120,11 +115,6 @@ void PiReferential::draw_window(RGBImage *image, r = 255; g = 0; b = 0; break; - case PiReferential::RM_BODY: - case PiReferential::RM_BODY_EDGES: - r = 0; g = 128; b = 255; - break; - default: cerr << "INCONSISTENCY" << endl; abort(); @@ -225,12 +215,6 @@ void PiReferential::draw_edge_and_scale(RGBImage *image, r = 255; g = 0; b = 0; break; - case PiReferential::RM_BODY_EDGES: - edges = 1; - case PiReferential::RM_BODY: - r = 0; g = 128; b = 255; - break; - default: cerr << "INCONSISTENCY" << endl; abort(); @@ -489,16 +473,6 @@ void PiReferential::register_rectangle(int registration_mode, } break; - case RM_BODY: - case RM_BODY_EDGES: - { - xc = _body_xc + alpha * _body_ux + beta * _body_vx; - yc = _body_yc + alpha * _body_uy + beta * _body_vy; - w = (original->xmax - original->xmin) * _body_window_scaling; - h = (original->ymax - original->ymin) * _body_window_scaling; - } - break; - default: cerr << "Undefined registration mode." << endl; abort(); @@ -527,7 +501,6 @@ int PiReferential::register_edge(int registration_mode, int edge_type) { case PiReferential::RM_HEAD: case PiReferential::RM_BELLY: case PiReferential::RM_HEAD_BELLY: - case PiReferential::RM_BODY: if(_horizontal_polarity < 0) { e = (RichImage::nb_edge_tags - e) % RichImage::nb_edge_tags; } @@ -540,13 +513,6 @@ int PiReferential::register_edge(int registration_mode, int edge_type) { e += _head_belly_edge_shift; break; - case PiReferential::RM_BODY_EDGES: - if(_horizontal_polarity < 0) { - e = (RichImage::nb_edge_tags - e) % RichImage::nb_edge_tags; - } - e += _body_edge_shift; - break; - default: cerr << "INCONSISTENCY" << endl; abort(); @@ -564,22 +530,6 @@ int PiReferential::register_edge(int registration_mode, int edge_type) { void PiReferential::draw(RGBImage *image, int level) { int x1, y1, x2, y2, x3, y3, x4, y4; - if(level >= 2) { - - // Draw the RM_BODY reference frame - - x1 = int(_body_xc + _body_ux + _body_vx); - y1 = int(_body_yc + _body_uy + _body_vy); - x2 = int(_body_xc - _body_ux + _body_vx); - y2 = int(_body_yc - _body_uy + _body_vy); - x3 = int(_body_xc - _body_ux - _body_vx); - y3 = int(_body_yc - _body_uy - _body_vy); - x4 = int(_body_xc + _body_ux - _body_vx); - y4 = int(_body_yc + _body_uy - _body_vy); - - draw_frame(image, RM_BODY, x1, y1, x2, y2, x3, y3, x4, y4); - } - if(level >= 1) { // Draw the RM_BELLY reference frame @@ -643,12 +593,6 @@ void PiReferential::print_registration_mode(ostream *out, int registration_mode) case RM_HEAD_BELLY_EDGES: (*out) << "RM_HEAD_BELLY_EDGES"; break; - case RM_BODY: - (*out) << "RM_BODY"; - break; - case RM_BODY_EDGES: - (*out) << "RM_BODY_EDGES"; - break; default: abort(); }