From 3e0b22752091d984ff8f58b2e01f774c1ae1fd69 Mon Sep 17 00:00:00 2001 From: tth Date: Mon, 5 Oct 2020 09:16:20 +0200 Subject: [PATCH] vroum... --- funcs/classif.c | 7 ++++--- install.sh | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/funcs/classif.c b/funcs/classif.c index 09f7392..d9c52a7 100644 --- a/funcs/classif.c +++ b/funcs/classif.c @@ -58,7 +58,6 @@ for (y=0; yheight; y++) { dr = rgb[0] - baryc[0]; dg = rgb[1] - baryc[1]; db = rgb[2] - baryc[2]; - dist = sqrtf( (dr*dr) + (dg*dg) + (db*db) ); #if DEBUG_LEVEL @@ -67,10 +66,12 @@ for (y=0; yheight; y++) { /* action !!! */ if (dist > range) { - rgb[0] = 0; on++; + rgb[0] = rgb[1] = rgb[2] = + (rgb[0] + rgb[1] + rgb[2]) / 3.0; + on++; } else { - rgb[1] = 0; off++; + off++; } fimg_put_rgb(pdst, x, y, rgb); diff --git a/install.sh b/install.sh index 18312c8..32c19a3 100755 --- a/install.sh +++ b/install.sh @@ -4,8 +4,9 @@ cp libfloatimg.a /usr/local/lib cp floatimg.h /usr/local/include cp tools/mkfimg tools/fimg2pnm tools/fimgops \ - tools/fimg2png tools/fimg2tiff \ + tools/fimg2png tools/fimg2tiff tools/fimg2fits \ tools/png2fimg tools/fimgstats tools/fimgfx \ + tools/cumulfimgs \ /usr/local/bin cp v4l2/grabvidseq v4l2/video-infos \