X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fsig-txt.c;h=1e2a9cd31e41c326e3c1afa901b3ea005d2c3b35;hb=c4bf633211b0424492b5a3937d6a6d2e0d79a4cf;hp=5b0a7e6d3d9aad5331119260c4fd20dffb71246f;hpb=fa3b0ac9da062a0404cd5349a61adb9202719adf;p=libucw.git diff --git a/images/sig-txt.c b/images/sig-txt.c index 5b0a7e6d..1e2a9cd3 100644 --- a/images/sig-txt.c +++ b/images/sig-txt.c @@ -27,7 +27,7 @@ image_sig_detect_textured(struct image_sig_data *data) DBG("Zero textured threshold."); return; } - + uns cols = data->cols; uns rows = data->rows; uns cell_cols = MIN((cols + 1) / 2, MAX_CELLS_COLS); @@ -44,7 +44,7 @@ image_sig_detect_textured(struct image_sig_data *data) } DBG("Detecting textured image... cols=%u rows=%u cell_cols=%u cell_rows=%u", cols, rows, cell_cols, cell_rows); - + /* Compute cells boundaries */ for (i = 1, j = 0; i < cell_cols; i++) cell_x[i] = fast_div_u32_u8(j += cols, cell_cols); @@ -59,7 +59,7 @@ image_sig_detect_textured(struct image_sig_data *data) for (uns i = 0; i < data->regions_count; i++) for (struct image_sig_block *block = data->regions[i].blocks; block; block = block->next) block->region = i; - + /* Process cells */ double e = 0; for (uns j = 0; j < cell_rows; j++) @@ -79,7 +79,7 @@ image_sig_detect_textured(struct image_sig_data *data) } for (uns k = 0; k < data->regions_count; k++) { - int a = data->blocks_count * cnt[k] - cell_area * data->regions[k].count; + int a = data->blocks_count * cnt[k] - cell_area * data->regions[k].count; e += (double)a * a / ((double)isqr(data->regions[k].count) * cell_area); } }