From 6ba71dfdeadd887ae1d2ee6402902084b77dceb9 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Tue, 7 Feb 2023 03:04:49 -0500 Subject: Camera: Direct decompress to grayscale from the camera JPEG. This produces a sort of terrifying performance improvement for the Camera subsystem (~30% faster on Pi 4 720p). Also (for now) heap-allocate a fresh image buffer for each camera frame -- a little gross but seems to work ok. It will probablycause new reactions on each camera frame, though, since pointers will now churn. (This is probably actually the right behavior.) Also temporarily disable camera-slice and images virtual programs, which I haven't tested yet. Calibration and Camera.tcl demo are tested and working here, though, at least on the Pi 4. --- virtual-programs/camera-slice.folk | 2 ++ virtual-programs/images.folk | 2 ++ 2 files changed, 4 insertions(+) (limited to 'virtual-programs') diff --git a/virtual-programs/camera-slice.folk b/virtual-programs/camera-slice.folk index 4812a302..3fac49da 100644 --- a/virtual-programs/camera-slice.folk +++ b/virtual-programs/camera-slice.folk @@ -2,6 +2,8 @@ Wish $this has filename "camera-slice.folk" Wish $this has camera image Wish $this is outlined thick palegoldenrod +return + When $this has camera image /im/ { When $this has region /r/ { set coords [lmap n [lindex $r 0 0] {expr $n * 1}] diff --git a/virtual-programs/images.folk b/virtual-programs/images.folk index 84c74faa..498c79cb 100644 --- a/virtual-programs/images.folk +++ b/virtual-programs/images.folk @@ -22,6 +22,8 @@ namespace eval ::image { namespace ensemble create } +return + When /someone/ wishes /p/ has camera image { When the camera frame is /f/ { When $p has region /r/ { -- cgit v1.2.3