]> mj.ucw.cz Git - libucw.git/blob - images/img.h
sources backup... changed:
[libucw.git] / images / img.h
1 #ifndef __IMG_H__
2 #  define __IMG_H__
3
4 #  include <stdio.h>
5 #  include <magick/api.h>
6 #  include "lib/config.h"
7
8 struct ClassInfo{
9   uns l, u, v;                /* average Luv coefficients */
10   uns lh, hl, hh;             /* energies in Daubechies wavelet bands */
11   uns count;                  /*number of blocks in this class*/
12 };
13
14 struct
15 BlockInfo{
16   uns l, u, v;                /* average Luv coefficients */
17   uns lh, hl, hh;             /* energies in Daubechies wavelet bands */
18   u8 cls_num;                 /* number of class for this block*/
19 };
20
21 struct
22 PerturbHisInfo{
23   unsigned block_num : 24;    /*24 bits for number of picture's block should be enough*/
24   unsigned cls_num : 8;
25 };
26
27 struct
28 DecomposeImageInfo{
29   uns max_cls_num;              /*self explaining*/
30   uns threshold;                /*stopping condition*/
31   uns diff_threshold;           /*stopping condition*/
32   uns max_cycles;               /*max number of loops of k_means clustering algorithm*/
33   uns init_decomp_num;          /*number of init decompositios */
34   uns bi_len;                   /*number of image blocks*/
35 };
36
37 struct BlockInfo*
38 computeBlockInfo(PixelPacket*, uns, uns,  uns*);
39 uns
40 decomposeImage(struct DecomposeImageInfo* dii, struct BlockInfo *bi);
41 #endif
42
43
44