forked from tTh/FloatImg
		
	a few oops...
This commit is contained in:
		
							parent
							
								
									0f245582d5
								
							
						
					
					
						commit
						2c1687f82b
					
				@ -134,7 +134,7 @@ if (notused) {
 | 
			
		||||
	fprintf(stderr, "notused was %d, must be 0 in %s\n",
 | 
			
		||||
				notused, 		__func__);	}
 | 
			
		||||
 | 
			
		||||
if (verbosity > 1) fprintf(stderr, "parsing '%s'\n", str);
 | 
			
		||||
if (verbosity > 1) fprintf(stderr, "%s: parsing '%s'\n", __func__, str);
 | 
			
		||||
foo = sscanf(str, "%d,%d,%d,%d", &w, &h, &x, &y);
 | 
			
		||||
if (4 == foo) {
 | 
			
		||||
	r->x = x, r->y = y, r->w = w, r->h = h;
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# 
 | 
			
		||||
# 		CAPTURE
 | 
			
		||||
 | 
			
		||||
source ./conf.sh
 | 
			
		||||
 | 
			
		||||
DEVICE="/dev/video0"
 | 
			
		||||
GOPT=" -v -s 1920x1080  -p 0 -n 30"
 | 
			
		||||
GOPT=" -v -s 1920x1080  -p 0 -n 10"
 | 
			
		||||
OUTD=$GRABDIR
 | 
			
		||||
TMPG="/dev/shm/tmpgrab.fimg"
 | 
			
		||||
 | 
			
		||||
@ -15,9 +15,13 @@ do
 | 
			
		||||
	# take the picz
 | 
			
		||||
	${GRAB} -d ${DEVICE} ${GOPT} -o ${TMPG}
 | 
			
		||||
 | 
			
		||||
	# display $TMPG
 | 
			
		||||
 | 
			
		||||
	# only take the good spot
 | 
			
		||||
	fimg=$(printf "%s/%05d.fimg" ${OUTD} ${idx})
 | 
			
		||||
	${EXTR} ${TMPG} 800,600,560,240 ${fimg}
 | 
			
		||||
	${EXTR}  -o ${fimg} ${TMPG} 800,600,560,240 ${fimg}
 | 
			
		||||
 | 
			
		||||
	# display ${fimg} ;  exit
 | 
			
		||||
 | 
			
		||||
	echo
 | 
			
		||||
	sleep $DELAY_GRAB
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,6 @@
 | 
			
		||||
 | 
			
		||||
# Sat Jul  8 10:41:58 UTC 2023
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
#	location of some tools
 | 
			
		||||
#
 | 
			
		||||
@ -6,14 +8,15 @@
 | 
			
		||||
GRAB="$HOME/Devel/FloatImg/v4l2/grabvidseq"
 | 
			
		||||
MKFX="$HOME/Devel/FloatImg/tools/fimgfx"
 | 
			
		||||
MDAT="$HOME/Devel/FloatImg/tools/fimgmetadata"
 | 
			
		||||
EXTR="fimgextract"
 | 
			
		||||
EXTR="$HOME/Devel/FloatImg/tools/fimgextract"
 | 
			
		||||
 | 
			
		||||
INTERPOLATOR="$HOME/Devel/FloatImg/Fonderie/interpolator"
 | 
			
		||||
FONDERIE="$HOME/Devel/FloatImg/Fonderie/fonderie"
 | 
			
		||||
SINGLEPASS="$HOME/Devel/FloatImg/Fonderie/singlepass"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
NBPASS=2400
 | 
			
		||||
DELAY_GRAB=3
 | 
			
		||||
DELAY_GRAB=1
 | 
			
		||||
IDXLINKFARM=0
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,7 @@ printf("-- Fimg Extractor -- lib v%d -- %s %s\n", FIMG_VERSION,
 | 
			
		||||
puts("usage:\n\tfimgextract [options] source.fimg width,height,xpos,ypos");
 | 
			
		||||
puts("options:");
 | 
			
		||||
puts("\t-o out.fimg\tname the output file");
 | 
			
		||||
puts("\t-v\t\tmake be a blabla box");
 | 
			
		||||
puts("\t-v\t\tmake me a blabla box");
 | 
			
		||||
puts("\t-x\t\tenable crashy feature");
 | 
			
		||||
exit(0);
 | 
			
		||||
}
 | 
			
		||||
@ -92,23 +92,25 @@ while ((opt = getopt(argc, argv, "ho:vx")) != -1) {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (verbosity) {
 | 
			
		||||
	fprintf(stderr, "argc = %d  optind = %d\n", argc, optind);
 | 
			
		||||
	for (idx=optind; idx<argc; idx++) {
 | 
			
		||||
		fprintf(stderr, "   %5d   %s\n", idx, argv[idx]);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
if (argc==optind) {
 | 
			
		||||
	fprintf(stderr, "wuh ?\n");
 | 
			
		||||
	exit(0);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
foo = parse_rectangle(argv[argc-1], &area, 0);
 | 
			
		||||
foo = parse_rectangle(argv[optind+1], &area, 0);
 | 
			
		||||
if (4 != foo) {
 | 
			
		||||
	fprintf(stderr, "%s: parse_rectangle --> %d\n", argv[0], foo);
 | 
			
		||||
	exit(1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
foo = extractor(argv[argc-2], output_file, &area);
 | 
			
		||||
foo = extractor(argv[optind], output_file, &area);
 | 
			
		||||
if (foo) {
 | 
			
		||||
	fprintf(stderr, "%s: extractor --> %d\n", __func__, foo);
 | 
			
		||||
	exit(1);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user