]> mj.ucw.cz Git - libucw.git/commitdiff
store also image dimensions
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Sat, 16 Sep 2006 12:58:21 +0000 (14:58 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Sat, 16 Sep 2006 12:58:21 +0000 (14:58 +0200)
images/sig-init.c
images/signature.h

index 1332db15b0d248997c5a18ded1ffa4281f12f75c..061bbfec7ffd7b107d5a978906f6dfa82a494be7 100644 (file)
@@ -284,6 +284,10 @@ image_sig_finish(struct image_sig_data *data, struct image_signature *sig)
   sig->reg[0].wa = wa;
   sig->reg[0].wb = wb;
 
+  /* Store image dimensions */
+  sig->cols = data->image->cols;
+  sig->rows = data->image->rows;
+
   /* Dump regions features */
 #ifdef LOCAL_DEBUG
   for (uns i = 0; i < sig->len; i++)
index 1643f317a55a3204cce47b43459d24d801659cd1..52d6e2b2f1629db48b5141cb7b3093032d2a0064 100644 (file)
@@ -37,6 +37,8 @@ struct image_region {
 struct image_signature {
   byte len;                    /* Number of regions */
   byte flags;                  /* IMAGE_SIG_xxx */
+  u32 cols;                    /* Image width */
+  u32 rows;                    /* Image height */
   u16 df;                      /* Average weighted f dist */
   u16 dh;                      /* Average weighted h dist */
   struct image_vector vec;     /* Average features of all regions... simple signature */