1VISGREP(1)                  General Commands Manual                 VISGREP(1)
2
3
4

NAME

6       visgrep - Visual grep, greps for images in another image
7

SYNOPSIS

9       visgrep [options] image.png detect.png match.png ...
10

DESCRIPTION

12       visgrep is a program that greps for image in another image.
13
14       The detect.png and match.png files can also be .pat files.
15
16       All  .pat  files  are  created  using  png2pat(1)  or  rgb2pat(1).  The
17       image.png is scanned for detect.pat starting from X,Y given in  parame‐
18       ters.   When  detect.pat  is  found,  then  all the match.pat files are
19       scanned at an offset of x,y given in parameters. If a match  is  found,
20       then visgrep prints the x,y and index of the item.
21
22       For example, image.png is a screenshot and match1.pat .. match5.pat are
23       images of letters a to e. Each of these letters is enclosed in  a  blue
24       box,  so  detect.pat  is  an image of the upper left corner of the box.
25       This box is not included in the match*.pat files, so they are  actually
26       offset  5  pixels down and 4 pixels to the left.  You might run it like
27       this then:
28
29         visgrep -x-4 -y5 image.png match_corner.pat  match_a.pat  match_b.bat
30       ...
31
32       Etc, with all matches listed. Now suppose the screen showed ace so vis‐
33       grep might output:
34
35         10,10 0
36         50,10 2
37         90,10 4
38
39       Showing that match_a.pat (index 0) is at 10,10 on  the  screen.  If  no
40       match is found even though the detection image is found, the index will
41       be -1.
42
43

OPTIONS

45       A summary of options is included below.
46
47       -h     Show summary of options.
48
49       -x     Set x offset for detection matching.
50
51       -y     Set y offset for detection matching.
52
53       -X     Start scanning at X.
54
55       -Y     Start scanning at Y.
56
57       -t     Set tolerance for 'fuzzy' matches, higher numbers are more  tol‐
58              erant.
59
60

EXIT STATUS

62       0      at least one match was made.
63
64       1      no matches were made.
65
66       2      an error occured.
67
68

SEE ALSO

70       pat2ppm(1), patextract(1), png2pat(1), rgb2pat(1), xte(1).
71
72

AUTHOR

74       visgrep was written by Steve Slaven <bpk@hoopajoo.net>.
75
76       This  manual  page  was written by Aurelien Jarno <aurel32@debian.org>,
77       for the Debian project (but may be used by others).
78
79
80
81                                April 20, 2004                      VISGREP(1)
Impressum