Doing my best to manually remove nextime's plugin architecture while keeping his other changes.

This commit is contained in:
Kyle Johnson 2013-08-13 09:43:23 -04:00
parent 266b67d0bd
commit 1888bec092
45 changed files with 10 additions and 26620 deletions

View File

@ -368,8 +368,6 @@ CREATE TABLE `Monitors` (
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
`WebColour` varchar(32) NOT NULL default 'red',
`Sequence` smallint(5) unsigned default NULL,
`UsedPl` varchar(88) NOT NULL default '',
`DoNativeMotDet` tinyint(3) unsigned NOT NULL default '1',
PRIMARY KEY (`Id`)
) ENGINE=@ZM_MYSQL_ENGINE@;

View File

@ -1,24 +0,0 @@
--
-- Table structure for table `PluginsConfig`
--
CREATE TABLE IF NOT EXISTS `PluginsConfig` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Name` varchar(32) NOT NULL DEFAULT '',
`Value` text NOT NULL,
`Type` tinytext NOT NULL,
`Choices` text NOT NULL,
`MonitorId` int(10) unsigned NOT NULL,
`ZoneId` int(10) unsigned NOT NULL,
`pluginName` tinytext NOT NULL,
PRIMARY KEY (`Id`),
KEY `ZoneId` (`ZoneId`),
KEY `MonitorId` (`MonitorId`),
KEY `Name` (`Name`),
FULLTEXT KEY `pluginName` (`pluginName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
ALTER TABLE `Monitors` ADD `UsedPl` varchar(88) NOT NULL default '' AFTER `Sequence`;
ALTER TABLE `Monitors` ADD `DoNativeMotDet` varchar(5) NOT NULL default 'yes' AFTER `UsedPl`;

View File

@ -1,26 +1,3 @@
--
-- Table structure for table `PluginsConfig`
--
CREATE TABLE IF NOT EXISTS `PluginsConfig` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Name` varchar(32) NOT NULL DEFAULT '',
`Value` text NOT NULL,
`Type` tinytext NOT NULL,
`Choices` text NOT NULL,
`MonitorId` int(10) unsigned NOT NULL,
`ZoneId` int(10) unsigned NOT NULL,
`pluginName` tinytext NOT NULL,
PRIMARY KEY (`Id`),
KEY `ZoneId` (`ZoneId`),
KEY `MonitorId` (`MonitorId`),
KEY `Name` (`Name`),
FULLTEXT KEY `pluginName` (`pluginName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
ALTER TABLE `Monitors` ADD `UsedPl` varchar(88) NOT NULL default '' AFTER `Sequence`;
ALTER TABLE `Monitors` ADD `DoNativeMotDet` varchar(5) NOT NULL default 'yes' AFTER `UsedPl`;
ALTER TABLE `Monitors` ADD `Colours` TINYINT UNSIGNED NOT NULL DEFAULT '1' AFTER `Height`;
ALTER TABLE `Monitors` ADD `Deinterlacing` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `Orientation`;

View File

@ -1 +1 @@
Zoneminder with kfir performances patches and plugin patches from UnixMedia
Zoneminder with kfir performances patches and fixes from UnixMedia (nextime)

Binary file not shown.

View File

@ -1,60 +0,0 @@
#/***********************************************************************
# This file is part of libzm_anpr_plugin, License Plate REcognition.
#
# Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
#
# LiPRec is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LiPRec is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
#************************************************************************/
OBJECTS = anpr_plugin.o
SOBJ=anpr_plugin.so
ZMSRC = zm_detector.cpp zm_config.cpp zm_poly.cpp zm_zone.cpp zm_image.cpp zm_db.cpp
ZMSRC+= zm_logger.cpp zm_utils.cpp zm_thread.cpp zm_jpeg.cpp
ZMOBJ = $(ZMSRC:.cpp=.o)
#CPPFLAGS= -fpermissive -O3 -march=native -Wall -lliprec -msse2
CPPFLAGS= -fpermissive -O3 -Wall -lliprec -msse2
CPPFLAGS+=-D__STDC_CONSTANT_MACROS -DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO
CPPFLAGS+=-DJPEG_INCLUDE_DIR=../../../../../libjpeg-turbo-1.2.1/.libs/
LDFLAGS=-L. -L../../../../../libjpeg-turbo-1.2.1/.libs/
LDFLAGS+=-I../../src/ -I../../ -I./
LDFLAGS+=-L/usr/lib -I/usr/include -I../../../../../libjpeg-turbo-1.2.1/
LDFLAGS+=$(shell pkg-config --cflags opencv)
LINKFLAGS=$(shell pkg-config --libs opencv)
LINKFLAGS+= -lliprec -lboost_program_options -lmysqlclient -lpthread -ljpeg -lz
all: anpr_plugin.o $(SOBJ)
$(ZMOBJ): %.o : ../../src/%.cpp
$(CXX) $^ -fPIC -c -o $@ ${LDFLAGS} $(CPPFLAGS)
anpr_plugin.o: anpr_plugin.cpp
$(CXX) anpr_plugin.cpp -fPIC -c -o anpr_plugin.o ${LDFLAGS} $(CPPFLAGS)
anpr_plugin.so: $(ZMOBJ) anpr_plugin.o
$(CXX) -o anpr_plugin.so -Wall anpr_plugin.o -shared $(ZMOBJ) $(LINKFLAGS)
cp anpr_plugin.so libzm_plugin_anpr.zmpl
install: anpr_plugin.o $(SOBJ)
install -m 0644 libzm_plugin_anpr.zmpl /usr/share/zm/libzm_plugin_anpr.zmpl
$(shell cat plugin.conf >> /usr/share/zm/plugin.conf)
clean:
rm -f $(OBJECTS) $(ZMOBJ) $(SOBJ) libzm_plugin_anpr.zmpl

View File

@ -1,250 +0,0 @@
/***********************************************************************
This file is part of libzm_anpr_plugin, License Plate REcognition.
Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
LiPRec is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LiPRec is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
************************************************************************/
#define LIST LIPREC_LIST // This is a workaround to avoid the conflict
#include <liprec.h> // of typedef LIST in both mysql and tesseract headers...
//#include "opencv2/highgui/highgui.hpp"
#undef LIST
#include "anpr_plugin.h"
//! Retrieve the engine version we're going to expect
extern "C" int getEngineVersion()
{
return ZM_ENGINE_VERSION;
}
//! Tells us to register our functionality to an engine kernel
extern "C" void registerPlugin(PluginManager &PlM, string sPluginName)
{
PlM.getImageAnalyser().addDetector(
auto_ptr<Detector>(new ANPRPlugin(sPluginName))
);
}
using namespace cv;
//using namespace liprec;
ANPRPlugin::ANPRPlugin()
: Detector(),
m_nMinObjSize(DEFAULT_DETECTOR_MIN_OBJECT_SIZE),
m_nMaxObjSize(DEFAULT_DETECTOR_MAX_OBJECT_SIZE)
{
m_sDetectionCause = DETECTED_CAUSE;
m_sLogPrefix = LOG_PREFIX;
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object has been created.");
}
ANPRPlugin::ANPRPlugin(string sPluginName)
: Detector(sPluginName),
m_nMinObjSize(DEFAULT_DETECTOR_MIN_OBJECT_SIZE),
m_nMaxObjSize(DEFAULT_DETECTOR_MAX_OBJECT_SIZE)
{
m_sDetectionCause = DETECTED_CAUSE;
m_sLogPrefix = LOG_PREFIX;
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object has been created.");
}
/*! \fn ANPRPlugin::loadConfig(string sConfigFileName)
* \param sConfigFileName is path to configuration to load parameters from
*/
void ANPRPlugin::loadConfig(string sConfigFileName)
{
options_description config_file("Configuration file options.");
variables_map vm;
config_file.add_options()
((m_sConfigSectionName + string(".min-obj-size")).c_str(),
value<int>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE))
((m_sConfigSectionName + string(".max-obj-size")).c_str(),
value<int>()->default_value(DEFAULT_DETECTOR_MAX_OBJECT_SIZE))
((m_sConfigSectionName + string(".alarm-score")).c_str(),
value<int>()->default_value(DEFAULT_ALARM_SCORE))
((m_sConfigSectionName + string(".det-cause")).c_str(),
value<string>()->default_value(DETECTED_CAUSE))
((m_sConfigSectionName + string(".log-prefix")).c_str(),
value<string>()->default_value(LOG_PREFIX))
;
ifstream ifs(sConfigFileName.c_str());
store(parse_config_file(ifs, config_file, true), vm);
notify(vm);
m_nMinObjSize = vm[(m_sConfigSectionName + string(".min-obj-size")).c_str()].as<int>();
m_nMaxObjSize = vm[(m_sConfigSectionName + string(".max-obj-size")).c_str()].as<int>();
m_nAlarmScore = vm[(m_sConfigSectionName + string(".alarm-score")).c_str()].as<int>();
m_sDetectionCause = vm[(m_sConfigSectionName + string(".det-cause")).c_str()].as<string>();
m_sLogPrefix = vm[(m_sConfigSectionName + string(".log-prefix")).c_str()].as<string>();
zmLoadConfig();
log(LOG_NOTICE, "License Plate Recognition Plugin\'s Object is configured.");
}
ANPRPlugin::~ANPRPlugin()
{
}
/*! \fn ANPRPlugin::ANPRPlugin(const ANPRPlugin& source)
* \param source is the object for copying
*/
ANPRPlugin::ANPRPlugin(const ANPRPlugin& source)
: Detector(source),
m_nMinObjSize(source.m_nMinObjSize),
m_nMaxObjSize(source.m_nMaxObjSize)
{
}
/*! \fn ANPRPlugin:: operator=(const ANPRPlugin& source)
* \param source is the object for copying
*/
ANPRPlugin & ANPRPlugin:: operator=(const ANPRPlugin& source)
{
Detector::operator=(source);
m_nMinObjSize = source.m_nMinObjSize;
m_nMaxObjSize = source.m_nMaxObjSize;
return *this;
}
/*! \fn ANPRPlugin::checkZone(Zone *zone, const Image *zmImage)
* \param zone is a zone where faces will be detected
* \param zmImage is an image to perform face detection (in the form of ZM' Image)
* \return true if there were objects detected in given image and
* false otherwise
*/
bool ANPRPlugin::checkZone(Zone *zone, const Image *zmImage)
{
double score;
Polygon zone_polygon = Polygon(zone->GetPolygon()); // Polygon of interest of the processed zone.
Image *pMaskImage = new Image(zmImage->Width(), zmImage->Height(), ZM_COLOUR_GRAY8, ZM_SUBPIX_ORDER_NONE );
pMaskImage->Fill(BLACK);
// An temporary image in the form of ZM for making from it CvMat.
// If don't use temp image, after rgb->bgr it will change.
Image *tempZmImage = new Image(*zmImage);
int imgtype=CV_8UC1;
if (tempZmImage->Colours() == ZM_COLOUR_RGB24)
imgtype=CV_8UC3;
Mat cvInputImage = Mat(
tempZmImage->Height(),
tempZmImage->Width(),
imgtype, (unsigned char*)tempZmImage->Buffer()).clone();
//Mat cvInputImage = cvtmpInputImage.reshape(0, tempZmImage->Colours());
//Mat cvInputImage = cvtmpInputImage.reshape(0, tempZmImage->Height());
if (tempZmImage->Colours() == ZM_COLOUR_RGB24)
{
cvtColor(cvInputImage, cvInputImage, CV_RGB2BGR);
}
//imwrite("/tmp/sarca.jpg", cvInputImage);
//Process image
liprec::LiPRec plateDetector;
liprec::PlatesImage plates;
plateDetector.detectPlates(cvInputImage, &plates);
score = 0;
if(plates.plates.size() > 0) {
log(LOG_INFO, "PLATES WERE DETECTED");
for(unsigned int i=0;i<plates.plates.size();i++) {
// Check if object's rectangle is inside zone's polygon of interest.
int x1 = plates.plates[i].rect.x, x2 = int(plates.plates[i].rect.x+plates.plates[i].rect.width);
int y1 = plates.plates[i].rect.y, y2 = int(plates.plates[i].rect.y+plates.plates[i].rect.height);
Coord rectVertCoords[4] = {Coord(x1, y1), Coord(x1, y2), Coord(x2, y1), Coord(x2, y2)};
int nNumVertInside = 0;
for (int p = 0; p < 4; p++)
{
nNumVertInside += zone_polygon.isInside(rectVertCoords[p]);
}
if (nNumVertInside < 3)
// if at least three rectangle coordinates are inside polygon,
// consider rectangle as belonging to the zone
// otherwise process next object
continue;
log(LOG_INFO, plates.plates[i].platetxt);
// Fill a box with object in the mask
Box *plateBox = new Box(x1, y1, x2, y2);
pMaskImage->Fill(WHITE, plateBox);
score=m_nAlarmScore;
delete plateBox;
}
}
if (score == 0)
{
//log(LOG_DEBUG, "No objects found. Exit.");
delete pMaskImage;
delete tempZmImage;
// XXX We need to delete Mats?
return( false );
}
/*
else
{
zone->SetOverloadCount(zone->GetOverloadFrames());
delete pMaskImage;
delete tempZmImage;
return( false );
}*/
zone->SetScore((int)score);
//Get mask by highlighting contours of objects and overlaying them with previous contours.
Rgb alarm_colour = RGB_GREEN;
Image *hlZmImage = pMaskImage->HighlightEdges(alarm_colour, ZM_COLOUR_RGB24,
ZM_SUBPIX_ORDER_RGB, &zone_polygon.Extent());
if (zone->Alarmed())
{
// if there were previous detection and they have already set up alarm image
// then overlay it with current mask
Image* pPrevZoneMask = new Image(*(zone->AlarmImage()));
pPrevZoneMask->Overlay(*hlZmImage);
zone->SetAlarmImage(pPrevZoneMask);
delete pPrevZoneMask;
}
else
zone->SetAlarmImage(hlZmImage);
delete pMaskImage;
delete hlZmImage;
delete tempZmImage;
return true;
}

