1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

add Algorithm class and modify FaceRecognizer to inherit it

This commit is contained in:
ser1zw 2013-07-07 06:06:13 +09:00
parent 70d10febd2
commit 2e63bbd856
6 changed files with 345 additions and 1 deletions

38
ext/opencv/algorithm.h Normal file
View file

@ -0,0 +1,38 @@
/************************************************************
algorithm.h
$Author: ser1zw $
Copyright (C) 2013 ser1zw
************************************************************/
#ifndef RUBY_OPENCV_ALGORITHM_H
#define RUBY_OPENCV_ALGORITHM_H
#include "opencv.h"
#define __NAMESPACE_BEGIN_ALGORITHM namespace cAlgorithm {
#define __NAMESPACE_END_ALGORITM }
__NAMESPACE_BEGIN_OPENCV
__NAMESPACE_BEGIN_ALGORITHM
VALUE rb_class();
void define_ruby_class();
__NAMESPACE_END_ALGORITM
inline cv::Algorithm*
ALGORITHM(VALUE object)
{
cv::Algorithm *ptr;
Data_Get_Struct(object, cv::Algorithm, ptr);
return ptr;
}
__NAMESPACE_END_OPENCV
#endif // RUBY_OPENCV_ALGORITHM_H