diff options
| author | Omar Rizwan <omar@omar.website> | 2022-12-23 22:13:06 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2022-12-23 22:13:06 +0000 |
| commit | a7e4a6cc4c4d89f5d8e2830e5fd933fdc5d6a00c (patch) | |
| tree | e1a2c76a61390ef5de6bca505690e826b0c26bcd /virtual-programs | |
| parent | More scoping stuff. I think this actually works (diff) | |
| download | folk-a7e4a6cc4c4d89f5d8e2830e5fd933fdc5d6a00c.tar.gz folk-a7e4a6cc4c4d89f5d8e2830e5fd933fdc5d6a00c.zip | |
Fixup tags-and-calibration in hacky way for stricter scoping
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/tags-and-calibration.folk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/virtual-programs/tags-and-calibration.folk b/virtual-programs/tags-and-calibration.folk index fa32304c..1d3afc8e 100644 --- a/virtual-programs/tags-and-calibration.folk +++ b/virtual-programs/tags-and-calibration.folk @@ -55,15 +55,15 @@ set ::H [subst { }] set ::Hinv [solvePGauss $::H [math::linearalgebra::mkIdentity 3]] -proc cameraToProjector {cameraPoint} { +proc ::cameraToProjector {cameraPoint} { # FIXME: this is slow but not the cause of leak - lassign [matmul $::H [list [lindex $cameraPoint 0] [lindex $cameraPoint 1] 1]] Hx Hy Hz + lassign [::math::linearalgebra::matmul $::H [list [lindex $cameraPoint 0] [lindex $cameraPoint 1] 1]] Hx Hy Hz set Hx [expr {$Hx / $Hz}] set Hy [expr {$Hy / $Hz}] return [list $Hx $Hy] } -proc projectorToCamera {projectorPoint} { - lassign [matmul $::Hinv [list [lindex $projectorPoint 0] [lindex $projectorPoint 1] 1]] Hinvx Hinvy Hinvz +proc ::projectorToCamera {projectorPoint} { + lassign [::math::linearalgebra::matmul $::Hinv [list [lindex $projectorPoint 0] [lindex $projectorPoint 1] 1]] Hinvx Hinvy Hinvz set Hinvx [expr {$Hinvx / $Hinvz}] set Hinvy [expr {$Hinvy / $Hinvz}] return [list $Hinvx $Hinvy] |
