Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	.gitignore
	CMakeLists.txt
	doc/CMakeLists.txt
	modules/calib3d/src/stereosgbm.cpp
	modules/core/include/opencv2/core/mat.hpp
	modules/highgui/src/cap_openni.cpp
	modules/ml/include/opencv2/ml/ml.hpp
	modules/objdetect/src/hog.cpp
	modules/ocl/perf/perf_color.cpp
	modules/ocl/src/arithm.cpp
	modules/ocl/src/filtering.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/src/optical_flow_farneback.cpp
	platforms/scripts/camera_build.conf
	platforms/scripts/cmake_android_all_cameras.py
	samples/cpp/Qt_sample/main.cpp
	samples/cpp/tutorial_code/introduction/windows_visual_studio_Opencv/Test.cpp
This commit is contained in:
Roman Donchenko
2013-11-26 15:05:26 +04:00
111 changed files with 1015 additions and 470 deletions

View File

@@ -2928,8 +2928,10 @@ void HOGDescriptor::readALTModel(String modelfile)
double *linearwt = new double[totwords+1];
int length = totwords;
nread = fread(linearwt, sizeof(double), totwords + 1, modelfl);
if(nread != static_cast<size_t>(length) + 1)
if(nread != static_cast<size_t>(length) + 1) {
delete [] linearwt;
throw Exception();
}
for(int i = 0; i < length; i++)
detector.push_back((float)linearwt[i]);

View File

@@ -144,6 +144,7 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
free(points);
free(oppPoints);
free(score);
free(scoreOut);
return result_seq;
}

View File

@@ -741,8 +741,11 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
//printf("parse : %s\n", filename);
xmlf = fopen(filename, "rb");
if(xmlf == NULL)
if(xmlf == NULL) {
free(*model);
*model = NULL;
return LSVM_PARSER_FILE_NOT_FOUND;
}
//i = 0;
j = 0;
@@ -787,7 +790,7 @@ int loadModel(
float *scoreThreshold){
int last;
int max;
int *comp;
int *comp = NULL;
int count;
int i;
int err;
@@ -808,6 +811,7 @@ int loadModel(
(*kPartFilters)[i] = (comp[i] - comp[i - 1]) - 1;
}
(*kPartFilters)[0] = comp[0];
free(comp);
return 0;
}