| 1 | package Image::Compare::THRESHOLD; | ||||||||||
| 2 | |||||||||||
| 3 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 8 | ▶ | use base qw/Image::Compare::Comparator/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 5 | ▶ | sub setup { | ||||||||
|
Subroutine
setup: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 9 | 5 | my $self = shift; | |||||||||
| 10 | 5 | $self->SUPER::setup(@_); | |||||||||
| 11 | # Default to true, we will return 0 if we run into trouble later. | ||||||||||
| 12 | 5 | $self->{result} = 1; | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 24 | ▶ | sub accumulate { | ||||||||
|
Subroutine
accumulate: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 16 | 24 | my $self = shift; | |||||||||
| 17 | 24 | my $diff = $self->color_distance(@_); | |||||||||
| 18 | 24 | ▶ | if ($diff > $self->{args}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 6 | $self->{result} = 0; | |||||||||
| 20 | 6 | return 1; | |||||||||
| 21 | } | ||||||||||
| 22 | 18 | return undef; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 5 | ▶ | sub get_result { | ||||||||
|
Subroutine
get_result: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 26 | 5 | my $self = shift; | |||||||||
| 27 | 5 | return $self->{result}; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 8 | 1; | |||||||||
| 31 | |||||||||||
| 32 | __END__ | ||||||||||