add more statistics

This commit is contained in:
2025-05-14 09:04:11 +03:00
parent fd2508c667
commit 3f7b5081ea
10 changed files with 168 additions and 81 deletions

View File

@@ -257,6 +257,7 @@ int get_histogram(const Image *I, size_t histo[HISTOSZ]){
*/
int calc_background(Image *img){
if(!img || !img->data) return FALSE;
DBG("image min/max=%d/%d", img->minval, img->maxval);
if(img->maxval == img->minval){
WARNX("Zero or overilluminated image!");
return FALSE;
@@ -266,7 +267,7 @@ int calc_background(Image *img){
WARNX("Image values too small");
return FALSE;
}
img->background = theconf.fixedbkg;
img->background = theconf.fixedbkgval;
return TRUE;
}
size_t histogram[HISTOSZ];