View File

@ -1,89 +0,0 @@
/***********************************************************************
This file is part of libzm_anpr_plugin, License Plate REcognition.
Copyright (C) 2012 Franco (nextime) Lanza <nextime@nexlab.it>
LiPRec is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LiPRec is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with LiPRec. If not, see <http://www.gnu.org/licenses/>.
************************************************************************/
#ifndef ANPR_PLUGIN_H
#define ANPR_PLUGIN_H
#include <cv.h>
//#include <liprec.h>
#include <stdexcept>
#include <fstream>
#include <algorithm>
#include <boost/program_options.hpp>
#include <boost/program_options/option.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/errors.hpp>
#include "zm_plugin_manager.h"
#include "zm_detector.h"
#include "zm_rgb.h"
#define DETECTED_CAUSE "Plate Detected"
#define LOG_PREFIX "ZM PLATEDEC PLUGIN"
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE 600
#define DEFAULT_DETECTOR_MAX_OBJECT_SIZE 6000
#define DEFAULT_ALARM_SCORE 99
using namespace std;
using namespace boost::program_options;
//! Face detector plugin class.
/*! The class derived from Detector.
* This class provides face detection based on OpenCV's implementation of Haar cascade classifier detector.
*/
class ANPRPlugin : public Detector {
public:
//! Default Constructor.
ANPRPlugin();
//! Constructor.
ANPRPlugin(string sConfigSectionName);
//! Destructor.
virtual ~ANPRPlugin();
//! Copy constructor.
ANPRPlugin(const ANPRPlugin& source);
//! Overloaded operator=.
ANPRPlugin& operator=(const ANPRPlugin& source);
void loadConfig(string sConfigFileName);
protected:
bool checkZone(Zone *zone, const Image *zmImage);
int m_nMinObjSize;
int m_nMaxObjSize;
int m_nAlarmScore;
};
#endif // ANPR_PLUGIN_H

View File

@ -1,8 +0,0 @@
[libzm_plugin_anpr]
min-obj-size = 600
max-obj-size = 6000
alarm-score = 99
det-cause = Plate Detected
log-prefix = PLATEDET PLUGIN

View File

@ -1,78 +0,0 @@
import os, glob, sys
env = Environment()
# Short messages while compiling and linking.
if ARGUMENTS.get('VERBOSE') != "1":
env.Append(CXXCOMSTR = "Compiling static object $TARGET")
env.Append(LINKCOMSTR = "Linking $TARGET")
env.Append(SHCXXCOMSTR = "Compiling shared object $TARGET")
env.Append(SHLINKCOMSTR = "Linking shared $TARGET" )
# CXXFLAGS
if ARGUMENTS.get('debug', 0):
env.Append(CXXFLAGS = ['-g'])
build_dir = 'debug/'
else:
build_dir = 'release/'
env.BuildDir(build_dir, 'src/', duplicate=0)
env.Append(CXXFLAGS=['-msse2', '-march=native','-Wno-write-strings','-D__STDC_CONSTANT_MACROS'])
env.Append(CXXFLAGS=['-DZM_FFMPEG_CVS','-DHAVE_LIBCRYPTO','-DJPEG_INCLUDE_DIR=../../../../../libjpeg-turbo-1.2.1/'])
env.Append(LINKFLAGS = ['-Wl,--no-undefined'])
env.Append(LDFLAGS = [" -L../../../../../libjpeg-turbo-1.2.1/.libs "])
# Headers and libs
env['CPPPATH'] = [ build_dir,
'src',
'../../src',
'../../',
'../../../../../libjpeg-turbo-1.2.1/',
'/usr/include/opencv', '/usr/local/include/opencv',
'/usr/local/include/boost',
'.'
]
env['LIBPATH'] = [
'../../../../../libjpeg-turbo-1.2.1/.libs/',
'/usr/local/lib',
'/usr/lib',
'./']
env['LIBS'] = [
'opencv_core',
'opencv_highgui',
'opencv_objdetect',
'opencv_imgproc',
'boost_program_options',
'mysqlclient',
'pthread',
'jpeg',
'z'
]
# Common sources.
# common_src = env.Glob( build_dir + '*.cpp')
zoneminder_src = env.Glob('../../src/' + 'zm_detector.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_config.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_poly.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_zone.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_image.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_db.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_jpeg.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_logger.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_utils.cpp')
zoneminder_src += env.Glob('../../src/' + 'zm_thread.cpp')
# Face detector sources.
face_haar_src = env.Glob( build_dir + 'face_detector_plugin.cpp')
# Shared lib
env.SharedLibrary(target = 'zm_plugin_face_haar', source = [face_haar_src, zoneminder_src])

View File

@ -1,14 +0,0 @@
[libzm_plugin_face_haar]
cascade = /usr/share/zm/haarcascades/haarcascade_frontalface_alt2.xml
scale = 1.15
flag = 1
min-nbrs = 5
min-obj-width = 4.5
min-obj-height = 5.5
min-alarm-score = 0.4
max-alarm-score = 99
image-scale-factor = 0.5
det-cause = Face Detected
log-prefix = FACEDET PLUGIN

View File

