Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Apply jurgensmirnoff's patch for cvIplDepth and include cvaux.h in op…

…encv.h for OpenCV 2.0
  • Loading branch information...
commit 94340872bccfd3f6640b6814c44df4dfb8bb7b27 1 parent 45478f2
Jeff Rafter authored
Showing with 10 additions and 3 deletions.
  1. +6 −0 .gitignore
  2. +3 −3 ext/iplimage.cpp
  3. +1 −0  ext/opencv.h
View
6 .gitignore
@@ -0,0 +1,6 @@
+.DS_Store
+examples/data
+*.o
+Makefile
+mkmf.log
+opencv.bundle
View
6 ext/iplimage.cpp
@@ -88,7 +88,7 @@ rb_initialize(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "22", &width, &height, &depth, &channel);
int _depth = argc < 3 ? CV_8U : FIX2INT(depth);
int _channel = argc < 4 ? 3 : FIX2INT(channel);
- DATA_PTR(self) = cvCreateImage(cvSize(FIX2INT(width), FIX2INT(height)), cvCvToIplDepth(_depth), _channel);
+ DATA_PTR(self) = cvCreateImage(cvSize(FIX2INT(width), FIX2INT(height)), cvIplDepth(_depth), _channel);
return self;
}
@@ -225,13 +225,13 @@ rb_reset_coi(VALUE self)
VALUE
new_object(int width, int height, int type)
{
- return OPENCV_OBJECT(rb_klass, cvCreateImage(cvSize(width, height), cvCvToIplDepth(type), CV_MAT_CN(type)));
+ return OPENCV_OBJECT(rb_klass, cvCreateImage(cvSize(width, height), cvIplDepth(type), CV_MAT_CN(type)));
}
VALUE
new_object(CvSize size, int type)
{
- return OPENCV_OBJECT(rb_klass, cvCreateImage(size, cvCvToIplDepth(type), CV_MAT_CN(type)));
+ return OPENCV_OBJECT(rb_klass, cvCreateImage(size, cvIplDepth(type), CV_MAT_CN(type)));
}
__NAMESPACE_END_IPLIMAGE
View
1  ext/opencv.h
@@ -50,6 +50,7 @@ extern "C"{
// OpenCV headers
#include <cxcore.h>
+#include <cvaux.h>
#include <cv.h>
#include <highgui.h>
#include <cxmisc.h>
Please sign in to comment.
Something went wrong with that request. Please try again.