Permalink
Browse files

Added cvAddWeighted.

Wrapped the cvAddWeighted function as add-weighted to do alpha blending.
  • Loading branch information...
1 parent 82e790d commit 68ff9f2289ca0805902647c2b8772f7e4217c551 Jay Bromley committed Mar 16, 2011
Showing with 16 additions and 0 deletions.
  1. +10 −0 core.lisp
  2. +5 −0 frdiff.sh
  3. +1 −0 package.lisp
View
@@ -113,6 +113,16 @@ and store them in DEST."
"Calculate the absolute difference between elements of SRC and a fixed vector of values SCALAR. Store the result in DEST."
(apply #'%abs-diff-scalar-glue src dest scalar))
+;; void cvAddWeighted(const CvArr* src1, double alpha, const CvArr* src2,
+;; double beta, double gamma, CvArr* dst)
+(defcfun ("cvAddWeighted" add-weighted) :void
+ (src1 cv-array)
+ (alpha :double)
+ (src2 cv-array)
+ (beta :double)
+ (dest cv-array)
+ (gamma :double))
+
;; void cvCopy(const CvArr* src, CvArr* dst, const CvArr* mask=NULL)
(defcfun ("cvCopy" %copy) :void
(src cv-array)
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+sbcl --noinform --eval "(asdf:operate 'asdf:load-op :cl-opencv-test)" \
+ --eval "(cl-opencv-test:camera-frame-diff)" \
+ --eval "(sb-ext:quit)"
+exit 0
View
@@ -45,6 +45,7 @@
;; core - operations on arrays
#:abs-diff
#:abs-diff-scalar
+ #:add-weighted
#:copy
#:create-image
#:get-size

0 comments on commit 68ff9f2

Please sign in to comment.