Skip to content

Commit

Permalink
implement pyr-down
Browse files Browse the repository at this point in the history
  • Loading branch information
nakkaya committed Feb 20, 2011
1 parent f357114 commit a02f262
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/lib/vision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions src/vision/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

0 comments on commit a02f262

Please sign in to comment.