@ -1,400 +0,0 @@
#include "face_detector_plugin.h"
//! Retrieve the engine version we're going to expect
extern "C" int getEngineVersion()
{
return ZM_ENGINE_VERSION;
}
//! Tells us to register our functionality to an engine kernel
extern "C" void registerPlugin(PluginManager &PlM, string sPluginName)
{
PlM.getImageAnalyser().addDetector(
auto_ptr<Detector>(new FaceDetectorPlugin(sPluginName))
);
}
FaceDetectorPlugin::FaceDetectorPlugin()
: Detector(),
m_fScaleFactor(DEFAULT_HAAR_SCALE_FACTOR),
m_nMinNeighbors(DEFAULT_HAAR_MIN_NEIGHBORS),
m_nFlag(DEFAULT_HAAR_FLAG),
m_fMinObjWidth(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH),
m_fMinObjHeight(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT),
m_cascade(NULL),
m_sHaarCascadePath(DEFAULT_HAAR_FACE_CASCADE_PATH)
{
m_sDetectionCause = DETECTED_CAUSE;
m_sLogPrefix = LOG_PREFIX;
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
m_pStorage = cvCreateMemStorage(0);
//_loadHaarCascade(m_sHaarCascadePath);
log(LOG_NOTICE, "Face Detector Plugin\'s Object has been created.");
}
FaceDetectorPlugin::FaceDetectorPlugin(string sPluginName)
: Detector(sPluginName),
m_fScaleFactor(DEFAULT_HAAR_SCALE_FACTOR),
m_nMinNeighbors(DEFAULT_HAAR_MIN_NEIGHBORS),
m_nFlag(DEFAULT_HAAR_FLAG),
m_fMinObjWidth(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH),
m_fMinObjHeight(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT),
m_cascade(NULL),
m_sHaarCascadePath(DEFAULT_HAAR_FACE_CASCADE_PATH)
{
m_sDetectionCause = DETECTED_CAUSE;
m_sLogPrefix = LOG_PREFIX;
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
m_pStorage = cvCreateMemStorage(0);
//_loadHaarCascade(m_sHaarCascadePath);
log(LOG_NOTICE, "Face Detector Plugin\'s Object has been created.");
}
/*! \fn FaceDetectorPlugin::loadConfig(string sConfigFileName)
* \param sConfigFileName is path to configuration to load parameters from
*/
void FaceDetectorPlugin::loadConfig(string sConfigFileName)
{
options_description config_file("Configuration file options.");
variables_map vm;
config_file.add_options()
// Haar face detector options
((m_sConfigSectionName + string(".cascade")).c_str(),
value<string>()->default_value(DEFAULT_HAAR_FACE_CASCADE_PATH))
((m_sConfigSectionName + string(".scale")).c_str(),
value<double>()->default_value(DEFAULT_HAAR_SCALE_FACTOR))
((m_sConfigSectionName + string(".flag")).c_str(),
value<int>()->default_value(DEFAULT_HAAR_FLAG))
((m_sConfigSectionName + string(".min-nbrs")).c_str(),
value<int>()->default_value(DEFAULT_HAAR_MIN_NEIGHBORS))
((m_sConfigSectionName + string(".min-obj-width")).c_str(),
value<double>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH))
((m_sConfigSectionName + string(".min-obj-height")).c_str(),
value<double>()->default_value(DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT))
((m_sConfigSectionName + string(".min-alarm-score")).c_str(),
value<double>()->default_value(DEFAULT_MIN_ALARM_SCORE))
((m_sConfigSectionName + string(".max-alarm-score")).c_str(),
value<double>()->default_value(DEFAULT_MAX_ALARM_SCORE))
((m_sConfigSectionName + string(".image-scale-factor")).c_str(),
value<double>()->default_value(DEFAULT_IMAGE_SCALE_FACTOR))
((m_sConfigSectionName + string(".det-cause")).c_str(),
value<string>()->default_value(DETECTED_CAUSE))
((m_sConfigSectionName + string(".log-prefix")).c_str(),
value<string>()->default_value(LOG_PREFIX))
;
ifstream ifs(sConfigFileName.c_str());
store(parse_config_file(ifs, config_file, true), vm);
notify(vm);
m_fScaleFactor = vm[(m_sConfigSectionName + string(".scale")).c_str()].as<double>();
m_nMinNeighbors = vm[(m_sConfigSectionName + string(".min-nbrs")).c_str()].as<int>();
m_nFlag = vm[(m_sConfigSectionName + string(".flag")).c_str()].as<int>();
m_fMinObjWidth = vm[(m_sConfigSectionName + string(".min-obj-width")).c_str()].as<double>();
m_fMinObjHeight = vm[(m_sConfigSectionName + string(".min-obj-height")).c_str()].as<double>();
m_fMinAlarmScore = vm[(m_sConfigSectionName + string(".min-alarm-score")).c_str()].as<double>();
m_fMaxAlarmScore = vm[(m_sConfigSectionName + string(".max-alarm-score")).c_str()].as<double>();
m_fImageScaleFactor = vm[(m_sConfigSectionName + string(".image-scale-factor")).c_str()].as<double>();
m_sDetectionCause = vm[(m_sConfigSectionName + string(".det-cause")).c_str()].as<string>();
m_sLogPrefix = vm[(m_sConfigSectionName + string(".log-prefix")).c_str()].as<string>();
// if (m_sHaarCascadePath != vm[(m_sConfigSectionName + string(".cascade")).c_str()].as<string>())
// {
m_sHaarCascadePath = vm[(m_sConfigSectionName + string(".cascade")).c_str()].as<string>();
_loadHaarCascade(m_sHaarCascadePath);
// }
zmLoadConfig();
log(LOG_NOTICE, "Face Detector Plugin\'s Object is configured.");
}
FaceDetectorPlugin::~FaceDetectorPlugin()
{
cvReleaseMemStorage(&m_pStorage);
cvReleaseHaarClassifierCascade(&m_cascade);
}
/*! \fn FaceDetectorPlugin::FaceDetectorPlugin(const FaceDetectorPlugin& source)
* \param source is the object for copying
*/
FaceDetectorPlugin::FaceDetectorPlugin(const FaceDetectorPlugin& source)
: Detector(source),
m_fScaleFactor(source.m_fScaleFactor),
m_nMinNeighbors(source.m_nMinNeighbors),
m_nFlag(source.m_nFlag),
m_fMinObjWidth(source.m_fMinObjWidth),
m_fMinObjHeight(source.m_fMinObjHeight),
m_cascade(NULL),
m_sHaarCascadePath(source.m_sHaarCascadePath)
{
m_pStorage = cvCreateMemStorage(0);
if (m_sHaarCascadePath != string())
_loadHaarCascade(m_sHaarCascadePath);
}
/*! \fn FaceDetectorPlugin:: operator=(const FaceDetectorPlugin& source)
* \param source is the object for copying
*/
FaceDetectorPlugin & FaceDetectorPlugin:: operator=(const FaceDetectorPlugin& source)
{
Detector::operator=(source);
m_fScaleFactor = source.m_fScaleFactor;
m_nMinNeighbors = source.m_nMinNeighbors;
m_nFlag = source.m_nFlag;
m_fMinObjWidth = source.m_fMinObjWidth;
m_fMinObjHeight = source.m_fMinObjHeight;
m_cascade = NULL;
m_sHaarCascadePath = source.m_sHaarCascadePath;
m_pStorage = cvCreateMemStorage(0);
if (m_sHaarCascadePath != string())
_loadHaarCascade(m_sHaarCascadePath);
return *this;
}
/*! \fn FaceDetectorPlugin::_loadHaarCascade(string sConfigPath)
* \param sConfigPath is path to xml Haar classifier cascade.
*/
void FaceDetectorPlugin::_loadHaarCascade(string sConfigPath)
{
m_sHaarCascadePath = sConfigPath;
if (m_cascade != NULL)
cvReleaseHaarClassifierCascade(&m_cascade);
m_cascade = (CvHaarClassifierCascade*)cvLoad(sConfigPath.c_str());
if (m_cascade == NULL)
throw invalid_argument((string("Couldn't load xml data: ") + sConfigPath + ".").c_str());
}
/*! \fn FaceDetectorPlugin::_opencvHaarDetect(const CvMat* pMatImage)
* \param pMatImage is an image to perform face detection (in the form of OpenCv' CvMat)
*/
vector<CvRect> FaceDetectorPlugin::_opencvHaarDetect(const CvMat* pMatImage)
{
CvSize minObjSize = cvSize((int) pMatImage->width * m_fMinObjWidth / 100.0, (int) pMatImage->height * m_fMinObjHeight / 100.0);
//char szMessage[50];
//sprintf(szMessage, "IMAGE SIZE IS %d x %d \nMIN OBJ SIZE IS %d x %d", pMatImage->width, pMatImage->height, minObjSize.width, minObjSize.height);
//log(LOG_WARNING, szMessage);
CvSeq* haarObjects = cvHaarDetectObjects(pMatImage,
m_cascade,
m_pStorage,
m_fScaleFactor,
m_nMinNeighbors,
m_nFlag,
minObjSize);
vector<CvRect> objects;
for (int i = 0; i < haarObjects->total; i++)
{
CvRect* pHaarRect = (CvRect*)cvGetSeqElem(haarObjects, i);
objects.push_back(*pHaarRect);
}
return objects;
}
/*! \fn FaceDetectorPlugin::checkZone(Zone *zone, const Image *zmImage)
* \param zone is a zone where faces will be detected
* \param zmImage is an image to perform face detection (in the form of ZM' Image)
* \return true if there were objects detected in given image and
* false otherwise
*/
bool FaceDetectorPlugin::checkZone(Zone *zone, const Image *zmImage)
{
//log(LOG_DEBUG, "Entering checkZone.");
double score;
Polygon zone_polygon = Polygon(zone->GetPolygon()); // Polygon of interest of the processed zone.
//char szMessage[50];
//sprintf(szMessage, "Polygon of the zone has %d vertices.", zone_polygon.getNumCoords());
//log(LOG_WARNING, szMessage);
//zone->ResetStats();
/*
log(LOG_WARNING, "precheck");
if ( !zone->CheckOverloadCount() )
{
log(LOG_WARNING, "CheckOverloadCount() return false, we'll return false.");
return(false);
}
*/
//zmLoadConfig();
// An image for highlighting detected objects.
Image *pMaskImage = new Image(zmImage->Width(), zmImage->Height(), ZM_COLOUR_GRAY8, ZM_SUBPIX_ORDER_NONE );
pMaskImage->Fill(BLACK);
//log(LOG_WARNING, "FILLBLACK.");
// An temporary image in the form of ZM for making from it CvMat.
// If don't use temp image, after rgb->bgr it will change.
Image *tempZmImage = new Image(*zmImage);
CvMat* cvInputImage = NULL;
CvMat* pScaledImage = NULL;
bool bDoResizing = (m_fImageScaleFactor != 1.0); // resize image or not
if (tempZmImage->Colours() == ZM_COLOUR_GRAY8)
{
// if image is not colored, create an one-channel CvMat.
cvInputImage = cvCreateMat(tempZmImage->Height(), tempZmImage->Width(), CV_8UC1);
unsigned char *buffer = (unsigned char*)tempZmImage->Buffer();
cvSetData(cvInputImage, buffer, tempZmImage->Width());
}
// NEXTIME XXX TODO: manage also 32 bit images!
else
{
// otherwise create a three-channel CvMat and then convert colors from RGB to BGR.
cvInputImage = cvCreateMat(tempZmImage->Height(), tempZmImage->Width(), CV_8UC3);
unsigned char *buffer = (unsigned char*)tempZmImage->Buffer();
cvSetData(cvInputImage, buffer, tempZmImage->Width() * 3);
cvCvtColor(cvInputImage, cvInputImage, CV_RGB2BGR);
}
if (bDoResizing)
{
int nNewWidth = int (m_fImageScaleFactor * zmImage->Width());
int nNewHeight = int (m_fImageScaleFactor * tempZmImage->Height());
int nImageElemType = cvGetElemType(cvInputImage);
pScaledImage = cvCreateMat(nNewHeight, nNewWidth, nImageElemType);
cvResize(cvInputImage, pScaledImage, CV_INTER_LINEAR);
}
//Process image
vector<CvRect> foundObjects;
if (bDoResizing)
foundObjects = _opencvHaarDetect(pScaledImage);
else
foundObjects = _opencvHaarDetect(cvInputImage);
if (foundObjects.size() > 0)
log(LOG_INFO, "OBJECTS WERE DETECTED");
score = 0;
for (vector<CvRect>::iterator it = foundObjects.begin(); it < foundObjects.end(); it++)
{
// Process found objects.
// Scale object's coordinates back if image has been scaled.
int x1 = int(it->x/m_fImageScaleFactor), x2 = int((it->x + it->width)/m_fImageScaleFactor), y1 = int(it->y/m_fImageScaleFactor), y2 = int((it->y + it->height)/m_fImageScaleFactor);
// Check if object's rectangle is inside zone's polygon of interest.
Coord rectVertCoords[4] = {Coord(x1, y1), Coord(x1, y2), Coord(x2, y1), Coord(x2, y2)};
int nNumVertInside = 0;
for (int i = 0; i < 4; i++)
{
nNumVertInside += zone_polygon.isInside(rectVertCoords[i]);
}
if (nNumVertInside < 3)
// if at least three rectangle coordinates are inside polygon, consider rectangle as belonging to the zone
// otherwise process next object
continue;
// Fill a box with object in the mask
Box *faceBox = new Box(x1, y1, x2, y2);
pMaskImage->Fill(WHITE, faceBox);
// Calculate score as portion of object area in the image
score += (100.0*(it->width)*(it->height)/m_fImageScaleFactor/m_fImageScaleFactor)/zone_polygon.Area();
delete faceBox;
}
if (score == 0)
{
//log(LOG_DEBUG, "No objects found. Exit.");
delete pMaskImage;
delete tempZmImage;
if (cvInputImage)
cvReleaseMat(&cvInputImage);
if (pScaledImage)
cvReleaseMat(&pScaledImage);
return( false );
}
if ( m_fMinAlarmScore && ( score < m_fMinAlarmScore) )
{
delete pMaskImage;
delete tempZmImage;
if (cvInputImage)
cvReleaseMat(&cvInputImage);
if (pScaledImage)
cvReleaseMat(&pScaledImage);
return( false );
}
if ( m_fMaxAlarmScore && (score > m_fMaxAlarmScore) )
{
zone->SetOverloadCount(zone->GetOverloadFrames());
delete pMaskImage;
delete tempZmImage;
if (cvInputImage)
cvReleaseMat(&cvInputImage);
if (pScaledImage)
cvReleaseMat(&pScaledImage);
return( false );
}
zone->SetScore(max(1, (int)score));
//Get mask by highlighting contours of objects and overlaying them with previous contours.
Rgb alarm_colour = RGB_GREEN;
Image *hlZmImage = pMaskImage->HighlightEdges(alarm_colour, ZM_COLOUR_RGB24,
ZM_SUBPIX_ORDER_RGB, &zone_polygon.Extent());
if (zone->Alarmed())
{
// if there were previous detection and they have already set up alarm image
// then overlay it with current mask
Image* pPrevZoneMask = new Image(*(zone->AlarmImage()));
pPrevZoneMask->Overlay(*hlZmImage);
zone->SetAlarmImage(pPrevZoneMask);
delete pPrevZoneMask;
}
else
zone->SetAlarmImage(hlZmImage);
delete pMaskImage;
delete hlZmImage;
delete tempZmImage;
if (cvInputImage)
cvReleaseMat(&cvInputImage);
if (pScaledImage)
cvReleaseMat(&pScaledImage);
//log(LOG_DEBUG, "Leaving checkZone.");
return true;
}

View File

@ -1,102 +0,0 @@
#ifndef HAAR_DETECTOR_PLUGIN_H
#define HAAR_DETECTOR_PLUGIN_H
#include <cv.h>
#include <stdexcept>
#include <fstream>
#include <algorithm>
#include <boost/program_options.hpp>
#include <boost/program_options/option.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/errors.hpp>
#include "zm_plugin_manager.h"
#include "zm_detector.h"
#include "zm_rgb.h"
#define DETECTED_CAUSE "Face Detected"
#define LOG_PREFIX "ZM FACEDET PLUGIN"
#define DEFAULT_HAAR_SCALE_FACTOR 1.1
#define DEFAULT_HAAR_MIN_NEIGHBORS 3
#define DEFAULT_HAAR_FLAG CV_HAAR_DO_CANNY_PRUNING
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE_WIDTH 5.0
#define DEFAULT_DETECTOR_MIN_OBJECT_SIZE_HEIGHT 6.0
#define DEFAULT_HAAR_FACE_CASCADE_PATH "/usr/local/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml"
using namespace std;
using namespace boost::program_options;
//! Face detector plugin class.
/*! The class derived from Detector.
* This class provides face detection based on OpenCV's implementation of Haar cascade classifier detector.
*/
class FaceDetectorPlugin : public Detector {
public:
//! Default Constructor.
FaceDetectorPlugin();
//! Constructor.
FaceDetectorPlugin(string sConfigSectionName);
//! Destructor.
virtual ~FaceDetectorPlugin();
//! Copy constructor.
FaceDetectorPlugin(const FaceDetectorPlugin& source);
//! Overloaded operator=.
FaceDetectorPlugin& operator=(const FaceDetectorPlugin& source);
void loadConfig(string sConfigFileName);
protected:
bool checkZone(Zone *zone, const Image *zmImage);
//! Path to the xml file with cascade.
string m_sHaarCascadePath;
//! Cascade of classifiers.
CvHaarClassifierCascade* m_cascade;
//! Scale factor.
double m_fScaleFactor;
//! Minimum number (minus 1) of neighbors rectangles that makes up an object.
size_t m_nMinNeighbors;
//! Mode of operation.
int m_nFlag;
//! Minimal object's sizes.
double m_fMinObjWidth;
double m_fMinObjHeight;
//! Pointer to storage for calculations.
CvMemStorage* m_pStorage;
private:
//! Load xml Haar cascade file.
void _loadHaarCascade(string sConfigPath);
//! Detect faces on OpenCV' CvMat image.
vector<CvRect> _opencvHaarDetect(const CvMat* pMatImage);
};
#endif //HAAR_DETECTOR_PLUGIN_H

View File

@ -1925,47 +1925,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
type => $types{string},
category => "eyeZm",
},
{
name => "ZM_PATH_PLUGINS",
default => "/usr/share/zm",
description => "Path to the plugin folder",
help => "3d-party plugins have to be placed here.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_PLUGIN_EXTENSION",
default => ".zmpl",
description => "Default extension of plugins to found.",
help => "Default extension of plugins to found.",
type => $types{rel_path},
category => "paths",
},
{
name => "ZM_PLUGINS_CONFIG_PATH",
default => "/usr/share/zm/plugins.conf",
description => "Path to the config file for plugins.",
help => "Path to the config file for plugins.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_LOAD_PLUGINS",
default => "no",
description => "Load and use 3d-party plugins",
help => "3d-party plugins will be loaded and used for analysing.",
type => $types{boolean},
category => "config",
},
{
name => "ZM_TURNOFF_NATIVE_ANALYSIS",
default => "no",
description => "Turn native ZM\'s image analysis possibility off",
help => "Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.",
type => $types{boolean},
category => "config",
},
);
our %options_hash = map { ( $_->{name}, $_ ) } @options;

