mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
Apply jurgensmirnoff's patch for cvIplDepth and include cvaux.h in opencv.h for OpenCV 2.0
This commit is contained in:
parent
45478f2dfe
commit
94340872bc
3 changed files with 10 additions and 3 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
.DS_Store
|
||||
examples/data
|
||||
*.o
|
||||
Makefile
|
||||
mkmf.log
|
||||
opencv.bundle
|
|
@ -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
|
||||
|
|
|
@ -50,6 +50,7 @@ extern "C"{
|
|||
|
||||
// OpenCV headers
|
||||
#include <cxcore.h>
|
||||
#include <cvaux.h>
|
||||
#include <cv.h>
|
||||
#include <highgui.h>
|
||||
#include <cxmisc.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue