X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=rich_image.cc;h=e1d21128040bfd1eb4b31badc290b25958f24d7c;hp=f3b4b5465652b54a596890a53e96ca359dcc310f;hb=33852c7b378d419be75d15a9663ee6b071c2f534;hpb=789f96ef05fda4588aa536adb614c0e841be0812 diff --git a/rich_image.cc b/rich_image.cc index f3b4b54..e1d2112 100644 --- a/rich_image.cc +++ b/rich_image.cc @@ -88,7 +88,7 @@ void RichImage::compute_one_scale_edge_maps(int width, int height, } } - const unsigned int var_square_size = 16; + const int var_square_size = 16; int k00 = - 2 + width * (- 2); int k01 = - 1 + width * (- 2); @@ -148,13 +148,13 @@ void RichImage::compute_one_scale_edge_maps(int width, int height, y - int(var_square_size/2) >= 0 && y + int(var_square_size/2) < height) { - unsigned int s = + int s = + local_sum_pixel_map[ - var_square_size/2 + width * ( - var_square_size / 2)] + local_sum_pixel_map[ + var_square_size/2 + width * ( + var_square_size / 2)] - local_sum_pixel_map[ - var_square_size/2 + width * ( + var_square_size / 2)] - local_sum_pixel_map[ + var_square_size/2 + width * ( - var_square_size / 2)]; - unsigned int s_sq = + int s_sq = + local_sum_sq_pixel_map[ - var_square_size/2 + width * ( - var_square_size / 2)] + local_sum_sq_pixel_map[ + var_square_size/2 + width * ( + var_square_size / 2)] - local_sum_sq_pixel_map[ - var_square_size/2 + width * ( + var_square_size / 2)] @@ -384,11 +384,6 @@ void RichImage::compute_rich_structure() { delete[] scale_pixel_maps; } -void RichImage::crop(int xmin, int ymin, int width, int height) { - free(); - Image::crop(xmin, ymin, width, height); -} - RichImage::RichImage() : Image() { _width_at_scale = 0; _height_at_scale = 0;