View File

@ -1925,47 +1925,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
type => $types{string},
category => "eyeZm",
},
{
name => "ZM_PATH_PLUGINS",
default => "/usr/share/zm",
description => "Path to the plugin folder",
help => "3d-party plugins have to be placed here.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_PLUGIN_EXTENSION",
default => ".zmpl",
description => "Default extension of plugins to found.",
help => "Default extension of plugins to found.",
type => $types{rel_path},
category => "paths",
},
{
name => "ZM_PLUGINS_CONFIG_PATH",
default => "/usr/share/zm/plugins.conf",
description => "Path to the config file for plugins.",
help => "Path to the config file for plugins.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_LOAD_PLUGINS",
default => "no",
description => "Load and use 3d-party plugins",
help => "3d-party plugins will be loaded and used for analysing.",
type => $types{boolean},
category => "config",
},
{
name => "ZM_TURNOFF_NATIVE_ANALYSIS",
default => "no",
description => "Turn native ZM\'s image analysis possibility off",
help => "Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.",
type => $types{boolean},
category => "config",
},
);
our %options_hash = map { ( $_->{name}, $_ ) } @options;

View File

@ -1925,47 +1925,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
type => $types{string},
category => "eyeZm",
},
{
name => "ZM_PATH_PLUGINS",
default => "/usr/share/zm",
description => "Path to the plugin folder",
help => "3d-party plugins have to be placed here.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_PLUGIN_EXTENSION",
default => ".zmpl",
description => "Default extension of plugins to found.",
help => "Default extension of plugins to found.",
type => $types{rel_path},
category => "paths",
},
{
name => "ZM_PLUGINS_CONFIG_PATH",
default => "/usr/share/zm/plugins.conf",
description => "Path to the config file for plugins.",
help => "Path to the config file for plugins.",
type => $types{abs_path},
category => "paths",
},
{
name => "ZM_LOAD_PLUGINS",
default => "no",
description => "Load and use 3d-party plugins",
help => "3d-party plugins will be loaded and used for analysing.",
type => $types{boolean},
category => "config",
},
{
name => "ZM_TURNOFF_NATIVE_ANALYSIS",
default => "no",
description => "Turn native ZM\'s image analysis possibility off",
help => "Image analysis with ZM\'s motion detected function will be turned off. Only detection functions from loaded plugins will be used. Note, that if no plugins have be loaded, no detection will be done.",
type => $types{boolean},
category => "config",
},
);
our %options_hash = map { ( $_->{name}, $_ ) } @options;

View File

@ -173,7 +173,6 @@ zm_event.o: zm_event.cpp /usr/include/fcntl.h /usr/include/features.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -187,7 +186,6 @@ zm_event.o: zm_event.cpp /usr/include/fcntl.h /usr/include/features.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h zmf.h \
/usr/include/x86_64-linux-gnu/sys/sendfile.h
@ -701,8 +699,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -747,8 +743,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -167,7 +167,6 @@ zm_monitor.o: zm_monitor.cpp /usr/include/x86_64-linux-gnu/sys/types.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -181,7 +180,6 @@ zm_monitor.o: zm_monitor.cpp /usr/include/x86_64-linux-gnu/sys/types.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h zm_local_camera.h \
/usr/include/linux/videodev2.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
@ -696,8 +694,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -742,8 +738,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -1,298 +0,0 @@
zm_plugin.o: zm_plugin.cpp zm_plugin.h /usr/include/stdlib.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/bits/predefs.h \
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
/usr/include/wchar.h /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h \
/usr/include/c++/4.7/stdexcept /usr/include/c++/4.7/exception \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/cpu_defines.h \
/usr/include/c++/4.7/bits/atomic_lockfree_defines.h \
/usr/include/c++/4.7/string /usr/include/c++/4.7/bits/stringfwd.h \
/usr/include/c++/4.7/bits/char_traits.h \
/usr/include/c++/4.7/bits/stl_algobase.h \
/usr/include/c++/4.7/bits/functexcept.h \
/usr/include/c++/4.7/bits/exception_defines.h \
/usr/include/c++/4.7/bits/cpp_type_traits.h \
/usr/include/c++/4.7/ext/type_traits.h \
/usr/include/c++/4.7/ext/numeric_traits.h \
/usr/include/c++/4.7/bits/stl_pair.h /usr/include/c++/4.7/bits/move.h \
/usr/include/c++/4.7/bits/concept_check.h \
/usr/include/c++/4.7/bits/stl_iterator_base_types.h \
/usr/include/c++/4.7/bits/stl_iterator_base_funcs.h \
/usr/include/c++/4.7/bits/stl_iterator.h \
/usr/include/c++/4.7/debug/debug.h /usr/include/c++/4.7/bits/postypes.h \
/usr/include/c++/4.7/cwchar /usr/include/x86_64-linux-gnu/bits/wchar.h \
/usr/include/c++/4.7/bits/allocator.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++allocator.h \
/usr/include/c++/4.7/ext/new_allocator.h /usr/include/c++/4.7/new \
/usr/include/c++/4.7/bits/localefwd.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++locale.h \
/usr/include/c++/4.7/clocale /usr/include/locale.h \
/usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/4.7/iosfwd \
/usr/include/c++/4.7/cctype /usr/include/ctype.h \
/usr/include/c++/4.7/bits/ostream_insert.h \
/usr/include/c++/4.7/bits/cxxabi_forced.h \
/usr/include/c++/4.7/bits/stl_function.h \
/usr/include/c++/4.7/backward/binders.h \
/usr/include/c++/4.7/bits/range_access.h \
/usr/include/c++/4.7/bits/basic_string.h \
/usr/include/c++/4.7/ext/atomicity.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr-default.h \
/usr/include/pthread.h /usr/include/sched.h \
/usr/include/x86_64-linux-gnu/bits/sched.h \
/usr/include/x86_64-linux-gnu/bits/setjmp.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/atomic_word.h \
/usr/include/c++/4.7/bits/basic_string.tcc zm.h zm_config.h ../config.h \
zm_config_defines.h zm_logger.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
/usr/include/c++/4.7/map /usr/include/c++/4.7/bits/stl_tree.h \
/usr/include/c++/4.7/bits/stl_map.h \
/usr/include/c++/4.7/bits/stl_multimap.h /usr/include/mysql/mysql.h \
/usr/include/mysql/mysql_version.h /usr/include/mysql/mysql_com.h \
/usr/include/mysql/mysql_time.h /usr/include/mysql/my_list.h \
/usr/include/mysql/typelib.h /usr/include/mysql/my_alloc.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdint.h /usr/include/stdint.h
zm_plugin.h:
/usr/include/stdlib.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/stdio.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:
/usr/include/c++/4.7/stdexcept:
/usr/include/c++/4.7/exception:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/cpu_defines.h:
/usr/include/c++/4.7/bits/atomic_lockfree_defines.h:
/usr/include/c++/4.7/string:
/usr/include/c++/4.7/bits/stringfwd.h:
/usr/include/c++/4.7/bits/char_traits.h:
/usr/include/c++/4.7/bits/stl_algobase.h:
/usr/include/c++/4.7/bits/functexcept.h:
/usr/include/c++/4.7/bits/exception_defines.h:
/usr/include/c++/4.7/bits/cpp_type_traits.h:
/usr/include/c++/4.7/ext/type_traits.h:
/usr/include/c++/4.7/ext/numeric_traits.h:
/usr/include/c++/4.7/bits/stl_pair.h:
/usr/include/c++/4.7/bits/move.h:
/usr/include/c++/4.7/bits/concept_check.h:
/usr/include/c++/4.7/bits/stl_iterator_base_types.h:
/usr/include/c++/4.7/bits/stl_iterator_base_funcs.h:
/usr/include/c++/4.7/bits/stl_iterator.h:
/usr/include/c++/4.7/debug/debug.h:
/usr/include/c++/4.7/bits/postypes.h:
/usr/include/c++/4.7/cwchar:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/c++/4.7/bits/allocator.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++allocator.h:
/usr/include/c++/4.7/ext/new_allocator.h:
/usr/include/c++/4.7/new:
/usr/include/c++/4.7/bits/localefwd.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++locale.h:
/usr/include/c++/4.7/clocale:
/usr/include/locale.h:
/usr/include/x86_64-linux-gnu/bits/locale.h:
/usr/include/c++/4.7/iosfwd:
/usr/include/c++/4.7/cctype:
/usr/include/ctype.h:
/usr/include/c++/4.7/bits/ostream_insert.h:
/usr/include/c++/4.7/bits/cxxabi_forced.h:
/usr/include/c++/4.7/bits/stl_function.h:
/usr/include/c++/4.7/backward/binders.h:
/usr/include/c++/4.7/bits/range_access.h:
/usr/include/c++/4.7/bits/basic_string.h:
/usr/include/c++/4.7/ext/atomicity.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr-default.h:
/usr/include/pthread.h:
/usr/include/sched.h:
/usr/include/x86_64-linux-gnu/bits/sched.h:
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/atomic_word.h:
/usr/include/c++/4.7/bits/basic_string.tcc:
zm.h:
zm_config.h:
../config.h:
zm_config_defines.h:
zm_logger.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
/usr/include/c++/4.7/map:
/usr/include/c++/4.7/bits/stl_tree.h:
/usr/include/c++/4.7/bits/stl_map.h:
/usr/include/c++/4.7/bits/stl_multimap.h:
/usr/include/mysql/mysql.h:
/usr/include/mysql/mysql_version.h:
/usr/include/mysql/mysql_com.h:
/usr/include/mysql/mysql_time.h:
/usr/include/mysql/my_list.h:
/usr/include/mysql/typelib.h:
/usr/include/mysql/my_alloc.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdint.h:
/usr/include/stdint.h:

View File

