Hough transform: Difference between revisions

m
m (→‎{{header|Perl}}: use better pi value)
Line 707:
my $th = $dth*$k;
my $r = ($x*cos($th) + $y*sin($th));
my $iry = ($height/2 + ($r/$dr).round(1)).Int;
my $c = '#' ~ (@canvas[$iry][$k]--).base(16) x 3;
%cstore{$c} = $image.colorAllocate($c) if %cstore{$c}:!exists;
10,333

edits