Command-line tool images2sgf.
[Image2SGF.git] / images2sgf
blob2e5b43ba3a45a7a0cec4e1889b8659d9e52e2bd0
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
5 # support running from build dir
6 BEGIN { push @INC, 'blib/lib' if -e 'blib/lib'; }
8 use Games::Go::Image2SGF;
10 my $images = [];
11 foreach my $arg (@ARGV) {
12 die "File not found: $arg" unless -e $arg;
13 push @$images, { file => $arg };
15 my $board = Games::Go::Image2SGF->
16 new(
17 #board => [ 200, 100, 100 ],
18 images => $images,
19 scalefactor => 0.5,
20 sample_radius => 5
23 $board->to_sgf;
24 print $board->{sgf};