@ -1,655 +0,0 @@
zm_plugin_manager.o: zm_plugin_manager.cpp zm_plugin_manager.h \
/usr/include/stdio.h /usr/include/features.h \
/usr/include/x86_64-linux-gnu/bits/predefs.h \
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h /usr/include/stdlib.h \
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
/usr/include/x86_64-linux-gnu/bits/endian.h \
/usr/include/x86_64-linux-gnu/bits/byteswap.h /usr/include/xlocale.h \
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
/usr/include/x86_64-linux-gnu/sys/select.h \
/usr/include/x86_64-linux-gnu/bits/select.h \
/usr/include/x86_64-linux-gnu/bits/sigset.h \
/usr/include/x86_64-linux-gnu/bits/time.h \
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
/usr/include/c++/4.7/string \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/cpu_defines.h \
/usr/include/c++/4.7/bits/stringfwd.h \
/usr/include/c++/4.7/bits/char_traits.h \
/usr/include/c++/4.7/bits/stl_algobase.h \
/usr/include/c++/4.7/bits/functexcept.h \
/usr/include/c++/4.7/bits/exception_defines.h \
/usr/include/c++/4.7/bits/cpp_type_traits.h \
/usr/include/c++/4.7/ext/type_traits.h \
/usr/include/c++/4.7/ext/numeric_traits.h \
/usr/include/c++/4.7/bits/stl_pair.h /usr/include/c++/4.7/bits/move.h \
/usr/include/c++/4.7/bits/concept_check.h \
/usr/include/c++/4.7/bits/stl_iterator_base_types.h \
/usr/include/c++/4.7/bits/stl_iterator_base_funcs.h \
/usr/include/c++/4.7/bits/stl_iterator.h \
/usr/include/c++/4.7/debug/debug.h /usr/include/c++/4.7/bits/postypes.h \
/usr/include/c++/4.7/cwchar /usr/include/x86_64-linux-gnu/bits/wchar.h \
/usr/include/c++/4.7/bits/allocator.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++allocator.h \
/usr/include/c++/4.7/ext/new_allocator.h /usr/include/c++/4.7/new \
/usr/include/c++/4.7/exception \
/usr/include/c++/4.7/bits/atomic_lockfree_defines.h \
/usr/include/c++/4.7/bits/localefwd.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++locale.h \
/usr/include/c++/4.7/clocale /usr/include/locale.h \
/usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/4.7/iosfwd \
/usr/include/c++/4.7/cctype /usr/include/ctype.h \
/usr/include/c++/4.7/bits/ostream_insert.h \
/usr/include/c++/4.7/bits/cxxabi_forced.h \
/usr/include/c++/4.7/bits/stl_function.h \
/usr/include/c++/4.7/backward/binders.h \
/usr/include/c++/4.7/bits/range_access.h \
/usr/include/c++/4.7/bits/basic_string.h \
/usr/include/c++/4.7/ext/atomicity.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr-default.h \
/usr/include/pthread.h /usr/include/sched.h \
/usr/include/x86_64-linux-gnu/bits/sched.h \
/usr/include/x86_64-linux-gnu/bits/setjmp.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/atomic_word.h \
/usr/include/c++/4.7/bits/basic_string.tcc /usr/include/c++/4.7/map \
/usr/include/c++/4.7/bits/stl_tree.h /usr/include/c++/4.7/bits/stl_map.h \
/usr/include/c++/4.7/bits/stl_multimap.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h \
/usr/include/x86_64-linux-gnu/bits/local_lim.h \
/usr/include/linux/limits.h /usr/include/x86_64-linux-gnu/sys/param.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/limits.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/syslimits.h \
/usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h \
/usr/include/linux/param.h /usr/include/x86_64-linux-gnu/asm/param.h \
/usr/include/asm-generic/param.h /usr/include/unistd.h \
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
/usr/include/x86_64-linux-gnu/bits/environments.h \
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h zm.h \
zm_config.h ../config.h zm_config_defines.h zm_logger.h \
/usr/include/mysql/mysql.h /usr/include/mysql/mysql_version.h \
/usr/include/mysql/mysql_com.h /usr/include/mysql/mysql_time.h \
/usr/include/mysql/my_list.h /usr/include/mysql/typelib.h \
/usr/include/mysql/my_alloc.h \
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdint.h /usr/include/stdint.h \
zm_image_analyser.h /usr/include/c++/4.7/list \
/usr/include/c++/4.7/bits/stl_list.h /usr/include/c++/4.7/bits/list.tcc \
/usr/include/c++/4.7/stdexcept /usr/include/c++/4.7/iostream \
/usr/include/c++/4.7/ostream /usr/include/c++/4.7/ios \
/usr/include/c++/4.7/bits/ios_base.h \
/usr/include/c++/4.7/bits/locale_classes.h \
/usr/include/c++/4.7/bits/locale_classes.tcc \
/usr/include/c++/4.7/streambuf /usr/include/c++/4.7/bits/streambuf.tcc \
/usr/include/c++/4.7/bits/basic_ios.h \
/usr/include/c++/4.7/bits/locale_facets.h /usr/include/c++/4.7/cwctype \
/usr/include/wctype.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/ctype_base.h \
/usr/include/c++/4.7/bits/streambuf_iterator.h \
/usr/include/c++/4.7/x86_64-linux-gnu/bits/ctype_inline.h \
/usr/include/c++/4.7/bits/locale_facets.tcc \
/usr/include/c++/4.7/bits/basic_ios.tcc \
/usr/include/c++/4.7/bits/ostream.tcc /usr/include/c++/4.7/istream \
/usr/include/c++/4.7/bits/istream.tcc /usr/include/c++/4.7/memory \
/usr/include/c++/4.7/bits/stl_construct.h \
/usr/include/c++/4.7/ext/alloc_traits.h \
/usr/include/c++/4.7/bits/stl_uninitialized.h \
/usr/include/c++/4.7/bits/stl_tempbuf.h \
/usr/include/c++/4.7/bits/stl_raw_storage_iter.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_image.h zm_jpeg.h /usr/include/setjmp.h jinclude.h \
/root/zm/libjpeg-turbo-1.2.1/jconfig.h /usr/include/string.h \
/root/zm/libjpeg-turbo-1.2.1/jpeglib.h \
/root/zm/libjpeg-turbo-1.2.1/jmorecfg.h \
/root/zm/libjpeg-turbo-1.2.1/jerror.h zm_rgb.h zm_coord.h zm_box.h \
/usr/include/math.h /usr/include/x86_64-linux-gnu/bits/huge_val.h \
/usr/include/x86_64-linux-gnu/bits/huge_valf.h \
/usr/include/x86_64-linux-gnu/bits/huge_vall.h \
/usr/include/x86_64-linux-gnu/bits/inf.h \
/usr/include/x86_64-linux-gnu/bits/nan.h \
/usr/include/x86_64-linux-gnu/bits/mathdef.h \
/usr/include/x86_64-linux-gnu/bits/mathcalls.h zm_poly.h zm_mem_utils.h \
zm_utils.h /usr/include/x86_64-linux-gnu/sys/time.h \
/usr/include/c++/4.7/vector /usr/include/c++/4.7/bits/stl_vector.h \
/usr/include/c++/4.7/bits/stl_bvector.h \
/usr/include/c++/4.7/bits/vector.tcc /usr/include/errno.h \
/usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \
/usr/include/x86_64-linux-gnu/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/zlib.h /usr/include/zconf.h zm_zone.h zm_event.h \
/usr/include/x86_64-linux-gnu/sys/stat.h \
/usr/include/x86_64-linux-gnu/bits/stat.h /usr/include/c++/4.7/set \
/usr/include/c++/4.7/bits/stl_set.h \
/usr/include/c++/4.7/bits/stl_multiset.h zm_stream.h \
/usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
/usr/include/x86_64-linux-gnu/sys/socket.h \
/usr/include/x86_64-linux-gnu/sys/uio.h \
/usr/include/x86_64-linux-gnu/bits/uio.h \
/usr/include/x86_64-linux-gnu/bits/socket.h \
/usr/include/x86_64-linux-gnu/asm/socket.h \
/usr/include/asm-generic/socket.h \
/usr/include/x86_64-linux-gnu/asm/sockios.h \
/usr/include/asm-generic/sockios.h zm_mpeg.h zm_ffmpeg.h \
/usr/include/libavutil/avutil.h /usr/include/libavutil/common.h \
/usr/include/inttypes.h /usr/include/libavutil/attributes.h \
/usr/include/libavutil/avconfig.h /usr/include/libavutil/mem.h \
/usr/include/libavutil/error.h /usr/include/libavutil/avutil.h \
/usr/include/libavutil/mathematics.h /usr/include/libavutil/rational.h \
/usr/include/libavutil/intfloat_readwrite.h /usr/include/libavutil/log.h \
/usr/include/libavutil/pixfmt.h /usr/include/libavcodec/avcodec.h \
/usr/include/libavutil/samplefmt.h /usr/include/libavutil/cpu.h \
/usr/include/libavutil/dict.h /usr/include/libavutil/log.h \
/usr/include/libavutil/pixfmt.h /usr/include/libavutil/rational.h \
/usr/include/libavutil/audioconvert.h /usr/include/libavcodec/version.h \
/usr/include/libavformat/avformat.h /usr/include/libavformat/avio.h \
/usr/include/libavutil/common.h /usr/include/libavformat/version.h \
/usr/include/libswscale/swscale.h zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
zm_plugin_manager.h:
/usr/include/stdio.h:
/usr/include/features.h:
/usr/include/x86_64-linux-gnu/bits/predefs.h:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:
/usr/include/x86_64-linux-gnu/bits/types.h:
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
/usr/include/libio.h:
/usr/include/_G_config.h:
/usr/include/wchar.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h:
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
/usr/include/stdlib.h:
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
/usr/include/endian.h:
/usr/include/x86_64-linux-gnu/bits/endian.h:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
/usr/include/xlocale.h:
/usr/include/x86_64-linux-gnu/sys/types.h:
/usr/include/time.h:
/usr/include/x86_64-linux-gnu/sys/select.h:
/usr/include/x86_64-linux-gnu/bits/select.h:
/usr/include/x86_64-linux-gnu/bits/sigset.h:
/usr/include/x86_64-linux-gnu/bits/time.h:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
/usr/include/alloca.h:
/usr/include/c++/4.7/string:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++config.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/os_defines.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/cpu_defines.h:
/usr/include/c++/4.7/bits/stringfwd.h:
/usr/include/c++/4.7/bits/char_traits.h:
/usr/include/c++/4.7/bits/stl_algobase.h:
/usr/include/c++/4.7/bits/functexcept.h:
/usr/include/c++/4.7/bits/exception_defines.h:
/usr/include/c++/4.7/bits/cpp_type_traits.h:
/usr/include/c++/4.7/ext/type_traits.h:
/usr/include/c++/4.7/ext/numeric_traits.h:
/usr/include/c++/4.7/bits/stl_pair.h:
/usr/include/c++/4.7/bits/move.h:
/usr/include/c++/4.7/bits/concept_check.h:
/usr/include/c++/4.7/bits/stl_iterator_base_types.h:
/usr/include/c++/4.7/bits/stl_iterator_base_funcs.h:
/usr/include/c++/4.7/bits/stl_iterator.h:
/usr/include/c++/4.7/debug/debug.h:
/usr/include/c++/4.7/bits/postypes.h:
/usr/include/c++/4.7/cwchar:
/usr/include/x86_64-linux-gnu/bits/wchar.h:
/usr/include/c++/4.7/bits/allocator.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++allocator.h:
/usr/include/c++/4.7/ext/new_allocator.h:
/usr/include/c++/4.7/new:
/usr/include/c++/4.7/exception:
/usr/include/c++/4.7/bits/atomic_lockfree_defines.h:
/usr/include/c++/4.7/bits/localefwd.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/c++locale.h:
/usr/include/c++/4.7/clocale:
/usr/include/locale.h:
/usr/include/x86_64-linux-gnu/bits/locale.h:
/usr/include/c++/4.7/iosfwd:
/usr/include/c++/4.7/cctype:
/usr/include/ctype.h:
/usr/include/c++/4.7/bits/ostream_insert.h:
/usr/include/c++/4.7/bits/cxxabi_forced.h:
/usr/include/c++/4.7/bits/stl_function.h:
/usr/include/c++/4.7/backward/binders.h:
/usr/include/c++/4.7/bits/range_access.h:
/usr/include/c++/4.7/bits/basic_string.h:
/usr/include/c++/4.7/ext/atomicity.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr-default.h:
/usr/include/pthread.h:
/usr/include/sched.h:
/usr/include/x86_64-linux-gnu/bits/sched.h:
/usr/include/x86_64-linux-gnu/bits/setjmp.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/atomic_word.h:
/usr/include/c++/4.7/bits/basic_string.tcc:
/usr/include/c++/4.7/map:
/usr/include/c++/4.7/bits/stl_tree.h:
/usr/include/c++/4.7/bits/stl_map.h:
/usr/include/c++/4.7/bits/stl_multimap.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
/usr/include/x86_64-linux-gnu/bits/dirent.h:
/usr/include/x86_64-linux-gnu/bits/posix1_lim.h:
/usr/include/x86_64-linux-gnu/bits/local_lim.h:
/usr/include/linux/limits.h:
/usr/include/x86_64-linux-gnu/sys/param.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/limits.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed/syslimits.h:
/usr/include/limits.h:
/usr/include/x86_64-linux-gnu/bits/posix2_lim.h:
/usr/include/x86_64-linux-gnu/bits/xopen_lim.h:
/usr/include/linux/param.h:
/usr/include/x86_64-linux-gnu/asm/param.h:
/usr/include/asm-generic/param.h:
/usr/include/unistd.h:
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
/usr/include/x86_64-linux-gnu/bits/environments.h:
/usr/include/x86_64-linux-gnu/bits/confname.h:
/usr/include/getopt.h:
zm.h:
zm_config.h:
../config.h:
zm_config_defines.h:
zm_logger.h:
/usr/include/mysql/mysql.h:
/usr/include/mysql/mysql_version.h:
/usr/include/mysql/mysql_com.h:
/usr/include/mysql/mysql_time.h:
/usr/include/mysql/my_list.h:
/usr/include/mysql/typelib.h:
/usr/include/mysql/my_alloc.h:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdint.h:
/usr/include/stdint.h:
zm_image_analyser.h:
/usr/include/c++/4.7/list:
/usr/include/c++/4.7/bits/stl_list.h:
/usr/include/c++/4.7/bits/list.tcc:
/usr/include/c++/4.7/stdexcept:
/usr/include/c++/4.7/iostream:
/usr/include/c++/4.7/ostream:
/usr/include/c++/4.7/ios:
/usr/include/c++/4.7/bits/ios_base.h:
/usr/include/c++/4.7/bits/locale_classes.h:
/usr/include/c++/4.7/bits/locale_classes.tcc:
/usr/include/c++/4.7/streambuf:
/usr/include/c++/4.7/bits/streambuf.tcc:
/usr/include/c++/4.7/bits/basic_ios.h:
/usr/include/c++/4.7/bits/locale_facets.h:
/usr/include/c++/4.7/cwctype:
/usr/include/wctype.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/ctype_base.h:
/usr/include/c++/4.7/bits/streambuf_iterator.h:
/usr/include/c++/4.7/x86_64-linux-gnu/bits/ctype_inline.h:
/usr/include/c++/4.7/bits/locale_facets.tcc:
/usr/include/c++/4.7/bits/basic_ios.tcc:
/usr/include/c++/4.7/bits/ostream.tcc:
/usr/include/c++/4.7/istream:
/usr/include/c++/4.7/bits/istream.tcc:
/usr/include/c++/4.7/memory:
/usr/include/c++/4.7/bits/stl_construct.h:
/usr/include/c++/4.7/ext/alloc_traits.h:
/usr/include/c++/4.7/bits/stl_uninitialized.h:
/usr/include/c++/4.7/bits/stl_tempbuf.h:
/usr/include/c++/4.7/bits/stl_raw_storage_iter.h:
/usr/include/c++/4.7/backward/auto_ptr.h:
zm_detector.h:
/usr/include/syslog.h:
/usr/include/x86_64-linux-gnu/sys/syslog.h:
/usr/include/x86_64-linux-gnu/bits/syslog-path.h:
/usr/include/libgen.h:
zm_image.h:
zm_jpeg.h:
/usr/include/setjmp.h:
jinclude.h:
/root/zm/libjpeg-turbo-1.2.1/jconfig.h:
/usr/include/string.h:
/root/zm/libjpeg-turbo-1.2.1/jpeglib.h:
/root/zm/libjpeg-turbo-1.2.1/jmorecfg.h:
/root/zm/libjpeg-turbo-1.2.1/jerror.h:
zm_rgb.h:
zm_coord.h:
zm_box.h:
/usr/include/math.h:
/usr/include/x86_64-linux-gnu/bits/huge_val.h:
/usr/include/x86_64-linux-gnu/bits/huge_valf.h:
/usr/include/x86_64-linux-gnu/bits/huge_vall.h:
/usr/include/x86_64-linux-gnu/bits/inf.h:
/usr/include/x86_64-linux-gnu/bits/nan.h:
/usr/include/x86_64-linux-gnu/bits/mathdef.h:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:
zm_poly.h:
zm_mem_utils.h:
zm_utils.h:
/usr/include/x86_64-linux-gnu/sys/time.h:
/usr/include/c++/4.7/vector:
/usr/include/c++/4.7/bits/stl_vector.h:
/usr/include/c++/4.7/bits/stl_bvector.h:
/usr/include/c++/4.7/bits/vector.tcc:
/usr/include/errno.h:
/usr/include/x86_64-linux-gnu/bits/errno.h:
/usr/include/linux/errno.h:
/usr/include/x86_64-linux-gnu/asm/errno.h:
/usr/include/asm-generic/errno.h:
/usr/include/asm-generic/errno-base.h:
/usr/include/zlib.h:
/usr/include/zconf.h:
zm_zone.h:
zm_event.h:
/usr/include/x86_64-linux-gnu/sys/stat.h:
/usr/include/x86_64-linux-gnu/bits/stat.h:
/usr/include/c++/4.7/set:
/usr/include/c++/4.7/bits/stl_set.h:
/usr/include/c++/4.7/bits/stl_multiset.h:
zm_stream.h:
/usr/include/x86_64-linux-gnu/sys/un.h:
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
/usr/include/x86_64-linux-gnu/sys/socket.h:
/usr/include/x86_64-linux-gnu/sys/uio.h:
/usr/include/x86_64-linux-gnu/bits/uio.h:
/usr/include/x86_64-linux-gnu/bits/socket.h:
/usr/include/x86_64-linux-gnu/asm/socket.h:
/usr/include/asm-generic/socket.h:
/usr/include/x86_64-linux-gnu/asm/sockios.h:
/usr/include/asm-generic/sockios.h:
zm_mpeg.h:
zm_ffmpeg.h:
/usr/include/libavutil/avutil.h:
/usr/include/libavutil/common.h:
/usr/include/inttypes.h:
/usr/include/libavutil/attributes.h:
/usr/include/libavutil/avconfig.h:
/usr/include/libavutil/mem.h:
/usr/include/libavutil/error.h:
/usr/include/libavutil/avutil.h:
/usr/include/libavutil/mathematics.h:
/usr/include/libavutil/rational.h:
/usr/include/libavutil/intfloat_readwrite.h:
/usr/include/libavutil/log.h:
/usr/include/libavutil/pixfmt.h:
/usr/include/libavcodec/avcodec.h:
/usr/include/libavutil/samplefmt.h:
/usr/include/libavutil/cpu.h:
/usr/include/libavutil/dict.h:
/usr/include/libavutil/log.h:
/usr/include/libavutil/pixfmt.h:
/usr/include/libavutil/rational.h:
/usr/include/libavutil/audioconvert.h:
/usr/include/libavcodec/version.h:
/usr/include/libavformat/avformat.h:
/usr/include/libavformat/avio.h:
/usr/include/libavutil/common.h:
/usr/include/libavformat/version.h:
/usr/include/libswscale/swscale.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -158,7 +158,6 @@ zm_stream.o: zm_stream.cpp /usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -172,7 +171,6 @@ zm_stream.o: zm_stream.cpp /usr/include/x86_64-linux-gnu/sys/un.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
/usr/include/x86_64-linux-gnu/sys/un.h:
@ -639,8 +637,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -685,8 +681,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -157,7 +157,6 @@ zm_zone.o: zm_zone.cpp zm.h zm_config.h ../config.h zm_config_defines.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -171,7 +170,6 @@ zm_zone.o: zm_zone.cpp zm.h zm_config.h ../config.h zm_config_defines.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
zm.h:
@ -640,8 +638,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -686,8 +682,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -162,7 +162,6 @@ zma.o: zma.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -176,7 +175,6 @@ zma.o: zma.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
/usr/include/getopt.h:
@ -665,8 +663,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -711,8 +707,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -164,7 +164,6 @@ zmc.o: zmc.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -178,7 +177,6 @@ zmc.o: zmc.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
/usr/include/getopt.h:
@ -673,8 +671,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -719,8 +715,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -164,7 +164,6 @@ zmf.o: zmf.cpp /usr/include/stdio.h /usr/include/features.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -178,7 +177,6 @@ zmf.o: zmf.cpp /usr/include/stdio.h /usr/include/features.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h zmf.h
/usr/include/stdio.h:
@ -667,8 +665,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -713,8 +709,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -174,7 +174,6 @@ zms.o: zms.cpp /usr/include/x86_64-linux-gnu/sys/ipc.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -188,7 +187,6 @@ zms.o: zms.cpp /usr/include/x86_64-linux-gnu/sys/ipc.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
/usr/include/x86_64-linux-gnu/sys/ipc.h:
@ -701,8 +699,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -747,8 +743,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -173,7 +173,6 @@ zmstreamer.o: zmstreamer.cpp /usr/include/stdio.h /usr/include/features.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -187,7 +186,6 @@ zmstreamer.o: zmstreamer.cpp /usr/include/stdio.h /usr/include/features.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h
/usr/include/stdio.h:
@ -700,8 +698,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -746,8 +742,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -169,7 +169,6 @@ zmu.o: zmu.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
/usr/include/asm-generic/ioctl.h \
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h zm_plugin_manager.h \
/usr/include/x86_64-linux-gnu/sys/dir.h /usr/include/dirent.h \
/usr/include/x86_64-linux-gnu/bits/dirent.h \
/usr/include/x86_64-linux-gnu/sys/param.h /usr/include/linux/param.h \
@ -183,7 +182,6 @@ zmu.o: zmu.cpp /usr/include/getopt.h /usr/include/ctype.h \
/usr/include/c++/4.7/backward/auto_ptr.h zm_detector.h \
/usr/include/syslog.h /usr/include/x86_64-linux-gnu/sys/syslog.h \
/usr/include/x86_64-linux-gnu/bits/syslog-path.h /usr/include/libgen.h \
zm_plugin.h /usr/include/dlfcn.h \
/usr/include/x86_64-linux-gnu/bits/dlfcn.h zm_local_camera.h \
/usr/include/linux/videodev2.h /usr/include/linux/types.h \
/usr/include/x86_64-linux-gnu/asm/types.h \
@ -694,8 +692,6 @@ zm_camera.h:
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
zm_plugin_manager.h:
/usr/include/x86_64-linux-gnu/sys/dir.h:
/usr/include/dirent.h:
@ -740,8 +736,6 @@ zm_detector.h:
/usr/include/libgen.h:
zm_plugin.h:
/usr/include/dlfcn.h:
/usr/include/x86_64-linux-gnu/bits/dlfcn.h:

