//renvoie le graphe minimal aux fransformations pres pour un rectangle void getMinRect(byte *in, byte *out) { byte buf[W*H]; byte buf2[W*H]; getMinShift(in,out); hflip(in,buf); getMinShift(buf,buf2); if(compare(buf2,out)<0) copy(buf2,out); vflip(buf,buf2); getMinShift(buf2,buf); if(compare(buf,out)<0) copy(buf,out); hflip(buf2,buf); getMinShift(buf,buf2); if(compare(buf2,out)<0) copy(buf2,out); }//getMinRect
/** \ingroup img * \ref img_std "Standardizes" an image by normalizing its orientation, colors, * etc. It is safe to call this multiple times on an image, libfprint keeps * track of the work it needs to do to make an image standard and will not * perform these operations more than once for a given image. * \param img the image to standardize */ API_EXPORTED void fp_img_standardize(struct fp_img *img) { if (img->flags & FP_IMG_V_FLIPPED) { vflip(img); img->flags &= ~FP_IMG_V_FLIPPED; } if (img->flags & FP_IMG_H_FLIPPED) { hflip(img); img->flags &= ~FP_IMG_H_FLIPPED; } if (img->flags & FP_IMG_COLORS_INVERTED) { invert_colors(img); img->flags &= ~FP_IMG_COLORS_INVERTED; } }