User Tools

Site Tools


guides:opencv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:opencv [2024/01/30 02:14] discordguides:opencv [2024/02/02 04:22] (current) discord
Line 1: Line 1:
-Instructions for integrating OpenCV with Folk.+//Original Author: Jacob Haip. 
 +Contributions welcome!// 
 + 
 +Instructions for integrating OpenCV with Folk. This guide involves a manual compilation set outside of folk, but the creation of the wrapper files and the compilation (via an TCL "exec" call) could also be moved within a folk program to completely encapsulate the code.
  
 1. Install OpenCV 1. Install OpenCV
Line 133: Line 136:
     Claim $this' has region [region move $r down 110%]     Claim $this' has region [region move $r down 110%]
 } }
 +
 +set ::opencvOldFrames [list]
 When $this' has camera slice /slice/ & $this has region /r/ { When $this' has camera slice /slice/ & $this has region /r/ {
     set grayImg [opencvAdaptiveThreshold $slice]     set grayImg [opencvAdaptiveThreshold $slice]
Line 138: Line 143:
     Wish to draw an image with center $center image $grayImg radians 0 scale 2     Wish to draw an image with center $center image $grayImg radians 0 scale 2
  
-    After 100 milliseconds +    lappend ::opencvOldFrames $grayImg 
-        image freeImage $grayImg+    if {[llength $::opencvOldFrames] >= 10} { 
 +        set ::opencvOldFrames [lassign $::opencvOldFrames oldestFrame] 
 +        image freeImage $oldestFrame
     }     }
 } }
 </code> </code>
 +
 +{{:guides:opencv-threshold-example.jpeg?400|}}
guides/opencv.1706580873.txt.gz · Last modified: 2024/01/30 02:14 by discord

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki