Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implement pyr-down

  • Loading branch information...
commit a02f262a2a061d7b8ac1b650b0fc0b4e8205a1b6 1 parent f357114
Nurullah Akkaya nakkaya authored
Showing with 14 additions and 0 deletions.
  1. +9 −0 resources/lib/vision.c
  2. +5 −0 src/vision/core.clj
9 resources/lib/vision.c
View
@@ -849,6 +849,15 @@ void release_surf(void* p){
free(surf);
}
+void* pyr_down(void* i){
+ IplImage* img = (IplImage*)i;
+ IplImage* out = cvCreateImage(cvSize(img->width/2,img->height/2), img->depth, img->nChannels);
+
+ cvPyrDown(img, out, CV_GAUSSIAN_5x5);
+
+ return (void*)out;
+}
+
/*
Drawing Functions
*/
5 src/vision/core.clj
View
@@ -421,6 +421,11 @@
(defmethod release Surf [s]
(call :release_surf [(:pointer s)]))
+(defn pyr-down
+ "Downsamples an image."
+ [{p :pointer t :color-space}]
+ (ipl-image (call :pyr_down Pointer [p]) t))
+
;;
;; GUI Calls
;;
Please sign in to comment.
Something went wrong with that request. Please try again.