View File

@ -58,11 +58,7 @@ zm_SOURCES = \
zm_timer.cpp \
zm_user.cpp \
zm_utils.cpp \
zm_zone.cpp \
zm_detector.cpp \
zm_plugin.cpp \
zm_plugin_manager.cpp \
zm_image_analyser.cpp
zm_zone.cpp
zmc_SOURCES = zmc.cpp $(zm_SOURCES)
zma_SOURCES = zma.cpp $(zm_SOURCES)
@ -117,11 +113,7 @@ noinst_HEADERS = \
zm_timer.h \
zm_user.h \
zm_utils.h \
zm_zone.h \
zm_detector.h \
zm_plugin.h \
zm_plugin_manager.h \
zm_image_analyser.h
zm_zone.h
EXTRA_DIST = \
zm_config.h.in \

View File

@ -217,11 +217,6 @@
#define ZM_EYEZM_H264_DEFAULT_EVBR 213
#define ZM_EYEZM_H264_TIMEOUT 214
#define ZM_EYEZM_SEG_DURATION 215
#define ZM_PATH_PLUGINS 216
#define ZM_PLUGIN_EXTENSION 217
#define ZM_PLUGINS_CONFIG_PATH 218
#define ZM_LOAD_PLUGINS 219
#define ZM_TURNOFF_NATIVE_ANALYSIS 220
#define ZM_MAX_CFG_ID 220
@ -443,11 +438,6 @@
const char *eyezm_h264_default_evbr;\
const char *eyezm_h264_timeout;\
const char *eyezm_seg_duration;\
const char *path_plugins;\
const char *plugin_extension;\
const char *plugins_config_path;\
bool load_plugins;\
bool turnoff_native_analysis;\
#define ZM_CFG_ASSIGN_LIST \
@ -667,10 +657,5 @@
eyezm_h264_default_evbr = (const char *)config.Item( ZM_EYEZM_H264_DEFAULT_EVBR );\
eyezm_h264_timeout = (const char *)config.Item( ZM_EYEZM_H264_TIMEOUT );\
eyezm_seg_duration = (const char *)config.Item( ZM_EYEZM_SEG_DURATION );\
path_plugins = (const char *)config.Item( ZM_PATH_PLUGINS );\
plugin_extension = (const char *)config.Item( ZM_PLUGIN_EXTENSION );\
plugins_config_path = (const char *)config.Item( ZM_PLUGINS_CONFIG_PATH );\
load_plugins = (bool)config.Item( ZM_LOAD_PLUGINS );\
turnoff_native_analysis = (bool)config.Item( ZM_TURNOFF_NATIVE_ANALYSIS );\

View File

