cleanup
This commit is contained in:
parent
47e8db923b
commit
da44439be7
@ -33,9 +33,10 @@ typedef struct {
|
|||||||
} ptc_t;
|
} ptc_t;
|
||||||
ptc_t ptc[8];
|
ptc_t ptc[8];
|
||||||
|
|
||||||
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, ">>> %s ( %p %f %d )\n", __func__,
|
fprintf(stderr, ">>> %s ( %p %f %d )\n", __func__,
|
||||||
pimg, kdist, notused);
|
pimg, kdist, notused);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
foo = fimg_meanvalues(pimg, means);
|
foo = fimg_meanvalues(pimg, means);
|
||||||
@ -60,8 +61,8 @@ if (verbosity) fimg_print_minmax(mm, "input pic");
|
|||||||
delta[0] = mm[1] - mm[0]; /* R */
|
delta[0] = mm[1] - mm[0]; /* R */
|
||||||
delta[1] = mm[3] - mm[2]; /* G */
|
delta[1] = mm[3] - mm[2]; /* G */
|
||||||
delta[2] = mm[5] - mm[4]; /* B */
|
delta[2] = mm[5] - mm[4]; /* B */
|
||||||
fprintf(stderr, "delta: %11.3f %11.3f %11.3f\n",
|
// fprintf(stderr, "delta: %11.3f %11.3f %11.3f\n",
|
||||||
delta[0], delta[1], delta[2]);
|
// delta[0], delta[1], delta[2]);
|
||||||
for (idx=0; idx<8; idx++) {
|
for (idx=0; idx<8; idx++) {
|
||||||
kr = 0.25 * ((idx & 0x4) ? 1 : 3);
|
kr = 0.25 * ((idx & 0x4) ? 1 : 3);
|
||||||
kg = 0.25 * ((idx & 0x2) ? 1 : 3);
|
kg = 0.25 * ((idx & 0x2) ? 1 : 3);
|
||||||
@ -70,14 +71,13 @@ for (idx=0; idx<8; idx++) {
|
|||||||
ptc[idx].x = (delta[0] * kr) + mm[0];
|
ptc[idx].x = (delta[0] * kr) + mm[0];
|
||||||
ptc[idx].y = (delta[1] * kg) + mm[2];
|
ptc[idx].y = (delta[1] * kg) + mm[2];
|
||||||
ptc[idx].z = (delta[2] * kb) + mm[4];
|
ptc[idx].z = (delta[2] * kb) + mm[4];
|
||||||
fprintf(stderr, "%6d %.3f %.3f %.3f\n", idx,
|
// fprintf(stderr, "%6d %.3f %.3f %.3f\n", idx,
|
||||||
ptc[idx].x, ptc[idx].y, ptc[idx].z);
|
// ptc[idx].x, ptc[idx].y, ptc[idx].z);
|
||||||
}
|
}
|
||||||
|
|
||||||
sz = pimg->width * pimg->height;
|
sz = pimg->width * pimg->height;
|
||||||
fprintf(stderr, "surface image %d\n", sz);
|
|
||||||
trig = kdist * ((mm[1] + mm[3] + mm[5])/6.0);
|
trig = kdist * ((mm[1] + mm[3] + mm[5])/6.0);
|
||||||
fprintf(stderr, "trig value %f\n", trig);
|
// fprintf(stderr, "trig value %f\n", trig);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
@ -100,7 +100,8 @@ for (idx=0; idx<sz; idx++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "found %d pixels ok\n", count);
|
fprintf(stderr, "%s: %d/%d pixels, ratio %f\n", __func__, count, sz,
|
||||||
|
(float)count/(float)sz);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user