X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=images%2Fsig-txt.c;h=ab04143428848fa9c0eb97d5506828689e4cc7d9;hb=d46d9596c225dbbcaef4b76e0828036e3addfbe3;hp=0202e601d2ff294bdb51e48b9884a265abd917f2;hpb=c1afcf90949e5058a95e0e12a09b25a068d68b61;p=libucw.git diff --git a/images/sig-txt.c b/images/sig-txt.c index 0202e601..ab041434 100644 --- a/images/sig-txt.c +++ b/images/sig-txt.c @@ -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.");