Revert commit 123326c299
This commit is contained in:
parent
d9bcf3aeef
commit
fe0476f36b
|
@ -94,7 +94,7 @@ void Detector::log(int nLogLevel, string sLevel, string sMessage)
|
||||||
* \param score is the detection score
|
* \param score is the detection score
|
||||||
* \return true if detection is effective
|
* \return true if detection is effective
|
||||||
*/
|
*/
|
||||||
bool Detector::Detect(const Image* zmImage, Zone** zones, Event::StringSet &zoneSet, unsigned int &score)
|
bool Detector::Detect(const Image &zmImage, Zone** zones, Event::StringSet &zoneSet, unsigned int &score)
|
||||||
{
|
{
|
||||||
bool alarm = false;
|
bool alarm = false;
|
||||||
char szMessage[100];
|
char szMessage[100];
|
||||||
|
@ -112,7 +112,7 @@ bool Detector::Detect(const Image* zmImage, Zone** zones, Event::StringSet &zone
|
||||||
continue;
|
continue;
|
||||||
sprintf(szMessage, "Checking preclusive zone %s", zone->Label());
|
sprintf(szMessage, "Checking preclusive zone %s", zone->Label());
|
||||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||||
if (checkZone(zone, *it, *zmImage))
|
if (checkZone(zone, *it, &zmImage))
|
||||||
{
|
{
|
||||||
alarm = true;
|
alarm = true;
|
||||||
score += zone->Score();
|
score += zone->Score();
|
||||||
|
@ -145,7 +145,7 @@ bool Detector::Detect(const Image* zmImage, Zone** zones, Event::StringSet &zone
|
||||||
continue;
|
continue;
|
||||||
if (zone->IsPostProcEnabled() && !zone->IsPostProcInProgress())
|
if (zone->IsPostProcEnabled() && !zone->IsPostProcInProgress())
|
||||||
continue;
|
continue;
|
||||||
if (checkZone(zone, *it, *zmImage))
|
if (checkZone(zone, *it, &zmImage))
|
||||||
{
|
{
|
||||||
alarm = true;
|
alarm = true;
|
||||||
score += zone->Score();
|
score += zone->Score();
|
||||||
|
@ -176,7 +176,7 @@ bool Detector::Detect(const Image* zmImage, Zone** zones, Event::StringSet &zone
|
||||||
continue;
|
continue;
|
||||||
sprintf(szMessage, "Checking inclusive zone %s", zone->Label());
|
sprintf(szMessage, "Checking inclusive zone %s", zone->Label());
|
||||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||||
if (checkZone(zone, *it, *zmImage))
|
if (checkZone(zone, *it, &zmImage))
|
||||||
{
|
{
|
||||||
alarm = true;
|
alarm = true;
|
||||||
score += zone->Score();
|
score += zone->Score();
|
||||||
|
@ -207,7 +207,7 @@ bool Detector::Detect(const Image* zmImage, Zone** zones, Event::StringSet &zone
|
||||||
continue;
|
continue;
|
||||||
sprintf(szMessage, "Checking exclusive zone %s", zone->Label());
|
sprintf(szMessage, "Checking exclusive zone %s", zone->Label());
|
||||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||||
if (checkZone(zone, *it, *zmImage))
|
if (checkZone(zone, *it, &zmImage))
|
||||||
{
|
{
|
||||||
alarm = true;
|
alarm = true;
|
||||||
score += zone->Score();
|
score += zone->Score();
|
||||||
|
|
|
@ -76,7 +76,7 @@ public:
|
||||||
Detector& operator=(const Detector& source);
|
Detector& operator=(const Detector& source);
|
||||||
|
|
||||||
//! Detect (in an image later)
|
//! Detect (in an image later)
|
||||||
bool Detect(const Image* image, Zone** zones, Event::StringSet &zoneSet, unsigned int &score);
|
bool Detect(const Image &image, Zone** zones, Event::StringSet &zoneSet, unsigned int &score);
|
||||||
|
|
||||||
//! Load detector's parameters.
|
//! Load detector's parameters.
|
||||||
virtual int loadConfig(string sConfigFileName, map<unsigned int,map<string,string> > mapPluginConf) = 0;
|
virtual int loadConfig(string sConfigFileName, map<unsigned int,map<string,string> > mapPluginConf) = 0;
|
||||||
|
|
|
@ -61,7 +61,7 @@ bool ImageAnalyser::DoDetection(const Image &comp_image, Zone** zones, Event::St
|
||||||
++It )
|
++It )
|
||||||
{
|
{
|
||||||
unsigned int detect_score = 0;
|
unsigned int detect_score = 0;
|
||||||
if ( (*It)->Detect( &comp_image, zones, zoneSet, detect_score ) )
|
if ( (*It)->Detect( comp_image, zones, zoneSet, detect_score ) )
|
||||||
{
|
{
|
||||||
alarm = true;
|
alarm = true;
|
||||||
score += detect_score;
|
score += detect_score;
|
||||||
|
|
Loading…
Reference in New Issue