Move C API of opencv_objdetect to separate file

Also move cv::linemod to own header
This commit is contained in:
Andrey Kamaev
2013-04-12 12:11:11 +04:00
parent e5a33723fc
commit 5e048d1fa5
32 changed files with 881 additions and 775 deletions

View File

@@ -1,6 +1,8 @@
#ifndef _LSVM_ROUTINE_H_
#define _LSVM_ROUTINE_H_
#include "opencv2/objdetect/objdetect_c.h"
#include "_lsvm_types.h"
#include "_lsvm_error.h"

View File

@@ -1,5 +1,6 @@
#ifndef LSVM_PARSER
#define LSVM_PARSER
#include "opencv2/objdetect/objdetect_c.h"
#include "_lsvm_types.h"

View File

@@ -43,6 +43,7 @@
#include <cstdio>
#include "cascadedetect.hpp"
#include "opencv2/objdetect/objdetect_c.h"
#if defined (LOG_CASCADE_STATISTIC)
struct Logger

View File

@@ -1,7 +1,7 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/objdetect/objdetect_c.h"
#include <deque>
#include <algorithm>
class Sampler {

View File

@@ -43,6 +43,7 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/objdetect/objdetect_c.h"
#include <stdio.h>
#if CV_SSE2

View File

@@ -41,6 +41,7 @@
//M*/
#include "precomp.hpp"
#include "opencv2/core/core_c.h"
#include <cstdio>
#include <iterator>
@@ -2862,7 +2863,7 @@ void HOGDescriptor::readALTModel(String modelfile)
String eerr("file not exist");
String efile(__FILE__);
String efunc(__FUNCTION__);
throw Exception(CV_StsError, eerr, efile, efunc, __LINE__);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
}
char version_buffer[10];
if (!fread (&version_buffer,sizeof(char),10,modelfl))
@@ -2870,13 +2871,13 @@ void HOGDescriptor::readALTModel(String modelfile)
String eerr("version?");
String efile(__FILE__);
String efunc(__FUNCTION__);
throw Exception(CV_StsError, eerr, efile, efunc, __LINE__);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
}
if(strcmp(version_buffer,"V6.01")) {
String eerr("version doesnot match");
String efile(__FILE__);
String efunc(__FUNCTION__);
throw Exception(CV_StsError, eerr, efile, efunc, __LINE__);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
}
/* read version number */
int version = 0;

View File

@@ -1,5 +1,6 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/objdetect/objdetect_c.h"
#include "_lsvmparser.h"
#include "_lsvm_matching.h"

View File

@@ -66,7 +66,7 @@ static inline int getLabel(int quantized)
case 64: return 6;
case 128: return 7;
default:
CV_Error(CV_StsBadArg, "Invalid value of quantized parameter");
CV_Error(Error::StsBadArg, "Invalid value of quantized parameter");
return -1; //avoid warning
}
}
@@ -1398,17 +1398,17 @@ void Detector::match(const std::vector<Mat>& sources, float threshold, std::vect
if (quantized_images.needed())
quantized_images.create(1, static_cast<int>(pyramid_levels * modalities.size()), CV_8U);
assert(sources.size() == modalities.size());
CV_Assert(sources.size() == modalities.size());
// Initialize each modality with our sources
std::vector< Ptr<QuantizedPyramid> > quantizers;
for (int i = 0; i < (int)modalities.size(); ++i){
Mat mask, source;
source = sources[i];
if(!masks.empty()){
assert(masks.size() == modalities.size());
CV_Assert(masks.size() == modalities.size());
mask = masks[i];
}
assert(mask.empty() || mask.size() == source.size());
CV_Assert(mask.empty() || mask.size() == source.size());
quantizers.push_back(modalities[i]->process(source, mask));
}
// pyramid level -> modality -> quantization

View File

@@ -1,4 +1,5 @@
#include "precomp.hpp"
#include "opencv2/objdetect/objdetect_c.h"
#include "_lsvm_matching.h"
#include <stdio.h>