 
 (defn draw [state]
   (let [{:keys [p-image]} state]
+    (q/background 0)
     (q/image p-image 0 0)))
 
 (defn on-close

  (:import
   [org.opencv.highgui Highgui VideoCapture]
   [org.opencv.core CvType Mat]
   [java.nio ByteBuffer]))

(def WIDTH 640)
(def HEIGHT 480)

;; bArray is the temporary byte array buffer for OpenCV cv::Mat.
;; iArray is the temporary integer array buffer for PImage pixels.
(defn setup []
  (q/frame-rate 60)
  {:b-array (byte-array PIX-CNT1)
   :i-array (int-array PIX-CNT2)
   :frame-mat (Mat. WIDTH HEIGHT CvType/CV_8UC4)
