Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added cvAddWeighted.

Wrapped the cvAddWeighted function as add-weighted to do alpha blending.
  • Loading branch information...
commit 68ff9f2289ca0805902647c2b8772f7e4217c551 1 parent 82e790d
authored
10  core.lisp
@@ -113,6 +113,16 @@ and store them in DEST."
113 113
   "Calculate the absolute difference between elements of SRC and a fixed vector of values SCALAR. Store the result in DEST."
114 114
   (apply #'%abs-diff-scalar-glue src dest scalar))
115 115
 
  116
+;; void cvAddWeighted(const CvArr* src1, double alpha, const CvArr* src2, 
  117
+;;                    double beta, double gamma, CvArr* dst)
  118
+(defcfun ("cvAddWeighted" add-weighted) :void
  119
+  (src1 cv-array)
  120
+  (alpha :double)
  121
+  (src2 cv-array)
  122
+  (beta :double)
  123
+  (dest cv-array)
  124
+  (gamma :double))
  125
+
116 126
 ;; void cvCopy(const CvArr* src, CvArr* dst, const CvArr* mask=NULL)
117 127
 (defcfun ("cvCopy" %copy) :void
118 128
   (src cv-array)
5  frdiff.sh
... ...
@@ -0,0 +1,5 @@
  1
+#!/bin/sh
  2
+sbcl --noinform --eval "(asdf:operate 'asdf:load-op :cl-opencv-test)" \
  3
+    --eval "(cl-opencv-test:camera-frame-diff)" \
  4
+    --eval "(sb-ext:quit)"
  5
+exit 0
1  package.lisp
@@ -45,6 +45,7 @@
45 45
    ;; core - operations on arrays
46 46
    #:abs-diff
47 47
    #:abs-diff-scalar
  48
+   #:add-weighted
48 49
    #:copy
49 50
    #:create-image
50 51
    #:get-size

0 notes on commit 68ff9f2

Please sign in to comment.
Something went wrong with that request. Please try again.