1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Build for embedded systems

This commit is contained in:
Maksim Shabunin
2017-11-28 12:53:40 +03:00
parent 9665dde678
commit 7349b8f5ce
25 changed files with 184 additions and 135 deletions
@@ -284,23 +284,23 @@ bool cv::DetectionBasedTracker::SeparateDetectionWork::run()
}
#define CATCH_ALL_AND_LOG(_block) \
try { \
CV_TRY { \
_block; \
} \
catch(cv::Exception& e) { \
CV_CATCH(cv::Exception, e) { \
LOGE0("\n %s: ERROR: OpenCV Exception caught: \n'%s'\n\n", CV_Func, e.what()); \
} catch(std::exception& e) { \
} CV_CATCH(std::exception, e) { \
LOGE0("\n %s: ERROR: Exception caught: \n'%s'\n\n", CV_Func, e.what()); \
} catch(...) { \
} CV_CATCH_ALL { \
LOGE0("\n %s: ERROR: UNKNOWN Exception caught\n\n", CV_Func); \
}
void* cv::workcycleObjectDetectorFunction(void* p)
{
CATCH_ALL_AND_LOG({ ((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->workcycleObjectDetector(); });
try{
CV_TRY{
((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->init();
} catch(...) {
} CV_CATCH_ALL {
LOGE0("DetectionBasedTracker: workcycleObjectDetectorFunction: ERROR concerning pointer, received as the function parameter");
}
return NULL;
+7 -7
View File
@@ -3686,7 +3686,7 @@ void HOGDescriptor::readALTModel(String modelfile)
String eerr("file not exist");
String efile(__FILE__);
String efunc(__FUNCTION__);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
CV_THROW (Exception(Error::StsError, eerr, efile, efunc, __LINE__));
}
char version_buffer[10];
if (!fread (&version_buffer,sizeof(char),10,modelfl))
@@ -3696,7 +3696,7 @@ void HOGDescriptor::readALTModel(String modelfile)
String efunc(__FUNCTION__);
fclose(modelfl);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
CV_THROW (Exception(Error::StsError, eerr, efile, efunc, __LINE__));
}
if(strcmp(version_buffer,"V6.01")) {
String eerr("version doesnot match");
@@ -3704,14 +3704,14 @@ void HOGDescriptor::readALTModel(String modelfile)
String efunc(__FUNCTION__);
fclose(modelfl);
throw Exception(Error::StsError, eerr, efile, efunc, __LINE__);
CV_THROW (Exception(Error::StsError, eerr, efile, efunc, __LINE__));
}
/* read version number */
int version = 0;
if (!fread (&version,sizeof(int),1,modelfl))
{
fclose(modelfl);
throw Exception();
CV_THROW (Exception());
}
if (version < 200)
{
@@ -3719,7 +3719,7 @@ void HOGDescriptor::readALTModel(String modelfile)
String efile(__FILE__);
String efunc(__FUNCTION__);
fclose(modelfl);
throw Exception();
CV_THROW (Exception());
}
int kernel_type;
size_t nread;
@@ -3765,7 +3765,7 @@ void HOGDescriptor::readALTModel(String modelfile)
if(nread != static_cast<size_t>(length) + 1) {
delete [] linearwt;
fclose(modelfl);
throw Exception();
CV_THROW (Exception());
}
for(int i = 0; i < length; i++)
@@ -3776,7 +3776,7 @@ void HOGDescriptor::readALTModel(String modelfile)
delete [] linearwt;
} else {
fclose(modelfl);
throw Exception();
CV_THROW (Exception());
}
fclose(modelfl);
}