]> mj.ucw.cz Git - libucw.git/blobdiff - images/sig-txt.c
some corrections in ImageSim config section
[libucw.git] / images / sig-txt.c
index 0202e601d2ff294bdb51e48b9884a265abd917f2..ab04143428848fa9c0eb97d5506828689e4cc7d9 100644 (file)
 void
 image_sig_detect_textured(struct image_sig_data *data)
 {
 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);
   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 */
   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.");
     {
       data->flags |= IMAGE_SIG_TEXTURED;
       DBG("Image is textured.");