chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
where-vessels: WIP argument parsing; library load changes
[ypp-sc-tools.web-live.git]
/
yarrg
/
structure.c
diff --git
a/yarrg/structure.c
b/yarrg/structure.c
index a49fe0fd7e91782d6d1f68254ac6974e74097e87..cc1e71360d6c0c9ff9d6997b76c7438ee8d7489a 100644
(file)
--- a/
yarrg/structure.c
+++ b/
yarrg/structure.c
@@
-444,11
+444,16
@@
void find_structure(const CanonImage *im,
}
void check_correct_commodities(void) {
}
void check_correct_commodities(void) {
- Rect search
= { { 50,39 }, { 130,59 } }
;
+ Rect search;
+ search.tl= s.mr.tl; search.tl.x += 34; search.tl.y -= 44;
+ search.br= s.mr.tl; search.br.x += 114; search.br.y -= 23;
+ MUST(search.br.x < cim->w-1 && search.tl.y > 0,
+ MR(search);MI(cim->w);MI(cim->h));
+
+ debug_rect("commodselr",0, search);
ADJUST_BOX(search,"_",>=,10, cim->h, MUST, tl,y,+1);
ADJUST_BOX(search,"_",>=,10, 0, MUST, br,y,-1);
ADJUST_BOX(search,"_",>=,10, cim->h, MUST, tl,y,+1);
ADJUST_BOX(search,"_",>=,10, 0, MUST, br,y,-1);
-
debug_rect("commodselr",1, search);
static const char *all_small[]= {
debug_rect("commodselr",1, search);
static const char *all_small[]= {
@@
-641,15
+646,6
@@
static inline Fixpt find_aa_density(const RgbImage *ri, Point p) {
Fixpt alpha_mean= fixpt_mul(alpha_total, one_third);
Fixpt thresh= dbl2fixpt(1.5/AAMAXVAL);
Fixpt alpha_mean= fixpt_mul(alpha_total, one_third);
Fixpt thresh= dbl2fixpt(1.5/AAMAXVAL);
- Fixpt alpha_min= alpha_mean - thresh*2;
- Fixpt alpha_max= alpha_mean + thresh*2;
-
- for (i=0; i<3; i++)
- MUST( alpha_min <= alpha[i] && alpha[i] <= alpha_max,
- MP(p);
- MRGB(here);MRGB(aa_background);MRGB(aa_foreground);
- MFP(aa_alpha_mean_max);MFP(thresh);MFP(alpha_mean);
- MFP(alpha_min);MI(i);MFP(alpha[i]);MFP(alpha_max) );
MUST( -thresh <= alpha_mean && alpha_mean <= aa_alpha_mean_max + thresh,
MP(p);
MUST( -thresh <= alpha_mean && alpha_mean <= aa_alpha_mean_max + thresh,
MP(p);