Standardize calls to image pointer
This commit is contained in:
parent
ef452cb986
commit
123326c299
|
@ -94,7 +94,7 @@ void Detector::log(int nLogLevel, string sLevel, string sMessage)
|
|||
* \param score is the detection score
|
||||
* \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;
|
||||
char szMessage[100];
|
||||
|
@ -112,7 +112,7 @@ bool Detector::Detect(const Image &zmImage, Zone** zones, Event::StringSet &zone
|
|||
continue;
|
||||
sprintf(szMessage, "Checking preclusive zone %s", zone->Label());
|
||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||
if (checkZone(zone, *it, &zmImage))
|
||||
if (checkZone(zone, *it, *zmImage))
|
||||
{
|
||||
alarm = true;
|
||||
score += zone->Score();
|
||||
|
@ -145,7 +145,7 @@ bool Detector::Detect(const Image &zmImage, Zone** zones, Event::StringSet &zone
|
|||
continue;
|
||||
if (zone->IsPostProcEnabled() && !zone->IsPostProcInProgress())
|
||||
continue;
|
||||
if (checkZone(zone, *it, &zmImage))
|
||||
if (checkZone(zone, *it, *zmImage))
|
||||
{
|
||||
alarm = true;
|
||||
score += zone->Score();
|
||||
|
@ -176,7 +176,7 @@ bool Detector::Detect(const Image &zmImage, Zone** zones, Event::StringSet &zone
|
|||
continue;
|
||||
sprintf(szMessage, "Checking inclusive zone %s", zone->Label());
|
||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||
if (checkZone(zone, *it, &zmImage))
|
||||
if (checkZone(zone, *it, *zmImage))
|
||||
{
|
||||
alarm = true;
|
||||
score += zone->Score();
|
||||
|
@ -207,7 +207,7 @@ bool Detector::Detect(const Image &zmImage, Zone** zones, Event::StringSet &zone
|
|||
continue;
|
||||
sprintf(szMessage, "Checking exclusive zone %s", zone->Label());
|
||||
log(LOG_DEBUG, "DEBUG", szMessage);
|
||||
if (checkZone(zone, *it, &zmImage))
|
||||
if (checkZone(zone, *it, *zmImage))
|
||||
{
|
||||
alarm = true;
|
||||
score += zone->Score();
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
Detector& operator=(const Detector& source);
|
||||
|
||||
//! 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.
|
||||
virtual int loadConfig(string sConfigFileName, map<unsigned int,map<string,string> > mapPluginConf) = 0;
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
protected:
|
||||
|
||||
//! Do detection inside one given zone.
|
||||
virtual bool checkZone(Zone *zone, unsigned int n_zone, const Image *zmImage) = 0;
|
||||
virtual bool checkZone(Zone *zone, unsigned int n_zone, const Image &zmImage) = 0;
|
||||
|
||||
//! Log messages to the SYSLOG.
|
||||
void log(int, string sLevel, string sMessage);
|
||||
|
|
|
@ -61,7 +61,7 @@ bool ImageAnalyser::DoDetection(const Image &comp_image, Zone** zones, Event::St
|
|||
++It )
|
||||
{
|
||||
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;
|
||||
score += detect_score;
|
||||
|
|
Loading…
Reference in New Issue