X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fsig-txt.c;h=ab04143428848fa9c0eb97d5506828689e4cc7d9;hb=26b9fc31aa816c2c5eaa2f5b10d8a988e4d11cf0;hp=31887cf2cc7830180615c598c81be2b215f192b3;hpb=b9e5b4ebf5e4cbff0f32a193fc2f6051f3ea195c;p=libucw.git diff --git a/images/sig-txt.c b/images/sig-txt.c index 31887cf2..ab041434 100644 --- a/images/sig-txt.c +++ b/images/sig-txt.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#define LOCAL_DEBUG +#undef LOCAL_DEBUG #include "sherlock/sherlock.h" #include "images/images.h" @@ -22,6 +22,12 @@ void image_sig_detect_textured(struct image_sig_data *data) { + if (image_sig_textured_threshold <= 0) + { + DBG("Zero textured threshold."); + return; + } + uns cols = data->cols; uns rows = data->rows; uns cell_cols = MIN((cols + 1) / 2, MAX_CELLS_COLS); @@ -81,7 +87,7 @@ image_sig_detect_textured(struct image_sig_data *data) DBG("Coefficient=%g", (double)e / (data->regions_count * data->blocks_count)); /* Threshold */ - if (e <= image_sig_textured_threshold * data->regions_count * data->blocks_count) + if (e < image_sig_textured_threshold * data->regions_count * data->blocks_count) { data->flags |= IMAGE_SIG_TEXTURED; DBG("Image is textured.");