I try to use computer vision library with racket.

;; API
(define libhighgui (ffi-lib "libhighgui" '("2.1" "4")))
(define-cpointer-type _cv-capture)

;; /* start capturing frames from camera: index = camera_index +
domain_offset (CV_CAP_*) */
;; CVAPI(CvCapture*) cvCreateCameraCapture( int index );
(define cvCreateCameraCapture
  (get-ffi-obj "cvCreateCameraCapture" libhighgui (_fun _int -> (_or-null
_cv-capture))))

;; /* stop capturing/reading and free resources */
;; CVAPI(void) cvReleaseCapture( CvCapture** capture );
(define cvReleaseCapture
  (get-ffi-obj "cvReleaseCapture" libhighgui (_fun _pointer -> _void)))

;;application
(define capture (cvCreateCameraCapture 0)

How I can release the capture (how to emulate CvCapture**  for
cvReleaseCapture)?

Alex.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to