Example:Hough transform/Tcl: Difference between revisions

m
Fixed syntax highlighting.
m (Add SMW link)
m (Fixed syntax highlighting.)
 
(One intermediate revision by one other user not shown)
Line 1:
[[implementation of task::Hough transform| ]]
=={{Programming-example-page|task=Hough transform|language=Tcl}}==
 
<langsyntaxhighlight lang="tcl">package require Tk
 
set PI 3.1415927
Line 75:
$trg put [list $row] -to 0 $rho
}
}</langsyntaxhighlight>
 
===Demonstration Code===
Line 81:
 
{{works with|Tk|8.6}} or TkImg
<langsyntaxhighlight lang="tcl"># Demonstration code
if {[catch {
package require Tk 8.6; # Just for PNG format handler
Line 96:
pack [label .l2.i -image targetImg]
# Postpone until after we've drawn ourselves
after idle HoughTransform srcImg targetImg [lrange $argv 1 end]</langsyntaxhighlight>
 
[[Image:Hough-Pentagon-Tcl-Results.gif|thumb|left|360x200px|Image produced by Tcl implementation of the Hough transform when applied to the sample pentagon image.]]
9,485

edits