@ -1,200 +0,0 @@
#include "zm_detector.h"
/*!\fn Detector::Detector(const Detector& source)
* \param source is the object to copy
*/
Detector::Detector(const Detector& source)
: m_sDetectionCause(source.m_sDetectionCause),
m_fMinAlarmScore(source.m_fMinAlarmScore),
m_fMaxAlarmScore(source.m_fMaxAlarmScore),
m_fImageScaleFactor(source.m_fImageScaleFactor),
m_nNewWidth(source.m_nNewWidth),
m_nNewHeight(source.m_nNewHeight),
m_sLogPrefix(source.m_sLogPrefix),
m_sConfigSectionName(source.m_sConfigSectionName)
{
//setlogmask (LOG_UPTO (LOG_LEVEL));
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
}
/*!\fn Detector& ImageAnalyser::Detector::operator=(const ImageAnalyser::Detector& source)
* \param source is the object to copy
*/
Detector& Detector::operator=(const Detector& source)
{
m_sDetectionCause = source.m_sDetectionCause;
m_fMinAlarmScore = source.m_fMinAlarmScore;
m_fMaxAlarmScore = source.m_fMaxAlarmScore;
m_fImageScaleFactor = source.m_fImageScaleFactor;
m_sLogPrefix = source.m_sLogPrefix;
m_nNewWidth = source.m_nNewWidth;
m_nNewHeight = source.m_nNewHeight;
m_sConfigSectionName = source.m_sConfigSectionName;
//setlogmask (LOG_UPTO (LOG_LEVEL));
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
return *this;
}
/*!\fn Detector::getDetectionCause()
* return detection cause as string
*/
string Detector::getDetectionCause()
{
return m_sDetectionCause;
}
/*! \fn Detector::log(int nLogLevel, string sMessage)
*/
void Detector::log(int nLogLevel, string sMessage)
{
string sMessageToLog = m_sLogPrefix + string(" : ") + sMessage;
syslog(nLogLevel, "%s", sMessageToLog.c_str());
}
//Detector::~Detector() {}
/*! \fn int FaceDetectorPlugin::Detect(const Image &image, Event::StringSet &zoneSet)
* \param image is an image to detect faces on
* \param zoneSet is set of zone names (see zm_zone.h)
* \return detection score
*/
int Detector::Detect(const Image &zmImage, Zone** zones, int n_numZones, Event::StringSet &zoneSet)
{
//log(LOG_LEVEL, "Detection invoking.");
bool alarm = false;
char szMessage[50];
unsigned int score = 0;
if (n_numZones <= 0) return (alarm);
// // Blank out all exclusion zones
// for ( int n_zone = 0; n_zone < n_zones; n_zone++ )
// {
// Zone *zone = zones[n_zone];
// zone->ClearAlarm();
// if ( !zone->IsInactive() )
// {
// continue;
// }
// Debug( 3, "Blanking inactive zone %s", zone->Label() );
// delta_image->Fill( RGB_BLACK, zone->GetPolygon() );
// }
// Check preclusive zones first
for (int n_zone = 0; n_zone < n_numZones; n_zone++)
{
Zone *zone = zones[n_zone];
if (!zone->IsPreclusive())
{
continue;
}
sprintf(szMessage, "Checking preclusive zone %s", zone->Label());
log(LOG_DEBUG, szMessage);
if (checkZone(zone, &zmImage))
{
alarm = true;
score += zone->Score();
zone->SetAlarm();
sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
log(LOG_DEBUG, szMessage);
zoneSet.insert(zone->Label());
}
}
if ( alarm )
{
alarm = false;
score = 0;
}
else
{
// Find all alarm pixels in active zones
for (int n_zone = 0; n_zone < n_numZones; n_zone++)
{
Zone *zone = zones[n_zone];
if (!zone->IsActive())
{
continue;
}
//sprintf(szMessage, "Checking active zone %s", zone->Label());
//log(LOG_DEBUG, szMessage);
if (checkZone(zone, &zmImage))
{
alarm = true;
score += zone->Score();
zone->SetAlarm();
sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
log(LOG_DEBUG, szMessage);
zoneSet.insert(zone->Label());
}
}
if ( alarm )
{
// Checking inclusive zones
for (int n_zone = 0; n_zone < n_numZones; n_zone++)
{
Zone *zone = zones[n_zone];
if (!zone->IsInclusive())
{
continue;
}
sprintf(szMessage, "Checking inclusive zone %s", zone->Label());
log(LOG_DEBUG, szMessage);
if (checkZone(zone, &zmImage))
{
alarm = true;
score += zone->Score();
zone->SetAlarm();
sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
log(LOG_DEBUG, szMessage);
zoneSet.insert(zone->Label());
}
}
}
else
{
// Find all alarm pixels in exclusive zones
for (int n_zone = 0; n_zone < n_numZones; n_zone++)
{
Zone *zone = zones[n_zone];
if (!zone->IsExclusive())
{
continue;
}
sprintf(szMessage, "Checking exclusive zone %s", zone->Label());
log(LOG_DEBUG, szMessage);
if (checkZone(zone, &zmImage))
{
alarm = true;
score += zone->Score();
zone->SetAlarm();
sprintf(szMessage, "Zone is alarmed, zone score = %d", zone->Score());
log(LOG_DEBUG, szMessage);
zoneSet.insert(zone->Label());
}
}
} //else if(alarm) : exclusive
} //else if(alarm)
return(score?score:alarm);
}

View File

@ -1,129 +0,0 @@
#ifndef ZM_DETECTOR_H
#define ZM_DETECTOR_H
#include <string>
#include <syslog.h>
#include <libgen.h>
#include "zm_image.h"
#include "zm_zone.h"
#include "zm_event.h"
#define DEFAULT_DETECTION_CAUSE "Object Detected"
#define DEFAULT_MIN_ALARM_SCORE 1.0
#define DEFAULT_MAX_ALARM_SCORE 99.0
#define DEFAULT_IMAGE_SCALE_FACTOR 1.0
#define DEFAULT_LOG_PREFIX "ZM PLUGIN"
#define LOG_LEVEL LOG_NOTICE
#define DEFAULT_CONFIGFILE_SECTION "libzm_vscvl_plugin"
using namespace std;
//! Base class for object detectors, defined in plugins.
class Detector
{
public:
//! Destructor
virtual ~Detector() { closelog(); }
//! Default constructor
Detector()
{
m_sLogPrefix = DEFAULT_LOG_PREFIX;
//setlogmask (LOG_UPTO (LOG_LEVEL));
//openlog(m_sLogPrefix.c_str(), LOG_PID|LOG_CONS, LOG_USER);
m_sDetectionCause = DEFAULT_DETECTION_CAUSE;
m_fMinAlarmScore = DEFAULT_MIN_ALARM_SCORE;
m_fMaxAlarmScore = DEFAULT_MAX_ALARM_SCORE;
m_fImageScaleFactor = DEFAULT_IMAGE_SCALE_FACTOR;
m_sConfigSectionName = DEFAULT_CONFIGFILE_SECTION;
m_nNewWidth = 0;
m_nNewHeight = 0;
}
//! Constructor with section name parameter.
Detector(string sPluginFileName)
{
m_sLogPrefix = DEFAULT_LOG_PREFIX;
char* szPluginFileName = strdup(sPluginFileName.c_str());
string sPluginFileNameName = string(basename(szPluginFileName));
size_t idx = sPluginFileNameName.rfind('.');
if (idx == string::npos)
m_sConfigSectionName = sPluginFileNameName;
else
m_sConfigSectionName = sPluginFileNameName.substr(0, idx);
m_sDetectionCause = DEFAULT_DETECTION_CAUSE;
m_fMinAlarmScore = DEFAULT_MIN_ALARM_SCORE;
m_fMaxAlarmScore = DEFAULT_MAX_ALARM_SCORE;
m_fImageScaleFactor = DEFAULT_IMAGE_SCALE_FACTOR;
m_nNewWidth = 0;
m_nNewHeight = 0;
}
//! Copy constructor
Detector(const Detector& source);
//! Assignment operator
Detector& operator=(const Detector& source);
//! Detect (in an image later)
int Detect(const Image &image, Zone** zones, int n_numZones, Event::StringSet &zoneSet);
//! Load detector's parameters from a config file.
virtual void loadConfig(string sConfigFileName) = 0;
//! Returns detection case string.
string getDetectionCause();
protected:
//! Do detection inside one given zone.
virtual bool checkZone(Zone *zone, const Image *zmImage) = 0;
//! Log messages to the SYSLOG.
void log(int, string sMessage);
//! String to be shown as detection cause for event.
string m_sDetectionCause;
//! Minimum score value to consider frame as to be alarmed.
double m_fMinAlarmScore;
//! Maximum score value to consider frame as to be alarmed.
double m_fMaxAlarmScore;
//! Maximum allowed width of frame image.
double m_fImageScaleFactor;
//! Width of image to resize.
int m_nNewWidth;
//! Height of image to resize.
int m_nNewHeight;
//
// //! Output stream for logging errors.
// ofstream m_outStream;
//! String prefix for SYSLOG messages.
string m_sLogPrefix;
//! Name of config file section to search parameters.
string m_sConfigSectionName;
};
#endif // ZM_DETECTOR_H

View File

@ -62,26 +62,3 @@ int ImageAnalyser::DoDetection(const Image &comp_image, Zone** zones, int n_numZ
return score;
}
/*!\fn ImageAnalyser::configurePlugins(string sConfigFileName)
* \param sConfigFileName is the path to the configuration file, where parameters for all plugins are given.
*/
void ImageAnalyser::configurePlugins(string sConfigFileName)
{
for(DetectorsList::iterator It = m_Detectors.begin();
It != m_Detectors.end();
++It)
{
try
{
(*It)->loadConfig(sConfigFileName);
}
catch(...)
{
//Info("ERROR: Plugin \"%s\" couldn\'t load config file \"%s\".", (*It)->getDetectionCause().c_str(), sConfigFileName.c_str());
Info("ERROR: Plugin couldn\'t load config file .");
}
}
}

View File

@ -20,13 +20,8 @@
using namespace std;
//! List of available detectors.
typedef std::list<Detector *> DetectorsList;
//! Class for handling image detection.
/*! Contains all detectors loaded from plugins.
*/
class ImageAnalyser {
public:
@ -42,22 +37,8 @@ class ImageAnalyser {
//! Overloaded operator=.
ImageAnalyser& operator=(const ImageAnalyser& source);
//! Adds new plugin's detector to the list of detectors.
void addDetector(std::auto_ptr<Detector> Det)
{
m_Detectors.push_back(Det.release());
}
//! Do detection in an image by calling all available detectors.
int DoDetection(const Image &comp_image, Zone** zones, int n_numZones, Event::StringSetMap noteSetMap, std::string& det_cause);
//! Configure all loaded plugins using given configuration file.
void configurePlugins(string sConfigFileName);
private:
//! All available detectors.
DetectorsList m_Detectors;
};

View File

@ -293,9 +293,7 @@ Monitor::Monitor(
Rgb p_signal_check_colour,
Purpose p_purpose,
int p_n_zones,
Zone *p_zones[],
std::string p_sPlugins,
int p_DoNativeMotDet
Zone *p_zones[]
) : id( p_id ),
function( (Function)p_function ),
enabled( p_enabled ),
@ -434,12 +432,6 @@ Monitor::Monitor(
shared_images = (uint8_t*)((unsigned long)shared_images + (16 - ((unsigned long)shared_images % 16)));
}
//========================================================================================
// Get from string with plugins names particular names.
m_sPluginNames = split(p_sPlugins, ';');
//========================================================================================
if ( purpose == CAPTURE )
{
@ -475,31 +467,6 @@ Monitor::Monitor(
shared_data->last_read_time = 0;
shared_data->alarm_x = -1;
shared_data->alarm_y = -1;
//========================================================================================
Info("In the constructor of Monitor class with ID=%d:", p_id);
if (config.load_plugins)
{
Info("Load plugins from the directory %s ... ", config.path_plugins);
std::string sPluginExt = std::string(config.plugin_extension);
ThePluginManager.setPluginExt(sPluginExt);
for (std::vector<std::string>::iterator it = m_sPluginNames.begin() ; it < m_sPluginNames.end(); it++ )
{
std::string sFullPluginPath = join_paths(config.path_plugins, *it + config.plugin_extension);
Info("Plugin path %s", sFullPluginPath.c_str());
ThePluginManager.loadPlugin(sFullPluginPath);
}
// int count_plugins = ThePluginManager.findPlugins(config.path_plugins);
// Info("Number of found plugins is %d", count_plugins);
// if (count_plugins > 0)
// {
std::string sPluginsConfig = std::string(config.plugins_config_path);
Info("Configure plugins with \'%s\' config file.", config.plugins_config_path);
ThePluginManager.configurePlugins(sPluginsConfig);
// }
}
//========================================================================================
}
@ -1366,21 +1333,6 @@ bool Monitor::Analyse()
}
}
if (config.load_plugins)
{
std::string det_cause; // detection cause to fill in plugin's detectors
score += ThePluginManager.getImageAnalyser().DoDetection(*snap_image, zones, n_zones, noteSetMap, det_cause);
if (!event)
{
if (det_cause.length())
{
if (cause.length())
cause += ", ";
cause += det_cause;
}
}
}
//====================================================================
shared_data->active = signal;
@ -1737,12 +1689,6 @@ void Monitor::Reload()
ref_blend_perc = atoi(dbrow[index++]);
track_motion = atoi(dbrow[index++]);
//============================================================================
std::string plugins = dbrow[index]; index++;
m_sPluginNames = split(plugins ,';');
iDoNativeMotDet = atoi(dbrow[index++]);
//============================================================================
if ( dbrow[index][0] == '#' )
signal_check_colour = strtol(dbrow[index]+1,0,16);
@ -1958,10 +1904,6 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
int fps_report_interval = atoi(dbrow[col]); col++;
int ref_blend_perc = atoi(dbrow[col]); col++;
int track_motion = atoi(dbrow[col]); col++;
//============================================================================
std::string plugins = dbrow[col]; col++;
int doNativeMotDet = atoi(dbrow[col]); col++;
//============================================================================
int signal_check_colour;
if ( dbrow[col][0] == '#' )
@ -2021,9 +1963,7 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
signal_check_colour,
purpose,
0,
0,
plugins,
doNativeMotDet
0
);
Zone **zones = 0;
int n_zones = Zone::Load( monitors[i], zones );
@ -2116,11 +2056,6 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c
int ref_blend_perc = atoi(dbrow[col]); col++;
int track_motion = atoi(dbrow[col]); col++;
//============================================================================
std::string plugins = dbrow[col]; col++;
int doNativeMotDet = atoi(dbrow[col]); col++;
//============================================================================
int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
@ -2197,9 +2132,7 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c
RGB_WHITE,
purpose,
0,
0,
plugins,
doNativeMotDet
0
);
Zone **zones = 0;
@ -2287,11 +2220,6 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu
int fps_report_interval = atoi(dbrow[col]); col++;
int ref_blend_perc = atoi(dbrow[col]); col++;
int track_motion = atoi(dbrow[col]); col++;
//============================================================================
std::string plugins = dbrow[col]; col++;
int doNativeMotDet = atoi(dbrow[col]); col++;
//============================================================================
int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
@ -2337,9 +2265,7 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu
RGB_WHITE,
purpose,
0,
0,
plugins,
doNativeMotDet
0
);
Zone **zones = 0;
@ -2428,11 +2354,6 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
int fps_report_interval = atoi(dbrow[col]); col++;
int ref_blend_perc = atoi(dbrow[col]); col++;
int track_motion = atoi(dbrow[col]); col++;
//============================================================================
std::string plugins = dbrow[col]; col++;
int doNativeMotDet = atoi(dbrow[col]); col++;
//============================================================================
int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width);
int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height);
@ -2478,9 +2399,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
RGB_WHITE,
purpose,
0,
0,
plugins,
doNativeMotDet
0
);
Zone **zones = 0;
int n_zones = Zone::Load( monitors[i], zones );
@ -2569,11 +2488,6 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
int fps_report_interval = atoi(dbrow[col]); col++;
int ref_blend_perc = atoi(dbrow[col]); col++;
int track_motion = atoi(dbrow[col]); col++;
//============================================================================
std::string plugins = dbrow[col]; col++;
int doNativeMotDet = atoi(dbrow[col]); col++;
//============================================================================
int signal_check_colour;
if ( dbrow[col][0] == '#' )
@ -2724,9 +2638,7 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
signal_check_colour,
purpose,
0,
0,
plugins,
doNativeMotDet
0
);

