Compare commits
	
		
			3 Commits
		
	
	
		
			2a2bc51e70
			...
			fdcc0781eb
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fdcc0781eb | |||
| 0a1260eb6f | |||
| 6886fb4167 | 
| @ -9,8 +9,8 @@ FILTRES=$(./t -L | awk 'NR>1 { print $1 }' | sort) | ||||
| 
 | ||||
| rm /tmp/fstack*.png | ||||
| 
 | ||||
| # SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1) | ||||
| SRC=mire.fimg | ||||
| SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1) | ||||
| # SRC=mire.fimg | ||||
| 
 | ||||
| for F in $FILTRES | ||||
| do | ||||
|  | ||||
| @ -16,14 +16,14 @@ int		x, y, xe, ye; | ||||
| int		off; | ||||
| double		accus[3], divisor; | ||||
| 
 | ||||
| xe = geom[0] + geom[2]; | ||||
| ye = geom[1] + geom[3]; | ||||
| 
 | ||||
| #if DEBUG_LEVEL | ||||
| fprintf(stdout, "geom: %5d %5d %5d %5d\n",  | ||||
| 			geom[0], geom[1], geom[2], geom[3]); | ||||
| #endif | ||||
| 
 | ||||
| xe = geom[0] + geom[2]; | ||||
| ye = geom[1] + geom[3]; | ||||
| 
 | ||||
| accus[0] = accus[1] = accus[2] = 0.0; | ||||
| for (y=geom[1]; y<ye; y++) { | ||||
| 	for (x=geom[0]; x<xe; x++) { | ||||
|  | ||||
| @ -166,6 +166,13 @@ if (foo) { | ||||
| 	exit(1); | ||||
| 	} | ||||
| 
 | ||||
| if (verbosity) { | ||||
| 	fprintf(stderr, "input glob        %s\n", globbing); | ||||
| 	fprintf(stderr, "filter chain      %s\n", filterchain); | ||||
| 	fprintf(stderr, "ourput dir        %s\n", outdir); | ||||
| 	fprintf(stderr, "do xper           %d\n", do_xper); | ||||
| 	} | ||||
| 
 | ||||
| foo = run_the_singlepass(globbing, outdir, FILTERS); | ||||
| fprintf(stderr, "\n\tRun the single pass --> %d\n", foo); | ||||
| 
 | ||||
|  | ||||
| @ -71,10 +71,14 @@ return 0; | ||||
| } | ||||
| 
 | ||||
| /* -------------------------------------------------------------- */ | ||||
| /*
 | ||||
|  *    I think that this function is fully buggy | ||||
|  */ | ||||
| int  fimg_auto_shift_to_zero(FloatImg *src, FloatImg *dst) | ||||
| { | ||||
| float		coefs[6]; | ||||
| int		foo; | ||||
| float		minima = 1e7;		/* magic value ? */ | ||||
| 
 | ||||
| if (FIMG_TYPE_RGB != src->type) { | ||||
| 	fprintf(stderr, "%s: bad image type %d\n", __func__, src->type); | ||||
| @ -87,6 +91,13 @@ if (foo) { | ||||
| 	return foo; | ||||
| 	} | ||||
| 
 | ||||
| /* crude hack for now */ | ||||
| if (coefs[0] < minima)	minima = coefs[0]; | ||||
| if (coefs[2] < minima)	minima = coefs[2]; | ||||
| if (coefs[4] < minima)	minima = coefs[4]; | ||||
| 
 | ||||
| coefs[0] = coefs[2] = coefs[4] = minima; | ||||
| 
 | ||||
| foo = fimg_shift_to_zero(src, dst, coefs); | ||||
| if (foo) { | ||||
| 	fprintf(stderr, "%s WTF?\n", __func__); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user