View File

@ -31,7 +31,6 @@
#include "zm_event.h"
#include "zm_camera.h"
#include "zm_plugin_manager.h"
#include "zm_image_analyser.h"
#include <sys/time.h>
@ -153,11 +152,6 @@ protected:
void* padding;
};
//=========================================================================
PluginManager ThePluginManager;
std::vector<std::string> m_sPluginNames;
//int iDoNativeMotDet;
class MonitorLink
{
protected:
@ -293,7 +287,7 @@ protected:
public:
// OurCheckAlarms seems to be unused. Check it on zm_monitor.cpp for more info.
//bool OurCheckAlarms( Zone *zone, const Image *pImage );
Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0, std::string plugins = "", int p_DoNativeMotDect = 1 );
Monitor( int p_id, const char *p_name, int p_function, bool p_enabled, const char *p_linked_monitors, Camera *p_camera, int p_orientation, unsigned int p_deinterlacing, const char *p_event_prefix, const char *p_label_format, const Coord &p_label_coord, int p_image_buffer_count, int p_warmup_count, int p_pre_event_count, int p_post_event_count, int p_stream_replay_buffer, int p_alarm_frame_count, int p_section_length, int p_frame_skip, int p_capture_delay, int p_alarm_capture_delay, int p_fps_report_interval, int p_ref_blend_perc, bool p_track_motion, Rgb p_signal_check_colour, Purpose p_purpose, int p_n_zones=0, Zone *p_zones[]=0 );
~Monitor();
void AddZones( int p_n_zones, Zone *p_zones[] );

View File

@ -1,105 +0,0 @@
#include "zm_plugin.h"
/*!\fn Plugin::Plugin(const std::string &sFilename)
* \param sFilename is the name of plugin file to load
*/
Plugin::Plugin(const std::string &sFilename)
: m_sPluginFileName(sFilename),
m_hDLL(0),
m_pDLLRefCount(0),
m_pfnGetEngineVersion(0),
m_pfnRegisterPlugin(0)
{
// Try to load the plugin as a dynamic library
m_hDLL = dlopen(sFilename.c_str(), RTLD_LAZY|RTLD_GLOBAL);
if(!m_hDLL) // if library hasn't been loaded successfully
{
throw runtime_error(string("Could not load '") + sFilename + "'");
}
// Locate the plugin's exported functions
try
{
m_pfnGetEngineVersion = reinterpret_cast<fnGetEngineVersion *>(dlsym(m_hDLL, "getEngineVersion"));
m_pfnRegisterPlugin = reinterpret_cast<fnRegisterPlugin *>(dlsym(m_hDLL, "registerPlugin"));
// If the functions aren't found, we're going to assume this is
// a plain simple DLL and not one of our plugins
if(!m_pfnGetEngineVersion || ! m_pfnRegisterPlugin)
throw runtime_error(string("'") + sFilename + "' is not a valid plugin");
// Initialize a new DLL reference counter
m_pDLLRefCount = new size_t(1);
}
catch(runtime_error &ex)
{
dlclose(m_hDLL);
throw ex;
}
catch(...)
{
dlclose(m_hDLL);
throw runtime_error(string("Unknown exception while loading plugin '") + sFilename + string("'"));
}
}
/*!\fn Plugin::Plugin(const Plugin &Other)
* \param Other is the other plugin instance to copy
*/
Plugin::Plugin(const Plugin &Other)
: m_sPluginFileName(Other.m_sPluginFileName),
m_hDLL(Other.m_hDLL),
m_pDLLRefCount(Other.m_pDLLRefCount),
m_pfnGetEngineVersion(Other.m_pfnGetEngineVersion),
m_pfnRegisterPlugin(Other.m_pfnRegisterPlugin)
{
// Increase DLL reference counter
++*m_pDLLRefCount;
}
/*!\fn Plugin::operator=(const Plugin &Other)
* \param Other is the other plugin instance to copy
* return copy of object
*/
Plugin& Plugin::operator=(const Plugin &Other)
{
m_hDLL = Other.m_hDLL;
m_pfnGetEngineVersion = Other.m_pfnGetEngineVersion;
m_pfnRegisterPlugin = Other.m_pfnRegisterPlugin;
m_pDLLRefCount = Other.m_pDLLRefCount;
m_sPluginFileName = Other.m_sPluginFileName;
// Increase DLL reference counter
++*m_pDLLRefCount;
return *this;
}
Plugin::~Plugin()
{
// Only unload the DLL if there are no more references to it
if(!--*m_pDLLRefCount)
{
delete m_pDLLRefCount;
dlclose(m_hDLL);
}
}
/*!\fn Plugin::registerPlugin(PluginManager &K)
* \param K is the pointer to plugin manager
*/
void Plugin::registerPlugin(PluginManager &K)
{
m_pfnRegisterPlugin(K, m_sPluginFileName);
}

View File

@ -1,78 +0,0 @@
#ifndef ZM_PLUGIN_H
#define ZM_PLUGIN_H
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
#include <stdexcept>
#include "zm.h"
using namespace std;
class PluginManager;
//! Signature for the version query function
typedef int fnGetEngineVersion();
//! Signature for the plugin's registration function
typedef void fnRegisterPlugin(PluginManager &, string);
//! Representation of a plugin.
/*! Use for loading plugin's shared library
* and registration of it to the PluginManager.
*/
class Plugin
{
public:
//! Initialize and load plugin
Plugin(const std::string &sFilename);
//! Copy existing plugin instance
Plugin(const Plugin &Other);
//! Operator =.
Plugin &operator =(const Plugin &Other);
//! Unload a plugin
~Plugin();
//! Query the plugin for its expected engine version
int getEngineVersion() const { return m_pfnGetEngineVersion();}
//! Register the plugin to a PluginManager
void registerPlugin(PluginManager &K);
private:
//! Shared file name.
string m_sPluginFileName;
//! DLL handle
void* m_hDLL;
//! Number of references to the DLL
size_t *m_pDLLRefCount;
//! Version query function
fnGetEngineVersion *m_pfnGetEngineVersion;
//! Plugin registration function
fnRegisterPlugin *m_pfnRegisterPlugin;
};
#endif //ZM_PLUGIN_H

View File

@ -1,118 +0,0 @@
#include "zm_plugin_manager.h"
/*! \fn file_select(const struct direct *entry)
* A functor for selection of files with specified extension.
* \param entry is file structure
* \return 1 if file match selection criteria and
* 0 otherwise.
* NOTE: file extension is specified by PluginManager::m_sPluginExt
* static variable.
*/
int file_select(const struct direct *entry)
{
char *ptr;
if ((strcmp(entry->d_name, ".")== 0) || (strcmp(entry->d_name, "..") == 0))
return 0;
// Check for filename extensions.
ptr = rindex((char*)entry->d_name, '.');
if ((ptr != NULL) && (strcmp(ptr, (PluginManager::m_sPluginExt).c_str()) == 0))
return 1;
else
return 0;
}
/*! \fn join_paths(const string& p1, const string& p2)
* \param p1 is the first part of desired path
* \param p2 is the second part of desired path
* \return joined path string.
*/
string join_paths(const string& p1, const string& p2)
{
char sep = '/';
string tmp = p1;
#ifdef _WIN32
sep = '\\';
#endif
if (p1[p1.length()] != sep)
{ // Need to add a path separator
tmp += sep;
return(tmp + p2);
}
else
return(p1 + p2);
}
string PluginManager::m_sPluginExt = DEFAULT_PLUGIN_EXT;
PluginManager::PluginManager()
{
}
/*!\fn PluginManager::loadPlugin(const string &sFilename))
* \param sFilename is the name of plugin file to load
*/
void PluginManager::loadPlugin(const string &sFilename)
{
try
{
if(m_LoadedPlugins.find(sFilename) == m_LoadedPlugins.end())
m_LoadedPlugins.insert(PluginMap::value_type(sFilename, Plugin(sFilename))).first->second.registerPlugin(*this);
}
catch(runtime_error &ex)
{
Info("Runtime error: %s", ex.what());
}
catch(...)
{
Info("Unknown exception. Could not load %s.", sFilename.c_str());
}
}
/*!\fn PluginManager::findPlugins(const string &sPath)
* \param sPath is the path to folder to search plugins
* return count of found plugins
*/
int PluginManager::findPlugins(const string &sPath)
{
struct direct **files;
int count = scandir(sPath.c_str(), &files, file_select, alphasort);
for (int i = 1; i < count + 1; ++i)
{
string sFileName = files[i-1]->d_name;
string sFullPath = join_paths(sPath, sFileName);
Info("Loading plugin %s ... ", sFullPath.c_str());
loadPlugin(sFullPath);
}
return count;
}
/*!\fn PluginManager::configurePlugins(string sConfigFileName)
* \param sConfigFileName is the path to the configuration file, where parameters for all plugins are given.
*/
void PluginManager::configurePlugins(string sConfigFileName)
{
m_ImageAnalyser.configurePlugins(sConfigFileName);
}

View File

@ -1,85 +0,0 @@
#ifndef ZM_PLUGIN_MANAGER_H
#define ZM_PLUGIN_MANAGER_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <map>
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/param.h>
#include <unistd.h>
#include "zm.h"
#include "zm_image_analyser.h"
#include "zm_detector.h"
#include "zm_plugin.h"
using namespace std;
#define ZM_ENGINE_VERSION 24
#define DEFAULT_PLUGIN_EXT ".zmpl"
//! Map of plugins by their associated file names.
typedef std::map<std::string, Plugin> PluginMap;
//! External function for sorting of files in directory.
extern int alphasort();
//! Function to select files with plugins by extension.
int file_select(const struct direct *entry);
//! Join two path strings.
string join_paths(const string& p1, const string& p2);
//! Class for managing all loaded plugins.
class PluginManager
{
public:
//! Default constructor.
PluginManager();
//! Access the image analyser.
ImageAnalyser &getImageAnalyser() {return m_ImageAnalyser;}
//! Loads a plugin.
void loadPlugin(const string &sFilename);
//! Find and load all plugins from given directory, returns number of found plugins.
int findPlugins(const string &sPath);
//! Configure all loaded plugins using given configuration file.
void configurePlugins(string sConfigFileName);
//! Set plugin extension.
void setPluginExt(string sPluginExt) { m_sPluginExt = sPluginExt; }
//! Extension for zm plugins.
static string m_sPluginExt;
private:
//! All plugins currently loaded.
PluginMap m_LoadedPlugins;
//! The image analyser.
ImageAnalyser m_ImageAnalyser;
};
#endif //ZM_PLUGIN_MANAGER_H