diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b0bc69 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile ~/.gitignore_global + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Video Files +*.mp4 +*.avi + +# Python Files +*.py + +# sqlite DB files +*.db \ No newline at end of file diff --git a/AdaptiveMedianBGS.cpp b/AdaptiveMedianBGS.cpp new file mode 100644 index 0000000..16b3988 --- /dev/null +++ b/AdaptiveMedianBGS.cpp @@ -0,0 +1,140 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* AdaptiveMedianBGS.cpp +* +* Purpose: Implementation of the simple adaptive median background +* subtraction algorithm described in: +* "Segmentation and tracking of piglets in images" +* by McFarlane and Schofield +* +* Author: Donovan Parks, September 2007 +* +******************************************************************************/ + +#include +#include +#include + +#include "AdaptiveMedianBGS.h" + +using namespace Algorithms::BackgroundSubtraction; + +void AdaptiveMedianBGS::Initalize(const BgsParams& param) +{ + m_params = (AdaptiveMedianParams&)param; + + m_median = cvCreateImage(cvSize(m_params.Width(), m_params.Height()), IPL_DEPTH_8U, 3); + cvSet(m_median.Ptr(), CV_RGB(BACKGROUND,BACKGROUND,BACKGROUND)); +} + +RgbImage* AdaptiveMedianBGS::Background() +{ + return &m_median; +} + +void AdaptiveMedianBGS::InitModel(const RgbImage& data) +{ + // initialize the background model + for (unsigned int r = 0; r < m_params.Height(); ++r) + { + for(unsigned int c = 0; c < m_params.Width(); ++c) + { + m_median(r,c) = data(r,c); + } + } +} + +void AdaptiveMedianBGS::Update(int frame_num, const RgbImage& data, const BwImage& update_mask) +{ + if(frame_num % m_params.SamplingRate() == 1) + { + // update background model + for (unsigned int r = 0; r < m_params.Height(); ++r) + { + for(unsigned int c = 0; c < m_params.Width(); ++c) + { + // perform conditional updating only if we are passed the learning phase + if(update_mask(r,c) == BACKGROUND || frame_num < m_params.LearningFrames()) + { + for(int ch = 0; ch < NUM_CHANNELS; ++ch) + { + if(data(r,c,ch) > m_median(r,c,ch)) + { + m_median(r,c,ch)++; + } + else if(data(r,c,ch) < m_median(r,c,ch)) + { + m_median(r,c,ch)--; + } + } + } + } + } + } +} + +void AdaptiveMedianBGS::SubtractPixel(int r, int c, const RgbPixel& pixel, + unsigned char& low_threshold, unsigned char& high_threshold) +{ + // perform background subtraction + low_threshold = high_threshold = FOREGROUND; + + int diffR = abs(pixel(0) - m_median(r,c,0)); + int diffG = abs(pixel(1) - m_median(r,c,1)); + int diffB = abs(pixel(2) - m_median(r,c,2)); + + if(diffR <= m_params.LowThreshold() && diffG <= m_params.LowThreshold() && diffB <= m_params.LowThreshold()) + { + low_threshold = BACKGROUND; + } + + if(diffR <= m_params.HighThreshold() && diffG <= m_params.HighThreshold() && diffB <= m_params.HighThreshold()) + { + high_threshold = BACKGROUND; + } +} + +/////////////////////////////////////////////////////////////////////////////// +//Input: +// data - a pointer to the image data +//Output: +// output - a pointer to the data of a gray value image +// (the memory should already be reserved) +// values: 255-foreground, 0-background +/////////////////////////////////////////////////////////////////////////////// +void AdaptiveMedianBGS::Subtract(int frame_num, const RgbImage& data, + BwImage& low_threshold_mask, BwImage& high_threshold_mask) +{ + unsigned char low_threshold, high_threshold; + + // update each pixel of the image + for(unsigned int r = 0; r < m_params.Height(); ++r) + { + for(unsigned int c = 0; c < m_params.Width(); ++c) + { + // perform background subtraction + SubtractPixel(r, c, data(r,c), low_threshold, high_threshold); + + // setup silhouette mask + low_threshold_mask(r,c) = low_threshold; + high_threshold_mask(r,c) = high_threshold; + } + } +} + diff --git a/AdaptiveMedianBGS.h b/AdaptiveMedianBGS.h new file mode 100644 index 0000000..deefdc9 --- /dev/null +++ b/AdaptiveMedianBGS.h @@ -0,0 +1,88 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* AdaptiveMedianBGS.hpp +* +* Purpose: Implementation of the simple adaptive median background +* subtraction algorithm described in: +* "Segmentation and tracking of piglets in images" +* by McFarlane and Schofield +* +* Author: Donovan Parks, September 2007 + +Example: + Algorithms::BackgroundSubtraction::AdaptiveMedianParams params; + params.SetFrameSize(width, height); + params.LowThreshold() = 40; + params.HighThreshold() = 2*params.LowThreshold(); + params.SamplingRate() = 7; + params.LearningFrames() = 30; + + Algorithms::BackgroundSubtraction::AdaptiveMedianBGS bgs; + bgs.Initalize(params); +******************************************************************************/ + +#include "Bgs.h" + +namespace Algorithms +{ + namespace BackgroundSubtraction + { + // --- Parameters used by the Adaptive Median BGS algorithm --- + class AdaptiveMedianParams : public BgsParams + { + public: + unsigned char &LowThreshold() { return m_low_threshold; } + unsigned char &HighThreshold() { return m_high_threshold; } + + int &SamplingRate() { return m_samplingRate; } + int &LearningFrames() { return m_learning_frames; } + + private: + unsigned char m_low_threshold; + unsigned char m_high_threshold; + + int m_samplingRate; + int m_learning_frames; + }; + + + // --- Adaptive Median BGS algorithm --- + class AdaptiveMedianBGS : public Bgs + { + public: + virtual ~AdaptiveMedianBGS() {} + + void Initalize(const BgsParams& param); + + void InitModel(const RgbImage& data); + void Subtract(int frame_num, const RgbImage& data, + BwImage& low_threshold_mask, BwImage& high_threshold_mask); + void Update(int frame_num, const RgbImage& data, const BwImage& update_mask); + + RgbImage* Background(); + + private: + void SubtractPixel(int r, int c, const RgbPixel& pixel, + unsigned char& low_threshold, unsigned char& high_threshold); + + AdaptiveMedianParams m_params; + RgbImage m_median; + }; + } +} diff --git a/Bgs.h b/Bgs.h new file mode 100644 index 0000000..5f91246 --- /dev/null +++ b/Bgs.h @@ -0,0 +1,67 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* Bgs.hpp +* +* Purpose: Base class for BGS algorithms. +* +* Author: Donovan Parks, October 2007 +* +******************************************************************************/ + +#ifndef BGS_H_ +#define BGS_H_ + +#include "Image.h" +#include "BgsParams.h" + +namespace Algorithms +{ + namespace BackgroundSubtraction + { + class Bgs + { + public: + static const int BACKGROUND = 0; + static const int FOREGROUND = 255; + + virtual ~Bgs() {} + + // Initialize any data required by the BGS algorithm. Should be called once before calling + // any of the following functions. + virtual void Initalize(const BgsParams& param) = 0; + + // Initialize the background model. Typically, the background model is initialized using the first + // frame of the incoming video stream, but alternatives are possible. + virtual void InitModel(const RgbImage& data) = 0; + + // Subtract the current frame from the background model and produce a binary foreground mask using + // both a low and high threshold value. + virtual void Subtract(int frame_num, const RgbImage& data, + BwImage& low_threshold_mask, BwImage& high_threshold_mask) = 0; + + // Update the background model. Only pixels set to background in update_mask are updated. + virtual void Update(int frame_num, const RgbImage& data, const BwImage& update_mask) = 0; + + // Return the current background model. + virtual RgbImage *Background() = 0; + }; + } +} + +#endif diff --git a/BgsParams.h b/BgsParams.h new file mode 100644 index 0000000..a63b1ac --- /dev/null +++ b/BgsParams.h @@ -0,0 +1,59 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* BgsParams.hpp +* +* Purpose: Base class for BGS parameters. Any parameters common to all BGS +* algorithms should be specified directly in this class. +* +* Author: Donovan Parks, May 2008 +* +******************************************************************************/ + +#ifndef BGS_PARAMS_H_ +#define BGS_PARAMS_H_ + +namespace Algorithms +{ + namespace BackgroundSubtraction + { + class BgsParams + { + public: + virtual ~BgsParams() {} + + virtual void SetFrameSize(unsigned int width, unsigned int height) + { + m_width = width; + m_height = height; + m_size = width*height; + } + + unsigned int &Width() { return m_width; } + unsigned int &Height() { return m_height; } + unsigned int &Size() { return m_size; } + + protected: + unsigned int m_width; + unsigned int m_height; + unsigned int m_size; + }; + } +} + +#endif diff --git a/CarDetect.vcxproj b/CarDetect.vcxproj index 23641f9..f2cbdc5 100644 --- a/CarDetect.vcxproj +++ b/CarDetect.vcxproj @@ -78,13 +78,24 @@ + + + + + + + + + + + diff --git a/CarDetect.vcxproj.filters b/CarDetect.vcxproj.filters index 6dc2cc2..9e81fc7 100644 --- a/CarDetect.vcxproj.filters +++ b/CarDetect.vcxproj.filters @@ -27,6 +27,18 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -35,9 +47,6 @@ Header Files - - Header Files - Header Files @@ -47,5 +56,29 @@ Header Files + + Source Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file diff --git a/CarDetect.vcxproj.user b/CarDetect.vcxproj.user index 3986efa..6119958 100644 --- a/CarDetect.vcxproj.user +++ b/CarDetect.vcxproj.user @@ -5,6 +5,6 @@ WindowsLocalDebugger - true + false \ No newline at end of file diff --git a/DPAdaptiveMedianBGS.cpp b/DPAdaptiveMedianBGS.cpp new file mode 100644 index 0000000..92273bb --- /dev/null +++ b/DPAdaptiveMedianBGS.cpp @@ -0,0 +1,110 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +#include "DPAdaptiveMedianBGS.h" + +DPAdaptiveMedianBGS::DPAdaptiveMedianBGS() : firstTime(true), frameNumber(0), threshold(40), samplingRate(7), learningFrames(30), showOutput(true) +{ + std::cout << "DPAdaptiveMedianBGS()" << std::endl; +} + +DPAdaptiveMedianBGS::~DPAdaptiveMedianBGS() +{ + std::cout << "~DPAdaptiveMedianBGS()" << std::endl; +} + +void DPAdaptiveMedianBGS::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel) +{ + if(img_input.empty()) + return; + + loadConfig(); + + if(firstTime) + saveConfig(); + + frame = new IplImage(img_input); + + if(firstTime) + frame_data.ReleaseMemory(false); + frame_data = frame; + + if(firstTime) + { + int width = img_input.size().width; + int height = img_input.size().height; + + lowThresholdMask = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 1); + lowThresholdMask.Ptr()->origin = IPL_ORIGIN_BL; + + highThresholdMask = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 1); + highThresholdMask.Ptr()->origin = IPL_ORIGIN_BL; + + params.SetFrameSize(width, height); + params.LowThreshold() = threshold; + params.HighThreshold() = 2*params.LowThreshold(); // Note: high threshold is used by post-processing + params.SamplingRate() = samplingRate; + params.LearningFrames() = 2000; + + bgs.Initalize(params); + bgs.InitModel(frame_data); + } + + bgs.Subtract(frameNumber, frame_data, lowThresholdMask, highThresholdMask); + if(frameNumber < params.LearningFrames()) + lowThresholdMask.Clear(); + + bgs.Update(frameNumber, frame_data, lowThresholdMask); + + curMedian = bgs.Background(); + + cv::Mat foreground(highThresholdMask.Ptr()); + cv::Mat background(curMedian->Ptr()); + + foreground.copyTo(img_output); + background.copyTo(img_bgmodel); + delete frame; + firstTime = false; + frameNumber++; +} + +void DPAdaptiveMedianBGS::saveConfig() +{ + CvFileStorage* fs = cvOpenFileStorage("DPAdaptiveMedianBGS.xml", 0, CV_STORAGE_WRITE); + + cvWriteInt(fs, "threshold", threshold); + cvWriteInt(fs, "samplingRate", samplingRate); + cvWriteInt(fs, "learningFrames", learningFrames); + cvWriteInt(fs, "showOutput", showOutput); + + cvReleaseFileStorage(&fs); +} + +void DPAdaptiveMedianBGS::loadConfig() +{ + CvFileStorage* fs = cvOpenFileStorage("DPAdaptiveMedianBGS.xml", 0, CV_STORAGE_READ); + + threshold = cvReadIntByName(fs, 0, "threshold", 40); + samplingRate = cvReadIntByName(fs, 0, "samplingRate", 7); + learningFrames = cvReadIntByName(fs, 0, "learningFrames", 30); + showOutput = cvReadIntByName(fs, 0, "showOutput", true); + + cvReleaseFileStorage(&fs); +} + + + + diff --git a/DPAdaptiveMedianBGS.h b/DPAdaptiveMedianBGS.h new file mode 100644 index 0000000..0204a15 --- /dev/null +++ b/DPAdaptiveMedianBGS.h @@ -0,0 +1,57 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +#pragma once + +#include +#include + + +#include "IBGS.h" +#include "AdaptiveMedianBGS.h" + +using namespace Algorithms::BackgroundSubtraction; + +class DPAdaptiveMedianBGS : public IBGS +{ +private: + bool firstTime; + long frameNumber; + IplImage* frame; + RgbImage frame_data; + RgbImage* curMedian; + + AdaptiveMedianParams params; + AdaptiveMedianBGS bgs; + BwImage lowThresholdMask; + BwImage highThresholdMask; + + int threshold; + int samplingRate; + int learningFrames; + bool showOutput; + +public: + DPAdaptiveMedianBGS(); + ~DPAdaptiveMedianBGS(); + + void process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel); + +private: + void saveConfig(); + void loadConfig(); +}; + diff --git a/DPAdaptiveMedianBGS.xml b/DPAdaptiveMedianBGS.xml new file mode 100644 index 0000000..593e21f --- /dev/null +++ b/DPAdaptiveMedianBGS.xml @@ -0,0 +1,7 @@ + + +40 +7 +30 +1 + diff --git a/Debug/CL.read.1.tlog b/Debug/CL.read.1.tlog index e0a4c23..47d187f 100644 Binary files a/Debug/CL.read.1.tlog and b/Debug/CL.read.1.tlog differ diff --git a/Debug/CL.write.1.tlog b/Debug/CL.write.1.tlog index 7e75906..5fb9842 100644 Binary files a/Debug/CL.write.1.tlog and b/Debug/CL.write.1.tlog differ diff --git a/Debug/CarDetect.Build.CppClean.log b/Debug/CarDetect.Build.CppClean.log new file mode 100644 index 0000000..d587f61 --- /dev/null +++ b/Debug/CarDetect.Build.CppClean.log @@ -0,0 +1,35 @@ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\ADAPTIVEMEDIANBGS.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\CARCOUNTER.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\DPADAPTIVEMEDIANBGS.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\FRAMEDIFFERENCEBGS.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\IMAGE.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\MAIN.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\RUNWRAPPER.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\VC110.PDB +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\DEBUG\SQLITE3.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\DEBUG\CARDETECT.ILK +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\DEBUG\CARDETECT.EXE +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\DEBUG\CARDETECT.PDB +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\AdaptiveMedianBGS.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\carCounter.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\DPAdaptiveMedianBGS.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\FrameDifferenceBGS.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\Image.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\main.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\runWrapper.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\sqlite3.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\cl.command.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\CL.read.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\CL.write.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link-cvtres.read.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link-cvtres.write.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link-rc.read.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link-rc.write.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link.command.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link.read.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\link.write.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\vc110.idb +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Debug\vc110.pdb +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.pdb +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.exe +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.ilk diff --git a/Debug/CarDetect.log b/Debug/CarDetect.log index 85bf4e9..13fe854 100644 --- a/Debug/CarDetect.log +++ b/Debug/CarDetect.log @@ -1,86 +1,21 @@ -Build started 3/13/2015 3:59:14 PM. +Build started 5/13/2015 12:17:16 PM. 1>Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" on node 2 (Build target(s)). 1>ClCompile: - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /IC:\Users\Vanya\Documents\Work\opencv\buildv4\install\include /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt carCounter.cpp - carCounter.cpp - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(56): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(59): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdlib.h(909) : see declaration of 'itoa' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(62): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdlib.h(909) : see declaration of 'itoa' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(65): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(110) : see declaration of 'strcpy' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(66): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(67): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdlib.h(909) : see declaration of 'itoa' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(69): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(70): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(72): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(73): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(78): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(110) : see declaration of 'strcpy' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(79): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(80): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(85): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(110) : see declaration of 'strcpy' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(86): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(87): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(88): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(89): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(90): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(91): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(92): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(93): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(94): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(95): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(182) : see declaration of 'strncat' - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(130): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(174): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(176): error C2065: 'val' : undeclared identifier - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(224): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(225): error C2065: 'val' : undeclared identifier - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(228): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(256): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(259): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(296): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(343): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(379): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(385): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(392): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(392): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(398): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(405): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(405): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(412): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(419): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(424): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(434): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(436): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(451): warning C4018: '>' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(453): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(470): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(473): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(476): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(478): warning C4018: '<' : signed/unsigned mismatch - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(480): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\carcounter.cpp(597): warning C4018: '<' : signed/unsigned mismatch - 1>Done Building Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" (Build target(s)) -- FAILED. + C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /IC:\Users\Vanya\Documents\Work\opencv\buildv4\install\include /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt runWrapper.cpp + runWrapper.cpp + 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\runwrapper.cpp(450): warning C4715: 'runWrapper' : not all control paths return a value + Link: + C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.exe" /INCREMENTAL /NOLOGO /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\lib\Debug /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\bin\Debug /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\install\x86\vc11\bin /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\install\x86\vc11\lib opencv_calib3d249d.lib opencv_contrib249d.lib opencv_core249d.lib opencv_features2d249d.lib opencv_flann249d.lib opencv_gpu249d.lib opencv_highgui249d.lib opencv_imgproc249d.lib opencv_legacy249d.lib opencv_ml249d.lib opencv_nonfree249d.lib opencv_objdetect249d.lib opencv_ocl249d.lib opencv_photo249d.lib opencv_stitching249d.lib opencv_superres249d.lib opencv_ts249d.lib opencv_video249d.lib opencv_videostab249d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.lib" /MACHINE:X86 Debug\AdaptiveMedianBGS.obj + Debug\carCounter.obj + Debug\DPAdaptiveMedianBGS.obj + Debug\FrameDifferenceBGS.obj + Debug\Image.obj + Debug\main.obj + Debug\runWrapper.obj + Debug\sqlite3.obj + CarDetect.vcxproj -> C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Debug\CarDetect.exe + 1>Done Building Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" (Build target(s)). -Build FAILED. +Build succeeded. -Time Elapsed 00:00:01.81 +Time Elapsed 00:00:03.12 diff --git a/Debug/CarDetect.unsuccessfulbuild b/Debug/CarDetect.unsuccessfulbuild deleted file mode 100644 index e69de29..0000000 diff --git a/Debug/cl.command.1.tlog b/Debug/cl.command.1.tlog index 6ea0241..58c5459 100644 Binary files a/Debug/cl.command.1.tlog and b/Debug/cl.command.1.tlog differ diff --git a/Debug/interface.obj b/Debug/interface.obj deleted file mode 100644 index a683d5c..0000000 Binary files a/Debug/interface.obj and /dev/null differ diff --git a/Debug/link.12832-cvtres.write.1.tlog b/Debug/link.12832-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12832-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12832-rc.read.1.tlog b/Debug/link.12832-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12832-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12832-rc.write.1.tlog b/Debug/link.12832-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12832-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12832.read.1.tlog b/Debug/link.12832.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12832.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12832.write.1.tlog b/Debug/link.12832.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12832.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976-cvtres.read.1.tlog b/Debug/link.12976-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976-cvtres.write.1.tlog b/Debug/link.12976-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976-rc.read.1.tlog b/Debug/link.12976-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976-rc.write.1.tlog b/Debug/link.12976-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976.read.1.tlog b/Debug/link.12976.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.12976.write.1.tlog b/Debug/link.12976.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.12976.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392-cvtres.read.1.tlog b/Debug/link.13392-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392-cvtres.write.1.tlog b/Debug/link.13392-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392-rc.read.1.tlog b/Debug/link.13392-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392-rc.write.1.tlog b/Debug/link.13392-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392.read.1.tlog b/Debug/link.13392.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13392.write.1.tlog b/Debug/link.13392.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13392.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544-cvtres.read.1.tlog b/Debug/link.13544-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544-cvtres.write.1.tlog b/Debug/link.13544-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544-rc.read.1.tlog b/Debug/link.13544-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544-rc.write.1.tlog b/Debug/link.13544-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544.read.1.tlog b/Debug/link.13544.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.13544.write.1.tlog b/Debug/link.13544.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.13544.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220-cvtres.read.1.tlog b/Debug/link.14220-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220-cvtres.write.1.tlog b/Debug/link.14220-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220-rc.read.1.tlog b/Debug/link.14220-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220-rc.write.1.tlog b/Debug/link.14220-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220.read.1.tlog b/Debug/link.14220.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.14220.write.1.tlog b/Debug/link.14220.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.14220.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336-cvtres.read.1.tlog b/Debug/link.17336-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336-cvtres.write.1.tlog b/Debug/link.17336-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336-rc.read.1.tlog b/Debug/link.17336-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336-rc.write.1.tlog b/Debug/link.17336-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336.read.1.tlog b/Debug/link.17336.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.17336.write.1.tlog b/Debug/link.17336.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.17336.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672-cvtres.read.1.tlog b/Debug/link.19672-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672-cvtres.write.1.tlog b/Debug/link.19672-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672-rc.read.1.tlog b/Debug/link.19672-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672-rc.write.1.tlog b/Debug/link.19672-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672.read.1.tlog b/Debug/link.19672.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.19672.write.1.tlog b/Debug/link.19672.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.19672.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988-cvtres.read.1.tlog b/Debug/link.20988-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988-cvtres.write.1.tlog b/Debug/link.20988-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988-rc.read.1.tlog b/Debug/link.20988-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988-rc.write.1.tlog b/Debug/link.20988-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988.read.1.tlog b/Debug/link.20988.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.20988.write.1.tlog b/Debug/link.20988.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.20988.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120-cvtres.read.1.tlog b/Debug/link.21120-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120-cvtres.write.1.tlog b/Debug/link.21120-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120-rc.read.1.tlog b/Debug/link.21120-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120-rc.write.1.tlog b/Debug/link.21120-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120.read.1.tlog b/Debug/link.21120.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.21120.write.1.tlog b/Debug/link.21120.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.21120.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252-cvtres.read.1.tlog b/Debug/link.2252-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252-cvtres.write.1.tlog b/Debug/link.2252-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252-rc.read.1.tlog b/Debug/link.2252-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252-rc.write.1.tlog b/Debug/link.2252-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252.read.1.tlog b/Debug/link.2252.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2252.write.1.tlog b/Debug/link.2252.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2252.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408-cvtres.read.1.tlog b/Debug/link.2408-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408-cvtres.write.1.tlog b/Debug/link.2408-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408-rc.read.1.tlog b/Debug/link.2408-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408-rc.write.1.tlog b/Debug/link.2408-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408.read.1.tlog b/Debug/link.2408.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.2408.write.1.tlog b/Debug/link.2408.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.2408.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084-cvtres.read.1.tlog b/Debug/link.3084-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084-cvtres.write.1.tlog b/Debug/link.3084-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084-rc.read.1.tlog b/Debug/link.3084-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084-rc.write.1.tlog b/Debug/link.3084-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084.read.1.tlog b/Debug/link.3084.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3084.write.1.tlog b/Debug/link.3084.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3084.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372-cvtres.read.1.tlog b/Debug/link.3372-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372-cvtres.write.1.tlog b/Debug/link.3372-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372-rc.read.1.tlog b/Debug/link.3372-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372-rc.write.1.tlog b/Debug/link.3372-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372.read.1.tlog b/Debug/link.3372.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3372.write.1.tlog b/Debug/link.3372.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3372.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908-cvtres.read.1.tlog b/Debug/link.3908-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908-cvtres.write.1.tlog b/Debug/link.3908-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908-rc.read.1.tlog b/Debug/link.3908-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908-rc.write.1.tlog b/Debug/link.3908-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908.read.1.tlog b/Debug/link.3908.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.3908.write.1.tlog b/Debug/link.3908.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.3908.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404-cvtres.read.1.tlog b/Debug/link.404-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404-cvtres.write.1.tlog b/Debug/link.404-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404-rc.read.1.tlog b/Debug/link.404-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404-rc.write.1.tlog b/Debug/link.404-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404.read.1.tlog b/Debug/link.404.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.404.write.1.tlog b/Debug/link.404.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.404.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076-cvtres.read.1.tlog b/Debug/link.4076-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076-cvtres.write.1.tlog b/Debug/link.4076-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076-rc.read.1.tlog b/Debug/link.4076-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076-rc.write.1.tlog b/Debug/link.4076-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076.read.1.tlog b/Debug/link.4076.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4076.write.1.tlog b/Debug/link.4076.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4076.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316-cvtres.read.1.tlog b/Debug/link.4316-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316-cvtres.write.1.tlog b/Debug/link.4316-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316-rc.read.1.tlog b/Debug/link.4316-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316-rc.write.1.tlog b/Debug/link.4316-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316.read.1.tlog b/Debug/link.4316.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4316.write.1.tlog b/Debug/link.4316.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4316.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.10072-cvtres.read.1.tlog b/Debug/link.4664-cvtres.read.1.tlog similarity index 100% rename from Debug/link.10072-cvtres.read.1.tlog rename to Debug/link.4664-cvtres.read.1.tlog diff --git a/Debug/link.10072-cvtres.write.1.tlog b/Debug/link.4664-cvtres.write.1.tlog similarity index 100% rename from Debug/link.10072-cvtres.write.1.tlog rename to Debug/link.4664-cvtres.write.1.tlog diff --git a/Debug/link.10072-rc.read.1.tlog b/Debug/link.4664-rc.read.1.tlog similarity index 100% rename from Debug/link.10072-rc.read.1.tlog rename to Debug/link.4664-rc.read.1.tlog diff --git a/Debug/link.10072-rc.write.1.tlog b/Debug/link.4664-rc.write.1.tlog similarity index 100% rename from Debug/link.10072-rc.write.1.tlog rename to Debug/link.4664-rc.write.1.tlog diff --git a/Debug/link.10072.read.1.tlog b/Debug/link.4664.read.1.tlog similarity index 100% rename from Debug/link.10072.read.1.tlog rename to Debug/link.4664.read.1.tlog diff --git a/Debug/link.10072.write.1.tlog b/Debug/link.4664.write.1.tlog similarity index 100% rename from Debug/link.10072.write.1.tlog rename to Debug/link.4664.write.1.tlog diff --git a/Debug/link.4788-cvtres.read.1.tlog b/Debug/link.4788-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4788-cvtres.write.1.tlog b/Debug/link.4788-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4788-rc.read.1.tlog b/Debug/link.4788-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4788-rc.write.1.tlog b/Debug/link.4788-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4788.read.1.tlog b/Debug/link.4788.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4788.write.1.tlog b/Debug/link.4788.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4788.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848-cvtres.read.1.tlog b/Debug/link.4848-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848-cvtres.write.1.tlog b/Debug/link.4848-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848-rc.read.1.tlog b/Debug/link.4848-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848-rc.write.1.tlog b/Debug/link.4848-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848.read.1.tlog b/Debug/link.4848.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.4848.write.1.tlog b/Debug/link.4848.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.4848.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236-cvtres.read.1.tlog b/Debug/link.5236-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236-cvtres.write.1.tlog b/Debug/link.5236-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236-rc.read.1.tlog b/Debug/link.5236-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236-rc.write.1.tlog b/Debug/link.5236-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236.read.1.tlog b/Debug/link.5236.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5236.write.1.tlog b/Debug/link.5236.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5236.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416-cvtres.read.1.tlog b/Debug/link.5416-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416-cvtres.write.1.tlog b/Debug/link.5416-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416-rc.read.1.tlog b/Debug/link.5416-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416-rc.write.1.tlog b/Debug/link.5416-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416.read.1.tlog b/Debug/link.5416.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5416.write.1.tlog b/Debug/link.5416.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5416.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.10188-cvtres.read.1.tlog b/Debug/link.5428-cvtres.read.1.tlog similarity index 100% rename from Debug/link.10188-cvtres.read.1.tlog rename to Debug/link.5428-cvtres.read.1.tlog diff --git a/Debug/link.10188-cvtres.write.1.tlog b/Debug/link.5428-cvtres.write.1.tlog similarity index 100% rename from Debug/link.10188-cvtres.write.1.tlog rename to Debug/link.5428-cvtres.write.1.tlog diff --git a/Debug/link.10188-rc.read.1.tlog b/Debug/link.5428-rc.read.1.tlog similarity index 100% rename from Debug/link.10188-rc.read.1.tlog rename to Debug/link.5428-rc.read.1.tlog diff --git a/Debug/link.10188-rc.write.1.tlog b/Debug/link.5428-rc.write.1.tlog similarity index 100% rename from Debug/link.10188-rc.write.1.tlog rename to Debug/link.5428-rc.write.1.tlog diff --git a/Debug/link.10188.read.1.tlog b/Debug/link.5428.read.1.tlog similarity index 100% rename from Debug/link.10188.read.1.tlog rename to Debug/link.5428.read.1.tlog diff --git a/Debug/link.10188.write.1.tlog b/Debug/link.5428.write.1.tlog similarity index 100% rename from Debug/link.10188.write.1.tlog rename to Debug/link.5428.write.1.tlog diff --git a/Debug/link.5516-cvtres.read.1.tlog b/Debug/link.5516-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5516-cvtres.write.1.tlog b/Debug/link.5516-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5516-rc.read.1.tlog b/Debug/link.5516-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5516-rc.write.1.tlog b/Debug/link.5516-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5516.read.1.tlog b/Debug/link.5516.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5516.write.1.tlog b/Debug/link.5516.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5516.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564-cvtres.read.1.tlog b/Debug/link.5564-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564-cvtres.write.1.tlog b/Debug/link.5564-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564-rc.read.1.tlog b/Debug/link.5564-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564-rc.write.1.tlog b/Debug/link.5564-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564.read.1.tlog b/Debug/link.5564.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.5564.write.1.tlog b/Debug/link.5564.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.5564.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316-cvtres.read.1.tlog b/Debug/link.6316-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316-cvtres.write.1.tlog b/Debug/link.6316-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316-rc.read.1.tlog b/Debug/link.6316-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316-rc.write.1.tlog b/Debug/link.6316-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316.read.1.tlog b/Debug/link.6316.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6316.write.1.tlog b/Debug/link.6316.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6316.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756-cvtres.read.1.tlog b/Debug/link.6756-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756-cvtres.write.1.tlog b/Debug/link.6756-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756-rc.read.1.tlog b/Debug/link.6756-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756-rc.write.1.tlog b/Debug/link.6756-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756.read.1.tlog b/Debug/link.6756.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6756.write.1.tlog b/Debug/link.6756.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6756.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876-cvtres.read.1.tlog b/Debug/link.6876-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876-cvtres.write.1.tlog b/Debug/link.6876-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876-rc.read.1.tlog b/Debug/link.6876-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876-rc.write.1.tlog b/Debug/link.6876-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876.read.1.tlog b/Debug/link.6876.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.6876.write.1.tlog b/Debug/link.6876.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.6876.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472-cvtres.read.1.tlog b/Debug/link.7472-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472-cvtres.write.1.tlog b/Debug/link.7472-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472-rc.read.1.tlog b/Debug/link.7472-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472-rc.write.1.tlog b/Debug/link.7472-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472.read.1.tlog b/Debug/link.7472.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.7472.write.1.tlog b/Debug/link.7472.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.7472.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016-cvtres.read.1.tlog b/Debug/link.8016-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016-cvtres.write.1.tlog b/Debug/link.8016-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016-rc.read.1.tlog b/Debug/link.8016-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016-rc.write.1.tlog b/Debug/link.8016-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016.read.1.tlog b/Debug/link.8016.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8016.write.1.tlog b/Debug/link.8016.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8016.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280-cvtres.read.1.tlog b/Debug/link.8280-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280-cvtres.write.1.tlog b/Debug/link.8280-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280-rc.read.1.tlog b/Debug/link.8280-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280-rc.write.1.tlog b/Debug/link.8280-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280.read.1.tlog b/Debug/link.8280.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8280.write.1.tlog b/Debug/link.8280.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8280.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336-cvtres.read.1.tlog b/Debug/link.8336-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336-cvtres.write.1.tlog b/Debug/link.8336-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336-rc.read.1.tlog b/Debug/link.8336-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336-rc.write.1.tlog b/Debug/link.8336-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336.read.1.tlog b/Debug/link.8336.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8336.write.1.tlog b/Debug/link.8336.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8336.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536-cvtres.read.1.tlog b/Debug/link.8536-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536-cvtres.write.1.tlog b/Debug/link.8536-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536-rc.read.1.tlog b/Debug/link.8536-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536-rc.write.1.tlog b/Debug/link.8536-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536.read.1.tlog b/Debug/link.8536.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8536.write.1.tlog b/Debug/link.8536.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8536.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660-cvtres.read.1.tlog b/Debug/link.8660-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660-cvtres.write.1.tlog b/Debug/link.8660-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660-rc.read.1.tlog b/Debug/link.8660-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660-rc.write.1.tlog b/Debug/link.8660-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660.read.1.tlog b/Debug/link.8660.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8660.write.1.tlog b/Debug/link.8660.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8660.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664-cvtres.read.1.tlog b/Debug/link.8664-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664-cvtres.write.1.tlog b/Debug/link.8664-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664-rc.read.1.tlog b/Debug/link.8664-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664-rc.write.1.tlog b/Debug/link.8664-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664.read.1.tlog b/Debug/link.8664.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8664.write.1.tlog b/Debug/link.8664.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8664.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736-cvtres.read.1.tlog b/Debug/link.8736-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736-cvtres.write.1.tlog b/Debug/link.8736-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736-rc.read.1.tlog b/Debug/link.8736-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736-rc.write.1.tlog b/Debug/link.8736-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736.read.1.tlog b/Debug/link.8736.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.8736.write.1.tlog b/Debug/link.8736.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.8736.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000-cvtres.read.1.tlog b/Debug/link.9000-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000-cvtres.write.1.tlog b/Debug/link.9000-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000-rc.read.1.tlog b/Debug/link.9000-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000-rc.write.1.tlog b/Debug/link.9000-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000.read.1.tlog b/Debug/link.9000.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9000.write.1.tlog b/Debug/link.9000.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9000.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112-cvtres.read.1.tlog b/Debug/link.9112-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112-cvtres.write.1.tlog b/Debug/link.9112-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112-rc.read.1.tlog b/Debug/link.9112-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112-rc.write.1.tlog b/Debug/link.9112-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112.read.1.tlog b/Debug/link.9112.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9112.write.1.tlog b/Debug/link.9112.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9112.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184-cvtres.read.1.tlog b/Debug/link.9184-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184-cvtres.write.1.tlog b/Debug/link.9184-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184-rc.read.1.tlog b/Debug/link.9184-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184-rc.write.1.tlog b/Debug/link.9184-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184.read.1.tlog b/Debug/link.9184.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9184.write.1.tlog b/Debug/link.9184.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9184.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584-cvtres.read.1.tlog b/Debug/link.9584-cvtres.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584-cvtres.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584-cvtres.write.1.tlog b/Debug/link.9584-cvtres.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584-cvtres.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584-rc.read.1.tlog b/Debug/link.9584-rc.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584-rc.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584-rc.write.1.tlog b/Debug/link.9584-rc.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584-rc.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584.read.1.tlog b/Debug/link.9584.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.9584.write.1.tlog b/Debug/link.9584.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/Debug/link.9584.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/Debug/link.command.1.tlog b/Debug/link.command.1.tlog index 1737ab6..594c445 100644 Binary files a/Debug/link.command.1.tlog and b/Debug/link.command.1.tlog differ diff --git a/Debug/link.read.1.tlog b/Debug/link.read.1.tlog index 1bee8ae..9fa852a 100644 Binary files a/Debug/link.read.1.tlog and b/Debug/link.read.1.tlog differ diff --git a/Debug/link.write.1.tlog b/Debug/link.write.1.tlog index 6c9fc4a..36ea348 100644 Binary files a/Debug/link.write.1.tlog and b/Debug/link.write.1.tlog differ diff --git a/Debug/main.obj b/Debug/main.obj index dae707d..a3401e2 100644 Binary files a/Debug/main.obj and b/Debug/main.obj differ diff --git a/Debug/motion_tracker.obj b/Debug/motion_tracker.obj deleted file mode 100644 index f307588..0000000 Binary files a/Debug/motion_tracker.obj and /dev/null differ diff --git a/Debug/runWrapper.obj b/Debug/runWrapper.obj index eda4635..de606b0 100644 Binary files a/Debug/runWrapper.obj and b/Debug/runWrapper.obj differ diff --git a/Debug/sqlite3.obj b/Debug/sqlite3.obj index f92c8b4..2c96e56 100644 Binary files a/Debug/sqlite3.obj and b/Debug/sqlite3.obj differ diff --git a/Debug/vc110.idb b/Debug/vc110.idb index da69fe6..416b36e 100644 Binary files a/Debug/vc110.idb and b/Debug/vc110.idb differ diff --git a/Debug/vc110.pdb b/Debug/vc110.pdb index 770e551..61b9aaa 100644 Binary files a/Debug/vc110.pdb and b/Debug/vc110.pdb differ diff --git a/FrameDifferenceBGS.cpp b/FrameDifferenceBGS.cpp new file mode 100644 index 0000000..7a5d231 --- /dev/null +++ b/FrameDifferenceBGS.cpp @@ -0,0 +1,84 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +#include "FrameDifferenceBGS.h" + +FrameDifferenceBGS::FrameDifferenceBGS() : firstTime(true), enableThreshold(true), threshold(15), showOutput(true) +{ + std::cout << "FrameDifferenceBGS()" << std::endl; +} + +FrameDifferenceBGS::~FrameDifferenceBGS() +{ + std::cout << "~FrameDifferenceBGS()" << std::endl; +} + +void FrameDifferenceBGS::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel) +{ + if(img_input.empty()) + return; + + loadConfig(); + + if(firstTime) + saveConfig(); + + if(img_input_prev.empty()) + { + img_input.copyTo(img_input_prev); + return; + } + + cv::absdiff(img_input_prev, img_input, img_foreground); + + if(img_foreground.channels() == 3) + cv::cvtColor(img_foreground, img_foreground, CV_BGR2GRAY); + + if(enableThreshold) + cv::threshold(img_foreground, img_foreground, threshold, 255, cv::THRESH_BINARY); + + if(showOutput) +// cv::imshow("Frame Difference", img_foreground); + + img_foreground.copyTo(img_output); + img_input_prev.copyTo(img_bgmodel); + + img_input.copyTo(img_input_prev); + + firstTime = false; +} + +void FrameDifferenceBGS::saveConfig() +{ + CvFileStorage* fs = cvOpenFileStorage("FrameDifferenceBGS.xml", 0, CV_STORAGE_WRITE); + + cvWriteInt(fs, "enableThreshold", enableThreshold); + cvWriteInt(fs, "threshold", threshold); + cvWriteInt(fs, "showOutput", showOutput); + + cvReleaseFileStorage(&fs); +} + +void FrameDifferenceBGS::loadConfig() +{ + CvFileStorage* fs = cvOpenFileStorage("FrameDifferenceBGS.xml", 0, CV_STORAGE_READ); + + enableThreshold = cvReadIntByName(fs, 0, "enableThreshold", true); + threshold = cvReadIntByName(fs, 0, "threshold", 15); + showOutput = cvReadIntByName(fs, 0, "showOutput", true); + + cvReleaseFileStorage(&fs); +} \ No newline at end of file diff --git a/FrameDifferenceBGS.h b/FrameDifferenceBGS.h new file mode 100644 index 0000000..338979f --- /dev/null +++ b/FrameDifferenceBGS.h @@ -0,0 +1,44 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +#pragma once + +#include +#include + + +#include "IBGS.h" + +class FrameDifferenceBGS : public IBGS +{ +private: + bool firstTime; + cv::Mat img_input_prev; + cv::Mat img_foreground; + bool enableThreshold; + int threshold; + bool showOutput; + +public: + FrameDifferenceBGS(); + ~FrameDifferenceBGS(); + + void process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img_bgmodel); + +private: + void saveConfig(); + void loadConfig(); +}; \ No newline at end of file diff --git a/FrameDifferenceBGS.xml b/FrameDifferenceBGS.xml new file mode 100644 index 0000000..7bb4bea --- /dev/null +++ b/FrameDifferenceBGS.xml @@ -0,0 +1,6 @@ + + +1 +15 +1 + diff --git a/IBGS.h b/IBGS.h new file mode 100644 index 0000000..073ce18 --- /dev/null +++ b/IBGS.h @@ -0,0 +1,33 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +#pragma once + +#include + +class IBGS +{ +public: + virtual void process(const cv::Mat &img_input, cv::Mat &img_foreground, cv::Mat &img_background) = 0; + /*virtual void process(const cv::Mat &img_input, cv::Mat &img_foreground){ + process(img_input, img_foreground, cv::Mat()); + }*/ + virtual ~IBGS(){} + +private: + virtual void saveConfig() = 0; + virtual void loadConfig() = 0; +}; diff --git a/Image.cpp b/Image.cpp new file mode 100644 index 0000000..f00febd --- /dev/null +++ b/Image.cpp @@ -0,0 +1,76 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* Image.hpp +* +* Purpose: C++ wrapper for OpenCV IplImage which supports simple and +* efficient access to the image data +* +* Author: Donovan Parks, September 2007 +* +* Based on code from: +* http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.hpptml +******************************************************************************/ + +#include "Image.h" + +ImageBase::~ImageBase() +{ + if(imgp != NULL && m_bReleaseMemory) + cvReleaseImage(&imgp); + imgp = NULL; +} + +void DensityFilter(BwImage& image, BwImage& filtered, int minDensity, unsigned char fgValue) +{ + for(int r = 1; r < image.Ptr()->height-1; ++r) + { + for(int c = 1; c < image.Ptr()->width-1; ++c) + { + int count = 0; + if(image(r,c) == fgValue) + { + if(image(r-1,c-1) == fgValue) + count++; + if(image(r-1,c) == fgValue) + count++; + if(image(r-1,c+1) == fgValue) + count++; + if(image(r,c-1) == fgValue) + count++; + if(image(r,c+1) == fgValue) + count++; + if(image(r+1,c-1) == fgValue) + count++; + if(image(r+1,c) == fgValue) + count++; + if(image(r+1,c+1) == fgValue) + count++; + + if(count < minDensity) + filtered(r,c) = 0; + else + filtered(r,c) = fgValue; + } + else + { + filtered(r,c) = 0; + } + } + } +} \ No newline at end of file diff --git a/Image.h b/Image.h new file mode 100644 index 0000000..434f22c --- /dev/null +++ b/Image.h @@ -0,0 +1,364 @@ +/* +This file is part of BGSLibrary. + +BGSLibrary is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +BGSLibrary 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with BGSLibrary. If not, see . +*/ +/**************************************************************************** +* +* Image.h +* +* Purpose: C++ wrapper for OpenCV IplImage which supports simple and +* efficient access to the image data +* +* Author: Donovan Parks, September 2007 +* +* Based on code from: +* http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/opencv-intro.html +******************************************************************************/ + +#ifndef _IMAGE_H_ +#define _IMAGE_H_ + +#include +//#include + +// --- Image Iterator --------------------------------------------------------- + +template +class ImageIterator +{ +public: + ImageIterator(IplImage* image, int x=0, int y=0, int dx= 0, int dy=0) : + i(x), j(y), i0(0) + { + data = reinterpret_cast(image->imageData); + step = image->widthStep / sizeof(T); + + nl= image->height; + if ((y+dy)>0 && (y+dy) < nl) + nl= y+dy; + + if (y<0) + j=0; + + data += step*j; + + nc = image->width; + if ((x+dx) > 0 && (x+dx) < nc) + nc = x+dx; + + nc *= image->nChannels; + if (x>0) + i0 = x*image->nChannels; + i = i0; + + nch = image->nChannels; + } + + + /* has next ? */ + bool operator!() const { return j < nl; } + + /* next pixel */ + ImageIterator& operator++() + { + i++; + if (i >= nc) + { + i=i0; + j++; + data += step; + } + return *this; + } + + ImageIterator& operator+=(int s) + { + i+=s; + if (i >= nc) + { + i=i0; + j++; + data += step; + } + return *this; + } + + /* pixel access */ + T& operator*() { return data[i]; } + + const T operator*() const { return data[i]; } + + const T neighbor(int dx, int dy) const + { + return *(data+dy*step+i+dx); + } + + T* operator&() const { return data+i; } + + /* current pixel coordinates */ + int column() const { return i/nch; } + int line() const { return j; } + +private: + int i, i0,j; + T* data; + int step; + int nl, nc; + int nch; +}; + +// --- Constants -------------------------------------------------------------- + +const unsigned char NUM_CHANNELS = 3; + +// --- Pixel Types ------------------------------------------------------------ + +class RgbPixel +{ +public: + RgbPixel() {;} + RgbPixel(unsigned char _r, unsigned char _g, unsigned char _b) + { + ch[0] = _r; ch[1] = _g; ch[2] = _b; + } + + RgbPixel& operator=(const RgbPixel& rhs) + { + ch[0] = rhs.ch[0]; ch[1] = rhs.ch[1]; ch[2] = rhs.ch[2]; + return *this; + } + + inline unsigned char& operator()(const int _ch) + { + return ch[_ch]; + } + + inline unsigned char operator()(const int _ch) const + { + return ch[_ch]; + } + + unsigned char ch[3]; +}; + +class RgbPixelFloat +{ +public: + RgbPixelFloat() {;} + RgbPixelFloat(float _r, float _g, float _b) + { + ch[0] = _r; ch[1] = _g; ch[2] = _b; + } + + RgbPixelFloat& operator=(const RgbPixelFloat& rhs) + { + ch[0] = rhs.ch[0]; ch[1] = rhs.ch[1]; ch[2] = rhs.ch[2]; + return *this; + } + + inline float& operator()(const int _ch) + { + return ch[_ch]; + } + + inline float operator()(const int _ch) const + { + return ch[_ch]; + } + + float ch[3]; +}; + +// --- Image Types ------------------------------------------------------------ + +class ImageBase +{ +public: + ImageBase(IplImage* img = NULL) { imgp = img; m_bReleaseMemory = true; } + ~ImageBase(); + + void ReleaseMemory(bool b) { m_bReleaseMemory = b; } + + IplImage* Ptr() { return imgp; } + const IplImage* Ptr() const { return imgp; } + + void ReleaseImage() + { + cvReleaseImage(&imgp); + } + + void operator=(IplImage* img) + { + imgp = img; + } + + // copy-constructor + ImageBase(const ImageBase& rhs) + { + // it is very inefficent if this copy-constructor is called + assert(false); + } + + // assignment operator + ImageBase& operator=(const ImageBase& rhs) + { + // it is very inefficent if operator= is called + assert(true); + + return *this; + } + + virtual void Clear() = 0; + +protected: + IplImage* imgp; + bool m_bReleaseMemory; +}; + +class RgbImage : public ImageBase +{ +public: + RgbImage(IplImage* img = NULL) : ImageBase(img) { ; } + + virtual void Clear() + { + cvZero(imgp); + } + + void operator=(IplImage* img) + { + imgp = img; + } + + // channel-level access using image(row, col, channel) + inline unsigned char& operator()(const int r, const int c, const int ch) + { + return (unsigned char &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels+ch]; + } + + inline const unsigned char& operator()(const int r, const int c, const int ch) const + { + return (unsigned char &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels+ch]; + } + + // RGB pixel-level access using image(row, col) + inline RgbPixel& operator()(const int r, const int c) + { + return (RgbPixel &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels]; + } + + inline const RgbPixel& operator()(const int r, const int c) const + { + return (RgbPixel &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels]; + } +}; + +class RgbImageFloat : public ImageBase +{ +public: + RgbImageFloat(IplImage* img = NULL) : ImageBase(img) { ; } + + virtual void Clear() + { + cvZero(imgp); + } + + void operator=(IplImage* img) + { + imgp = img; + } + + // channel-level access using image(row, col, channel) + inline float& operator()(const int r, const int c, const int ch) + { + return (float &)imgp->imageData[r*imgp->widthStep+(c*imgp->nChannels+ch)*sizeof(float)]; + } + + inline float operator()(const int r, const int c, const int ch) const + { + return (float)imgp->imageData[r*imgp->widthStep+(c*imgp->nChannels+ch)*sizeof(float)]; + } + + // RGB pixel-level access using image(row, col) + inline RgbPixelFloat& operator()(const int r, const int c) + { + return (RgbPixelFloat &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels*sizeof(float)]; + } + + inline const RgbPixelFloat& operator()(const int r, const int c) const + { + return (RgbPixelFloat &)imgp->imageData[r*imgp->widthStep+c*imgp->nChannels*sizeof(float)]; + } +}; + +class BwImage : public ImageBase +{ +public: + BwImage(IplImage* img = NULL) : ImageBase(img) { ; } + + virtual void Clear() + { + cvZero(imgp); + } + + void operator=(IplImage* img) + { + imgp = img; + } + + // pixel-level access using image(row, col) + inline unsigned char& operator()(const int r, const int c) + { + return (unsigned char &)imgp->imageData[r*imgp->widthStep+c]; + } + + inline unsigned char operator()(const int r, const int c) const + { + return (unsigned char)imgp->imageData[r*imgp->widthStep+c]; + } +}; + +class BwImageFloat : public ImageBase +{ +public: + BwImageFloat(IplImage* img = NULL) : ImageBase(img) { ; } + + virtual void Clear() + { + cvZero(imgp); + } + + void operator=(IplImage* img) + { + imgp = img; + } + + // pixel-level access using image(row, col) + inline float& operator()(const int r, const int c) + { + return (float &)imgp->imageData[r*imgp->widthStep+c*sizeof(float)]; + } + + inline float operator()(const int r, const int c) const + { + return (float)imgp->imageData[r*imgp->widthStep+c*sizeof(float)]; + } +}; + +// --- Image Functions -------------------------------------------------------- + +void DensityFilter(BwImage& image, BwImage& filtered, int minDensity, unsigned char fgValue); + +#endif diff --git a/Release/CL.read.1.tlog b/Release/CL.read.1.tlog index f309dac..d7f3343 100644 Binary files a/Release/CL.read.1.tlog and b/Release/CL.read.1.tlog differ diff --git a/Release/CL.write.1.tlog b/Release/CL.write.1.tlog index f44d9bc..a19d09d 100644 Binary files a/Release/CL.write.1.tlog and b/Release/CL.write.1.tlog differ diff --git a/Release/CarDetect.Build.CppClean.log b/Release/CarDetect.Build.CppClean.log index ad55c0e..4a7e053 100644 --- a/Release/CarDetect.Build.CppClean.log +++ b/Release/CarDetect.Build.CppClean.log @@ -1,11 +1,13 @@ C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\SQLITE3.OBJ C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\VC110.PDB -C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\MOTION_TRACKER.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\RUNWRAPPER.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\MAIN.OBJ +C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\CARDETECT\RELEASE\CARCOUNTER.OBJ C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\RELEASE\CARDETECT.EXE C:\USERS\VANYA\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\CARDETECT\RELEASE\CARDETECT.PDB C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\carCounter.obj C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\main.obj -C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\motion_tracker.obj +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\runWrapper.obj C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\sqlite3.obj C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\cl.command.1.tlog C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\CL.read.1.tlog @@ -16,6 +18,8 @@ C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link-rc.write.1.tlog C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link.command.1.tlog C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link.read.1.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link.read.2.tlog +C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link.read.3.tlog C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\link.write.1.tlog C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\Release\vc110.pdb C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Release\CarDetect.pdb diff --git a/Release/CarDetect.log b/Release/CarDetect.log index f55bade..a23e70c 100644 --- a/Release/CarDetect.log +++ b/Release/CarDetect.log @@ -1,86 +1,23 @@ -Build started 3/13/2015 3:59:39 PM. +Build started 5/14/2015 4:50:42 PM. 1>Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" on node 2 (Build target(s)). 1>ClCompile: - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /IC:\Users\Vanya\Documents\Work\opencv\buildv4\install\include /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt carCounter.cpp - carCounter.cpp - 1>carCounter.cpp(56): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(59): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdlib.h(909) : see declaration of 'itoa' - 1>carCounter.cpp(62): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdlib.h(909) : see declaration of 'itoa' - 1>carCounter.cpp(65): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(110) : see declaration of 'strcpy' - 1>carCounter.cpp(66): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(67): warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\stdlib.h(909) : see declaration of 'itoa' - 1>carCounter.cpp(69): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(70): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(72): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(73): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(78): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(110) : see declaration of 'strcpy' - 1>carCounter.cpp(79): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(80): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(85): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(110) : see declaration of 'strcpy' - 1>carCounter.cpp(86): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(87): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(88): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(89): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(90): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(91): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(92): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(93): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(94): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(95): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(182) : see declaration of 'strncat' - 1>carCounter.cpp(130): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(174): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(176): error C2065: 'val' : undeclared identifier - 1>carCounter.cpp(224): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(225): error C2065: 'val' : undeclared identifier - 1>carCounter.cpp(228): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(256): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(259): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(296): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(343): warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data - 1>carCounter.cpp(379): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(385): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(392): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data - 1>carCounter.cpp(392): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(398): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(405): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data - 1>carCounter.cpp(405): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(412): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(419): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(424): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(434): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(436): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(451): warning C4018: '>' : signed/unsigned mismatch - 1>carCounter.cpp(453): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(470): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(473): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(476): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(478): warning C4018: '<' : signed/unsigned mismatch - 1>carCounter.cpp(480): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data - 1>carCounter.cpp(597): warning C4018: '<' : signed/unsigned mismatch - 1>Done Building Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" (Build target(s)) -- FAILED. + C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /IC:\Users\Vanya\Documents\Work\opencv\buildv4\install\include /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt runWrapper.cpp + runWrapper.cpp + Link: + C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Release\CarDetect.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\lib\Release /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\bin\Release /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\install\x86\vc11\bin /LIBPATH:C:\Users\Vanya\Documents\Work\opencv\buildv4\install\x86\vc11\lib opencv_calib3d249.lib opencv_contrib249.lib opencv_core249.lib opencv_features2d249.lib opencv_flann249.lib opencv_gpu249.lib opencv_highgui249.lib opencv_imgproc249.lib opencv_legacy249.lib opencv_ml249.lib opencv_nonfree249.lib opencv_objdetect249.lib opencv_ocl249.lib opencv_photo249.lib opencv_stitching249.lib opencv_superres249.lib opencv_ts249.lib opencv_video249.lib opencv_videostab249.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Release\CarDetect.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Release\CarDetect.lib" /MACHINE:X86 /SAFESEH Release\AdaptiveMedianBGS.obj + Release\carCounter.obj + Release\DPAdaptiveMedianBGS.obj + Release\FrameDifferenceBGS.obj + Release\Image.obj + Release\main.obj + Release\runWrapper.obj + Release\sqlite3.obj + Generating code + 1>c:\users\vanya\documents\visual studio 2012\projects\cardetect\cardetect\runwrapper.cpp(775): warning C4715: 'runWrapper' : not all control paths return a value + Finished generating code + CarDetect.vcxproj -> C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\Release\CarDetect.exe + 1>Done Building Project "C:\Users\Vanya\Documents\Visual Studio 2012\Projects\CarDetect\CarDetect\CarDetect.vcxproj" (Build target(s)). -Build FAILED. +Build succeeded. -Time Elapsed 00:00:01.16 +Time Elapsed 00:00:07.88 diff --git a/Release/CarDetect.unsuccessfulbuild b/Release/CarDetect.unsuccessfulbuild deleted file mode 100644 index e69de29..0000000 diff --git a/Release/carCounter.obj b/Release/carCounter.obj index 0c309c2..e5d611b 100644 Binary files a/Release/carCounter.obj and b/Release/carCounter.obj differ diff --git a/Release/cl.command.1.tlog b/Release/cl.command.1.tlog index b3a6e11..95e6b74 100644 Binary files a/Release/cl.command.1.tlog and b/Release/cl.command.1.tlog differ diff --git a/Release/link.command.1.tlog b/Release/link.command.1.tlog index 7fe7c5f..bc8f519 100644 Binary files a/Release/link.command.1.tlog and b/Release/link.command.1.tlog differ diff --git a/Release/link.read.1.tlog b/Release/link.read.1.tlog index c3c6242..2918ea7 100644 Binary files a/Release/link.read.1.tlog and b/Release/link.read.1.tlog differ diff --git a/Debug/link.12832-cvtres.read.1.tlog b/Release/link.read.2.tlog similarity index 100% rename from Debug/link.12832-cvtres.read.1.tlog rename to Release/link.read.2.tlog diff --git a/Release/link.write.1.tlog b/Release/link.write.1.tlog index 69cbae9..f3731ec 100644 Binary files a/Release/link.write.1.tlog and b/Release/link.write.1.tlog differ diff --git a/Release/main.obj b/Release/main.obj index 9d3b54f..995078f 100644 Binary files a/Release/main.obj and b/Release/main.obj differ diff --git a/Release/run.obj b/Release/run.obj deleted file mode 100644 index 8534fbf..0000000 Binary files a/Release/run.obj and /dev/null differ diff --git a/Release/runWrapper.obj b/Release/runWrapper.obj index 781bafb..9f3e93f 100644 Binary files a/Release/runWrapper.obj and b/Release/runWrapper.obj differ diff --git a/Release/run_wrapper.obj b/Release/run_wrapper.obj deleted file mode 100644 index 1ac5ee5..0000000 Binary files a/Release/run_wrapper.obj and /dev/null differ diff --git a/Release/sqlite3.obj b/Release/sqlite3.obj index 4ff26a9..afa9db7 100644 Binary files a/Release/sqlite3.obj and b/Release/sqlite3.obj differ diff --git a/Release/vc110.pdb b/Release/vc110.pdb index 2ef8271..be449d4 100644 Binary files a/Release/vc110.pdb and b/Release/vc110.pdb differ diff --git a/Thumbs.db b/Thumbs.db index eec7467..5082f67 100644 Binary files a/Thumbs.db and b/Thumbs.db differ diff --git a/car/Thumbs.db b/car/Thumbs.db deleted file mode 100644 index 68b43c4..0000000 Binary files a/car/Thumbs.db and /dev/null differ diff --git a/carCounter.cpp b/carCounter.cpp index 791ac7d..db54cac 100644 --- a/carCounter.cpp +++ b/carCounter.cpp @@ -14,88 +14,286 @@ static int callback(void *NotUsed, int argc, char **argv, char **azColName){ // PRIVATE METHODS -void carCounter::openDB(){ +void carCounter::openDB(int expID,char dataBase[200]){ + char * sql; + sql = new char[200]; + + char * num; + num = new char[15]; + + char * params; + params = new char[500]; + + char *zErrMsg = 0; /* Open database */ - rc = sqlite3_open("car_count_db", &db); + rc = sqlite3_open(dataBase, &db); if( rc ){ fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db)); exit(0); }else{ fprintf(stderr, "Opened database successfully\n"); } + + /* Create table if it doesn't exist. */ + strcpy (sql,"CREATE TABLE IF NOT EXISTS CarTable_exp"); + params = "(Video TEXT NOT NULL," \ + "Date TEXT NOT NULL," \ + "SecInVid TEXT NOT NULL," \ + "ExpID INTEGER NOT NULL," \ + "CarID INTEGER NOT NULL," \ + "Count TEXT NOT NULL," \ + "Frames TEXT NOT NULL," \ + "ULX TEXT NOT NULL,"\ + "ULY TEXT NOT NULL,"\ + "LRX TEXT NOT NULL,"\ + "LRY TEXT NOT NULL,"\ + "Area TEXT NOT NULL,"\ + "Path TEXT NOT NULL);"; + + itoa(expID,num,10); + strncat (sql,num,15); + strncat (sql,params,500); + + /* Execute SQL statement */ + bool continueTrying = true; + while(continueTrying){ + rc = sqlite3_exec(db, sql, callback, 0, &zErrMsg); + switch(rc){ + case SQLITE_BUSY: + sqlite3_sleep(10); + break; + case SQLITE_OK: + continueTrying = false; + break; + } + } + rc = sqlite3_exec(db, sql, callback, 0, &zErrMsg); + if( rc != SQLITE_OK ){ + fprintf(stderr, "SQL error: %s\n", zErrMsg); + sqlite3_free(zErrMsg); + }else{ + fprintf(stdout, "Table created successfully\n"); + } } void carCounter::closeDB(){ sqlite3_close(db); } -void carCounter::exportCarsToDB(int expID, std::deque &carArchive) { +void carCounter::exportCarsToDB(int expID,char fileName[100],char saveImgTo[200],std::deque &carArchive,int fps) { int index = 0; char *zErrMsg = 0; char * sql; - sql = new char[5000]; + sql = new char[10000]; + + char * value0; + value0 = new char[100]; char * value1; - value1 = new char[15]; + value1 = new char[100]; char * value2; value2 = new char[15]; char * value3; - value3 = new char[1000]; + value3 = new char[15]; char * value4; - value4 = new char[4]; + value4 = new char[15]; + + char * value5; + value5 = new char[15]; + + char * value6; + value6 = new char[1000]; + + char * value7; + value7 = new char[1000]; + + char * value8; + value8 = new char[1000]; + + char * value9; + value9 = new char[1000]; + + char * value10; + value10 = new char[1000]; + + char * value11; + value11 = new char[1000]; + + char * value12; + value12 = new char[1000]; char * temp; temp = new char[15]; + // File path + strcpy (value0,"'"); + strncat (value0,fileName,100); + strncat (value0,"'",1); + + // Time and Date + time_t now = time(0); + tm* localtm = localtime(&now); + tm* gmtm = gmtime(&now); + strcpy (value1,"'"); + strncat (value1,asctime(gmtm),100); + strncat (value1,"'",1); + while(true){ while(index < carArchive.size()){ - + // Archive Last Frame Time + int last_frame = carArchive[index].frames[carArchive[index].frames.size()-1]; + double secsInVideo = (double) (last_frame)/(double) (fps); + sprintf(value2, "%f", secsInVideo); + // Expirement Id - itoa (expID,value1,10); + itoa (expID,value3,10); // Archive Car Id - itoa (carArchive[index].id,value2,10); + itoa (carArchive[index].id,value4,10); + // Archive Car Count + itoa (carArchive[index].count,value5,10); + // Archive Frames - strcpy (value3,"'"); - for(int i=0; i < carArchive[index].frames.size(); i++){ + strcpy (value6,"'"); + for(int i=1; i < carArchive[index].frames.size(); i++){ itoa (carArchive[index].frames[i],temp,10); if(i != carArchive[index].frames.size()-1){ strncat (temp," ",1); - strncat (value3,temp,15); + strncat (value6,temp,15); + } else { + strncat (temp,"'",1); + strncat(value6,temp,15); + } + } + + // Archive ulX + strcpy (value7,"'"); + for(int i=1; i < carArchive[index].ulx.size(); i++){ + itoa (carArchive[index].ulx[i],temp,10); + if(i != carArchive[index].ulx.size()-1){ + strncat (temp," ",1); + strncat (value7,temp,15); + } else { + strncat (temp,"'",1); + strncat(value7,temp,15); + } + } + + // Archive ulY + strcpy (value8,"'"); + for(int i=1; i < carArchive[index].uly.size(); i++){ + itoa (carArchive[index].uly[i],temp,10); + if(i != carArchive[index].uly.size()-1){ + strncat (temp," ",1); + strncat (value8,temp,15); + } else { + strncat (temp,"'",1); + strncat(value8,temp,15); + } + } + + // Archive lrX + strcpy (value9,"'"); + for(int i=1; i < carArchive[index].lrx.size(); i++){ + itoa (carArchive[index].lrx[i],temp,10); + if(i != carArchive[index].lrx.size()-1){ + strncat (temp," ",1); + strncat (value9,temp,15); + } else { + strncat (temp,"'",1); + strncat(value9,temp,15); + } + } + + // Archive lrY + strcpy (value10,"'"); + for(int i=1; i < carArchive[index].lry.size(); i++){ + itoa (carArchive[index].lry[i],temp,10); + if(i != carArchive[index].lry.size()-1){ + strncat (temp," ",1); + strncat (value10,temp,15); + } else { + strncat (temp,"'",1); + strncat(value10,temp,15); + } + } + + // Archive Area + strcpy (value11,"'"); + for(int i=1; i < carArchive[index].area.size(); i++){ + itoa (carArchive[index].area[i],temp,10); + if(i != carArchive[index].area.size()-1){ + strncat (temp," ",1); + strncat (value11,temp,15); } else { strncat (temp,"'",1); - strncat(value3,temp,15); + strncat(value11,temp,15); } } // Save image locally & save directory - strcpy (value4,"car/"); - strncat (value4,value2,15); - strncat (value4,".jpg",15); - String value4_S = String(value4); - imwrite(value4_S, carArchive[index].img ); + strcpy (value12,saveImgTo); + strncat (value12,"exp",15); + strncat (value12,value3,15); + strncat (value12,"_",15); + strncat (value12,"id",15); + strncat (value12,value4,15); + strncat (value12,".jpg",15); + String value12_S = String(value12); + imwrite(value12_S, carArchive[index].img ); /* Create SQL statement */ - strcpy(sql,"INSERT INTO CarTable (expID,CarID,Frames,Path) VALUES ("); - strncat(sql,value1,15); + strcpy(sql,"INSERT INTO CarTable_exp"); + strncat(sql,value3,15); + strncat(sql,"(Video,Date,SecInVid,expID,CarID,Count,Frames,ULX,ULY,LRX,LRY,Area,Path) VALUES (",100); + strncat(sql,value0,100); + strncat(sql,",",1); + strncat(sql,value1,100); strncat(sql,",",1); strncat(sql,value2,15); strncat(sql,",",1); - strncat(sql,value3,1000); + strncat(sql,value3,15); + strncat(sql,",",1); + strncat(sql,value4,15); + strncat(sql,",",1); + strncat(sql,value5,15); + strncat(sql,",",1); + strncat(sql,value6,1000); + strncat(sql,",",1); + strncat(sql,value7,1000); + strncat(sql,",",1); + strncat(sql,value8,1000); + strncat(sql,",",1); + strncat(sql,value9,1000); + strncat(sql,",",1); + strncat(sql,value10,1000); + strncat(sql,",",1); + strncat(sql,value11,1000); strncat(sql,",",1); strncat(sql,"'",1); - strncat(sql,value4,100); + strncat(sql,value12,100); strncat(sql,"'",1); strncat(sql,");",3); /* Execute SQL statement */ - rc = sqlite3_exec(db, sql, callback, 0, &zErrMsg); + bool continueTrying = true; + while(continueTrying){ + rc = sqlite3_exec(db, sql, callback, 0, &zErrMsg); + switch(rc){ + case SQLITE_BUSY: + sqlite3_sleep(10); + break; + case SQLITE_OK: + continueTrying = false; + break; + } + } if( rc != SQLITE_OK ){ fprintf(stderr, "SQL error: %s\n",zErrMsg); sqlite3_free(zErrMsg); @@ -103,44 +301,116 @@ void carCounter::exportCarsToDB(int expID, std::deque &carArchive) { fprintf(stdout, "Records created successfully\n"); fprintf(stdout, "----------------------------\n"); fprintf(stdout, "Record idx:%d\n",index); - fprintf(stdout, "Record CID:%s\n",value2); - fprintf(stdout, "Record frames:%s\n",value3); - fprintf(stdout, "Path of image:%s\n",value4); + fprintf(stdout, "Record Video:%s\n",value0); + fprintf(stdout, "Record Video Date:%s\n",value1); + fprintf(stdout, "Record Seconds into Video:%s\n",value2); + fprintf(stdout, "Record EID:%s\n",value3); + fprintf(stdout, "Record CID:%s\n",value4); + fprintf(stdout, "Record count:%s\n",value5); + fprintf(stdout, "Record frames:%s\n",value6); + fprintf(stdout, "Record ULX:%s\n",value7); + fprintf(stdout, "Record ULY:%s\n",value8); + fprintf(stdout, "Record LRX:%s\n",value9); + fprintf(stdout, "Record LRY:%s\n",value10); + fprintf(stdout, "Record Area:%s\n",value11); + fprintf(stdout, "Path of image:%s\n",value12); } index++; } } +} -// delete[] sql; -// delete[] temp; -// delete[] value1; -// delete[] value2; -// delete[] value3; -// delete[] value4; +void carCounter::detectCarBoxForNight(cv::Mat &subtract,cv::Rect &boundRect,int minObjectSize){ + cv::vector> endRegionContours; + cv::vector endRegionHierarchy; + + findContours(subtract, endRegionContours, endRegionHierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE, cv::Point(0, 0)); + cv::vector> endRegionContoursPoly(endRegionContours.size()); + cv::vector endRegionboundRect(endRegionContours.size()); + cv::vector endRegionCenter(endRegionContours.size()); + cv::vector endRegionRadius(endRegionContours.size()); + int j = obtainBoundBoxes(endRegionContours,endRegionContoursPoly,endRegionboundRect,endRegionCenter,endRegionRadius,2000); + int xUL = std::numeric_limits::max(); + int yUL = std::numeric_limits::max(); + int xLR = 0; + int yLR = 0; + for( int i = 0; i xLR) + xLR = endRegionboundRect[i].x +endRegionboundRect[i].width; + if(endRegionboundRect[i].y+endRegionboundRect[i].height > yLR) + yLR = endRegionboundRect[i].y+endRegionboundRect[i].height; + } + + boundRect = Rect(cv::Point(xUL,yUL),cv::Point(xLR,yLR)); +/* test code + cv::rectangle(frame,cv::Point(xUL,yUL),cv::Point(xLR,yLR),CV_RGB(255,0,255),2,8,0); + for( int i = 0; i> &contours, - cv::vector> &contours_poly, - cv::vector &boundRect, - cv::vector ¢er, - cv::vector &radius, int minObjectSize) -{ - int j = 0; +void carCounter::removeShadow(cv::Mat &subtract,cv::Mat3b &subtractrgb){ + subtractrgb = subtract; + for (Mat3b::iterator it =subtractrgb.begin(); it != subtractrgb.end(); it++) { + if(*it != Vec3b(255, 255, 255)) { + *it = Vec3b(0, 0, 0); + } + } +} + +void carCounter::cleanNoise(cv::Mat &mask, cv::Mat &extraMask,cv::Mat3b &maskrgb, cv::Mat3b &extraMaskrgb){ + cv::erode(mask,mask,cv::Mat(),Point(-1, -1), 1, 1, 1); + cv::dilate(mask,mask,cv::Mat(),Point(-1, -1), 3, 1, 1); + cv::medianBlur(mask,mask,21); + removeShadow(mask,maskrgb); + + cv::resize(maskrgb, maskrgb, cv::Size(frame.size().width, frame.size().height)); + cv::cvtColor(maskrgb,mask,CV_RGB2GRAY); + + if(extraMask.dims > 0){ + cv::erode(extraMask,extraMask,cv::Mat(),Point(-1, -1), 1, 1, 1); + cv::dilate(extraMask,extraMask,cv::Mat(),Point(-1, -1), 3, 1, 1); + cv::medianBlur(extraMask,extraMask,21); + removeShadow(extraMask,extraMaskrgb); + + cv::resize(extraMaskrgb, extraMaskrgb, cv::Size(frame.size().width, frame.size().height)); + cv::cvtColor(extraMaskrgb,extraMask,CV_RGB2GRAY); + } +} - for(int i = 0; i < contours.size(); i++) - { +int carCounter::obtainBoundBoxes(cv::vector> &contours,cv::vector> &contours_poly, + cv::vector &boundRect, + cv::vector ¢er,cv::vector &radius, int minObjectSize){ + int j = 0; + for(int i = 0; i < contours.size(); i++){ approxPolyDP(cv::Mat(contours[i]), contours_poly[i], 3, true); cv::minEnclosingCircle((Mat)contours_poly[i], center[j], radius[j]); - - if(cv::boundingRect(cv::Mat(contours_poly[i])).area() > minObjectSize) - { + if(cv::boundingRect(cv::Mat(contours_poly[i])).area() > minObjectSize){ boundRect[j] = cv::boundingRect(cv::Mat(contours_poly[i])); contours[j] = contours[i]; cv::minEnclosingCircle((Mat)contours_poly[i], center[j], radius[j]); j++; } } + return j; +} +void carCounter::createFrame(Frame &data, cv::vector> &contours, + cv::vector> &contours_poly, + cv::vector &boundRect, + cv::vector ¢er, + cv::vector &radius, int minObjectSize){ + + int j = obtainBoundBoxes(contours,contours_poly,boundRect,center,radius,minObjectSize); + contours.resize(j); boundRect.resize(j); center.resize(j); @@ -163,28 +433,121 @@ void carCounter::createFrame(Frame &data, cv::vector> &con data.distanceY = std::vector(j); data.time = std::vector(j); data.id = std::vector(j); + data.tIdx = std::vector(j); data.p = std::vector(j); + data.checked = std::vector(j); data.pTraj = std::vector>(j); } +vector carCounter::calcHistogram(Mat& img,Mat& mask){ + int bins = 256; // number of bins + int nc = img.channels(); // number of channels + + vector hist(nc); // histogram arrays + + // Initalize histogram arrays + for (int i = 0; i < hist.size(); i++) + hist[i] = Mat::zeros(1, bins, CV_32SC1); + + // Calculate the histogram of the image + for (int i = 0; i < img.rows; i++){ + for (int j = 0; j < img.cols; j++){ + for (int k = 0; k < nc; k++){ + if(mask.at(i,j) == Vec3b(255, 255, 255)){ + uchar val = nc == 1 ? img.at(i,j) : img.at(i,j)[k]; + if(val != 0) + hist[k].at(val) += 1; + } + } + } + } + + // For each histogram arrays, obtain the maximum (peak) value + // Needed to normalize the display later + int hmax[3] = {0,0,0}; + for (int i = 0; i < nc; i++){ + for (int j = 0; j < bins-1; j++) + hmax[i] = hist[i].at(j) > hmax[i] ? hist[i].at(j) : hmax[i]; + } + + const char* wname[3] = { "blue", "green", "red" }; + Scalar colors[3] = { Scalar(255,0,0), Scalar(0,255,0), Scalar(0,0,255) }; + + vector canvas(nc); + return hist; +} + +double carCounter::findStd(vector &hist, int channel){ + int bins = 255; + double total = 0; + double avg = 0; + double var = 0; + double deviation = 0; + for(int i = 0; i < bins-1; i++){ + total=total+hist[channel].at(i); + } + + for(int i = 0; i < bins-1; i++){ + avg=avg+(hist[channel].at(i)/total)*i; + } + + for(int i = 0; i < bins-1; i++){ + var=var+(hist[channel].at(i)/total)*pow((i-avg),2.0); + } + + deviation = pow(var,0.5); + return deviation; +} + +double carCounter::histogramCalcAndFindStd(cv::Mat &frame,cv::Mat &background,cv::Mat& subtract,std::deque &buffer, int boundBoxNum){ + + cv::Mat croppedFrame; + cv::Mat croppedSubtract; + cv::Mat croppedBackground; + cv::Mat croppedDifference; + + frame(buffer[0].boundRect[boundBoxNum]).copyTo(croppedFrame); + background(buffer[0].boundRect[boundBoxNum]).copyTo(croppedBackground); + subtract(buffer[0].boundRect[boundBoxNum]).copyTo(croppedSubtract); + + croppedDifference = croppedFrame - croppedBackground; + + vector hist = calcHistogram(croppedDifference,croppedSubtract); + + double std = findStd(hist,0); + + return std; +} + +bool carCounter::safetyChecks(cv::Mat &frame,cv::Mat &background,cv::Mat &subtract,std::deque &buffer,int boundBoxNum, double thresh){ + double std = histogramCalcAndFindStd(frame,background,subtract,buffer,boundBoxNum); + if (std < thresh && !nightTime) + return false; + else + return true; +} // region monitor functions -void carCounter::startRegionMonitor(std::deque &buffer,std::deque &transit, - cv::vector startRegion){ +void carCounter::startRegionMonitor(cv::Mat &frame, cv::Mat &background, cv::Mat &subtract, + std::deque &buffer,std::deque &transit, + cv::vector startRegion,int horizontalBandWidth){ + std::deque temp; for(int i = 0; i < buffer[0].p.size(); i++){ - if(buffer[0].p[i] != true - && pointPolygonTest(startRegion, buffer[0].center[i], false) == 1 && val < .75){ + bool safetyPass = safetyChecks(frame,background,subtract,buffer,i,10); + if(pointPolygonTest(startRegion, buffer[0].center[i], false) == 1 + && safetyPass == true){ - buffer[0].start_loc[i] = buffer[0].center[i]; - buffer[0].id[i] = object_counter+1; - buffer[0].time[i] = 0; - object_counter++; + if(!buffer[0].checked[i]){ + buffer[0].start_loc[i] = buffer[0].center[i]; + buffer[0].time[i] = 0; + } Object obj; - obj.miss = false; obj.last_seen = frame_counter; obj.id = buffer[0].id[i]; + obj.tIdx = buffer[0].tIdx[i]; + obj.checked = buffer[0].checked[i]; obj.start_loc = buffer[0].center[i]; obj.center_when_last_seen = buffer[0].center[i]; obj.velocity_when_last_seen = buffer[0].velocity[i]; @@ -208,41 +571,152 @@ void carCounter::startRegionMonitor(std::deque &buffer,std::deque aVector.push_back(obj.start_loc); obj.trajectories_before_disappearing.push_back(aVector); - obj.area.push_back(buffer[0].boundRect[i].area()); obj.trajectory.push_back(buffer[0].center[i]); obj.frames.push_back(frame_counter); + obj.bIdx = i; - transit.push_front(obj); + temp.push_front(obj); + } + } + if(nightTime){ + for(int x = temp.size()-1; x > -1; x--){ + for(int y = temp.size()-1; y > -1; y--){ + if(x != y && + temp.at(x).center_when_last_seen.y < temp.at(y).center_when_last_seen.y+horizontalBandWidth && + temp.at(x).center_when_last_seen.y > temp.at(y).center_when_last_seen.y-horizontalBandWidth && + !temp.at(x).checked){ + if(temp.at(y).checked && !temp.at(y).hasSibling){ + + temp.at(x).checked = true; + temp.at(x).headlight = true; + temp.at(x).hasSibling = true; + temp.at(x).siblingID = temp.at(y).id; + temp.at(x).id = object_counter+1; + + buffer[0].id[temp.at(x).bIdx] = temp.at(x).id; + buffer[0].checked[temp.at(x).bIdx] = temp.at(x).checked; + transit.push_front(temp.at(x)); + + for(int i = 0; i < transit.size(); i++) + transit[i].tIdx = i; + + temp.at(y).hasSibling = true; + temp.at(y).siblingID = temp.at(x).id; + + transit[temp.at(y).tIdx+1].hasSibling = temp.at(y).hasSibling; + transit[temp.at(y).tIdx+1].siblingID = temp.at(y).siblingID; + + object_counter++; + + } else if(!temp.at(y).checked && !temp.at(y).hasSibling) { + temp.at(x).checked = true; + temp.at(x).headlight = true; + temp.at(x).hasSibling = true; + temp.at(x).id = object_counter+1; + buffer[0].id[temp.at(x).bIdx] = temp.at(x).id; + buffer[0].checked[temp.at(x).bIdx] = temp.at(x).checked; + object_counter++; + + temp.at(y).checked = true; + temp.at(y).headlight = true; + temp.at(y).hasSibling = true; + temp.at(y).id = object_counter+1; + buffer[0].id[temp.at(y).bIdx] = temp.at(y).id; + buffer[0].checked[temp.at(x).bIdx] = temp.at(x).checked; + object_counter++; + + temp.at(x).siblingID = temp.at(y).id; + temp.at(y).siblingID = temp.at(x).id; + + transit.push_front(temp.at(x)); + transit.push_front(temp.at(y)); + + for(int i = 0; i < transit.size(); i++) + transit[i].tIdx = i; + } + } + } + if(!temp.at(x).checked){ + temp.at(x).checked = true; + temp.at(x).headlight = true; + temp.at(x).hasSibling = false; + temp.at(x).id = object_counter+1; + + buffer[0].id[temp.at(x).bIdx] = temp.at(x).id; + buffer[0].checked[temp.at(x).bIdx] = temp.at(x).checked; + transit.push_front(temp.at(x)); + for(int i = 0; i < transit.size(); i++) + transit[i].tIdx = i; + + object_counter++; + } + } + } else { + for(int x = temp.size()-1; x > -1; x--){ + if(!temp.at(x).checked){ + temp.at(x).checked = true; + temp.at(x).headlight = false; + temp.at(x).hasSibling = false; + temp.at(x).id = object_counter+1; + + buffer[0].id[temp.at(x).bIdx] = temp.at(x).id; + buffer[0].checked[temp.at(x).bIdx] = temp.at(x).checked; + transit.push_front(temp.at(x)); + for(int i = 0; i < transit.size(); i++) + transit[i].tIdx = i; + + object_counter++; + } } } } -void carCounter::endRegionMonitor(cv::Mat &frame,int &car_counter,std::deque &buffer,std::deque &transit, std::deque &carArchive, - cv::vector endRegion) -{ +void carCounter::endRegionMonitor(cv::Mat &frame,cv::Mat &background,cv::Mat &subtract,cv::Mat &subtract2, int minObjectSize, + int &car_counter, + std::deque &buffer,std::deque &transit, std::deque &carArchive, + cv::vector endRegion){ + for(int i = 0; i < buffer[0].center.size(); i++){ - if(pointPolygonTest(endRegion, buffer[0].center[i], false) == 1 && val < .75) - { + bool safetyPass = safetyChecks(frame,background,subtract,buffer, i,10); + if(pointPolygonTest(endRegion, buffer[0].center[i], false) == 1 && safetyPass == true){ + int sib = NULL; bool found = false; for(int j = 0; j < transit.size(); j++){ if(buffer[0].id[i] == transit[j].id){ found = true; + if(nightTime && transit[j].hasSibling) + sib = transit[j].siblingID; } } if(found == true){ - while(buffer[0].id[i] != transit[transit.size()-1].id){ + while(buffer[0].id[i] != transit[transit.size()-1].id) transit.pop_back(); - } + if(buffer[0].id[i] == transit[transit.size()-1].id){ - - cv::Mat croppedBox; - frame(buffer[0].boundRect[i]).copyTo(croppedBox); - transit[transit.size()-1].img = croppedBox; - - carArchive.push_back(transit[transit.size()-1]); - transit.pop_back(); car_counter++; + if(!nightTime){ + cv::Mat croppedBox; + frame(buffer[0].boundRect[i]).copyTo(croppedBox); + transit[transit.size()-1].img = croppedBox; + transit[transit.size()-1].count = car_counter; + carArchive.push_back(transit[transit.size()-1]); + } else { + detectCarBoxForNight(subtract2,buffer[0].boundRect[i],minObjectSize); + cv::Mat croppedBox; + frame(buffer[0].boundRect[i]).copyTo(croppedBox); + transit[transit.size()-1].img = croppedBox; + transit[transit.size()-1].count = car_counter; + carArchive.push_back(transit[transit.size()-1]); + } + transit.pop_back(); + } + if(nightTime && sib != NULL){ + while(sib != transit[transit.size()-1].id && transit.size() != 0) + transit.pop_back(); + + if(sib == transit[transit.size()-1].id) + transit.pop_back(); } } } @@ -250,8 +724,7 @@ void carCounter::endRegionMonitor(cv::Mat &frame,int &car_counter,std::deque &buffer,std::deque &transit) -{ +void carCounter::checkMissing(int &frame_counter,std::deque &buffer,std::deque &transit){ // Keep track of missing objects currently in transit. for(int i = 0; i < transit.size(); i++) { @@ -279,51 +752,51 @@ void carCounter::checkMissing(int &frame_counter,std::deque &buffer,std:: transit[i].area.push_back(buffer[0].boundRect[j].area()); transit[i].trajectory.push_back(buffer[0].center[i]); transit[i].frames.push_back(frame_counter); + transit[i].ulx.push_back(buffer[0].boundRect[j].x); + transit[i].uly.push_back(buffer[0].boundRect[j].y); + transit[i].lrx.push_back(buffer[0].boundRect[j].x+buffer[0].boundRect[j].width); + transit[i].lry.push_back(buffer[0].boundRect[j].y+buffer[0].boundRect[j].height); break; } } - if(found == false){ + if(!found){ transit[i].miss = true; } } } -// Persistency checking using Transit Ledger - -void carCounter::checkTransitLedgerUsingMomentAndCenter(cv::Mat &frame, int &car_counter, int &frame_counter, int &object_counter,std::deque &buffer,std::deque &transit, - cv::vector startRegion) +// Persistency checking using Transit Ledger. +void carCounter::checkTransitLedgerUsingMomentAndCenter(int &frame_counter,std::deque &buffer,std::deque &transit, int expectedDist) { - for(int i = 0; i < buffer[0].boundRect.size(); i++) - { - if(buffer[0].p[i] != true) - { - for(int j = transit.size()-1; j >= 0 ;j--) - { - if(matchShapes(buffer[0].contour[i], transit[j].contour_before_disappearing,CV_CONTOURS_MATCH_I2,0)) - { - for(int t = transit[j].trajectories_before_disappearing.size()-1; t >= 0; t--) - { - for(int m = transit[j].trajectories_before_disappearing[t].size()-1; m >= 0; m--) - { - if(((buffer[0].center[i].x > transit[j].trajectories_before_disappearing[t].at(m).x-15) && (transit[j].trajectories_before_disappearing[t].at(m).x+15 > buffer[0].center[i].x)) - && ((buffer[0].center[i].y > transit[j].trajectories_before_disappearing[t].at(m).y-15) && (transit[j].trajectories_before_disappearing[t].at(m).y+15 > buffer[0].center[i].y))) - { + for(int i = 0; i < buffer[0].boundRect.size(); i++){ + if(buffer[0].p[i] != true){ + /* The loop below this comment is what controls how we examine the transit ledger. + We can either search front to end or end to front.*/ + for(int j = transit.size()-1; j > -1; j--){ + /* For Future: Matching is currently disabled. Need to figure out how to choose threshold for similarity. + Another direction to consider is matching over RGB image rather than contour. cv::MatchShape(...) > ???value???*/ + if(cv::matchShapes(buffer[0].contour[i], transit[j].contour_before_disappearing,CV_CONTOURS_MATCH_I2,0) || nightTime){ + for(int t = transit[j].trajectories_before_disappearing.size()-1; t >= 0; t--){ + for(int m = transit[j].trajectories_before_disappearing[t].size()-1; m >= 0; m--){ + if(((buffer[0].center[i].x > transit[j].trajectories_before_disappearing[t].at(m).x-expectedDist) + && (transit[j].trajectories_before_disappearing[t].at(m).x+expectedDist > buffer[0].center[i].x)) + && ((buffer[0].center[i].y > transit[j].trajectories_before_disappearing[t].at(m).y-expectedDist) + && (transit[j].trajectories_before_disappearing[t].at(m).y+expectedDist > buffer[0].center[i].y))){ + buffer[0].start_loc[i] = transit[j].start_loc; buffer[0].id[i] = transit[j].id; int n_time = transit[j].time_when_last_seen + (frame_counter - transit[j].last_seen); buffer[0].time[i] = n_time; - //Instantanous Metrics - + // Instantanous Metrics buffer[0].velocity[i] = sqrt(pow(buffer[0].center[i].x - transit[j].center_when_last_seen.x,2.0) + pow(buffer[0].center[i].y - transit[j].center_when_last_seen.y,2.0))/(frame_counter - transit[j].last_seen); buffer[0].velocityX[i] = (buffer[0].center[i].x - transit[j].center_when_last_seen.x)/(frame_counter - transit[j].last_seen); buffer[0].velocityY[i] = (buffer[0].center[i].y - transit[j].center_when_last_seen.y)/(frame_counter - transit[j].last_seen); - //Average Metrics - + // Average Metrics buffer[0].distance[i] = sqrt(pow(buffer[0].center[i].x - transit[j].start_loc.x,2.0) + pow(buffer[0].center[i].y - transit[j].start_loc.y,2.0)); @@ -334,11 +807,17 @@ void carCounter::checkTransitLedgerUsingMomentAndCenter(cv::Mat &frame, int &car buffer[0].speedX[i] = buffer[0].distanceX[i]/buffer[0].time[i]; buffer[0].speedY[i] = buffer[0].distanceY[i]/buffer[0].time[i]; + // Transit Ledger index + buffer[0].tIdx[i] = transit[j].tIdx; + + // Checked Flag + buffer[0].checked[i] = transit[j].checked; + // Presistance Flag buffer[0].p[i] = true; int k = 0; - // fill predicted trajectory vector + // Fill predicted trajectory vector while(k < 30) { Point2f fp(buffer[0].center[i].x+(buffer[0].speedX[i])*k, buffer[0].center[i].y+(buffer[0].speedY[i])*k); buffer[0].pTraj[i].push_back(fp); @@ -359,27 +838,40 @@ void carCounter::checkTransitLedgerUsingMomentAndCenter(cv::Mat &frame, int &car } -void carCounter::persistenceCheck(cv::Mat &frame, int &car_counter, int &frame_counter, int &object_counter,int type,std::deque &buffer, std::deque &transit, - cv::vector startRegion){ +void carCounter::persistenceCheck(int &frame_counter,int type,std::deque &buffer, std::deque &transit,int expectedDist){ if(type == 0) - checkTransitLedgerUsingMomentAndCenter(frame, car_counter,frame_counter,object_counter,buffer,transit,startRegion); + checkTransitLedgerUsingMomentAndCenter(frame_counter,buffer,transit,expectedDist); else assert(type < 1 && type >= 0); - // Additional methods or combination of methods can be added as extra types. + // Additional methods or combination of methods can be used to check for persistence between frames. +} + +void carCounter::selectBackgroundSubtraction(bool useMOG2, bool nightTime, + cv::Mat &resizeF,cv::Mat &mask, + int nmixtures, double backgroundratio, bool detectShadows){ + if(!useMOG2 && !nightTime){ + bgsAdaptiveMedian->process(resizeF, mask, background); + }else if(useMOG2 && !nightTime){ + MOG2.set("nmixtures", nmixtures); + MOG2.set("backgroundRatio", backgroundratio); + MOG2.set("detectShadows", detectShadows); + MOG2(resizeF, mask,.005); + MOG2.getBackgroundImage(background); + }else{ + // Nighttime case, switch to Frame Difference. + bgsFrameDifference->process(resizeF, mask, background); + } } void carCounter::drawResult(int &car_counter, int &object_counter, cv::Mat &frame, cv::vector &hierarchy, std::deque &buffer,std::deque &transit, bool showLastCar, bool boundBoxesOn, bool predictionOn, bool latestPathsOn, bool displayTransitLedger, bool displayFocusRegions, int showPathofId, cv::vector startRegion,cv::vector endRegion) { - if(boundBoxesOn == true) - { - // Draw polygonal contour + bonding rects. - for( int i = 0; i 0) - { + // draw bounding boxes. + if(boundBoxesOn){ + for( int i = 0; i 0){ cv::Scalar color = cv::Scalar(255,0,0); cv::rectangle(frame,buffer[0].boundRect[i].tl(),buffer[0].boundRect[i].br(),color,2,8,0); cv::putText(frame, std::to_string(i), cv::Point(buffer[0].boundRect[i].x,buffer[0].boundRect[i].y), FONT_HERSHEY_PLAIN, 1.0, CV_RGB(0,255,0), 2.0); @@ -390,9 +882,7 @@ void carCounter::drawResult(int &car_counter, int &object_counter, cv::Mat &fram "/c=("+std::to_string(buffer[0].start_loc[i].x)+ +","+std::to_string(buffer[0].start_loc[i].y)+")" ,cv::Point(buffer[0].center[i].x,buffer[0].center[i].y), FONT_HERSHEY_PLAIN, 1.0, CV_RGB(255,0,0), 2.0); - } - else - { + }else{ cv::Scalar color = cv::Scalar(255,0,255); cv::rectangle(frame,buffer[0].boundRect[i].tl(),buffer[0].boundRect[i].br(),color,2,8,0); cv::putText(frame, std::to_string(i), cv::Point(buffer[0].boundRect[i].x,buffer[0].boundRect[i].y), FONT_HERSHEY_PLAIN, 1.0, CV_RGB(0,255,0), 2.0); @@ -407,36 +897,26 @@ void carCounter::drawResult(int &car_counter, int &object_counter, cv::Mat &fram } } // draw predicted trajectory. - if(predictionOn == true) - { - for( int i = 0; i 0) - { + if(predictionOn){ + for( int i = 0; i 0){ cv::Scalar color = cv::Scalar(255,0,255); - if( buffer[0].pTraj[i].size() > 2) - { - for(int j = 0; j < buffer[0].pTraj[i].size()-1; j++) - { + if( buffer[0].pTraj[i].size() > 2){ + for(int j = 0; j < buffer[0].pTraj[i].size()-1; j++){ line(frame, buffer[0].pTraj[i].at(j), buffer[0].pTraj[i].at(j+1), color, 20, 8, 0); } } - for(int j = 0; j < buffer[0].pTraj[i].size(); j++) - { + for(int j = 0; j < buffer[0].pTraj[i].size(); j++){ circle(frame, buffer[0].pTraj[i].at(j), 1, cv::Scalar(255,255,255), 3, 8, 0); } } } } // draw recent trajectories. - if(latestPathsOn == true) - { - for(int i = 0; i 0) - { + if(latestPathsOn){ + for(int i = 0; i 0){ cv::Scalar color = cv::Scalar(255,0,0); circle(frame, buffer[i].center[j], 1, color, 3, 8, 0); } @@ -445,13 +925,10 @@ void carCounter::drawResult(int &car_counter, int &object_counter, cv::Mat &fram } // draw older trajectories from archive. - if(showPathofId >= 0) - { + if(showPathofId != SHOW_PATH_OF_CAR_X_OFF){ int display_path_of_id = showPathofId; - if(carArchive.size() > display_path_of_id) - { - for( int j = 0; j display_path_of_id){ + for( int j = 0; j learningTime) - { - + if(frame_counter > learningTime){ // OBJECT DETECTION - findContours(fgMaskMOG2, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0)); - + findContours(mask, contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE, cv::Point(0, 0)); + // Approximate contours to polygons + get bounding rects and circles. cv::vector> contours_poly(contours.size()); cv::vector boundRect(contours.size()); @@ -582,6 +1043,11 @@ void carCounter::run(int bufferSize, int minObjectSize, int skip, int learningTi cv::vector radius(contours.size()); Frame data; + int minObjectSize; + if(nightTime) + minObjectSize = minObjectSizeNight; + else + minObjectSize = minObjectSizeDay; // initialize the frame object data. carCounter::createFrame(data, contours, @@ -592,76 +1058,57 @@ void carCounter::run(int bufferSize, int minObjectSize, int skip, int learningTi // OBJECT TRACKING - // buffer frame data (last 30 frames are placed in a queue). + // buffer frame data (last X frames are placed in a queue). // buffer flood. - if(buffer.size() < bufferSize) - { + if(buffer.size() < bufferSize){ buffer.push_front(data); - // persistence checks only make sense if you have more than one frame. - if(buffer.size() > 1) - { - persistenceCheck(frame, car_counter,frame_counter,object_counter,0,buffer,transit, startRegion); - startRegionMonitor(buffer,transit,startRegion); - + if(buffer.size() > 1){ + persistenceCheck(frame_counter,0,buffer,transit,expectedDist); + startRegionMonitor(frame,background,maskrgb,buffer,transit,startRegion,horizontalBandWidth); checkMissing(frame_counter,buffer,transit); - - endRegionMonitor(frame,car_counter,buffer,transit,carArchive,endRegion); + endRegionMonitor(frame,background,maskrgb,extraMask,minObjectSizeDay,car_counter,buffer,transit,carArchive,endRegion); frameArchive.push_front(buffer[0]); } } // full buffer. - else - { + else{ buffer.push_front(data); buffer.pop_back(); - persistenceCheck(frame, car_counter,frame_counter,object_counter,0,buffer,transit,startRegion); - startRegionMonitor(buffer,transit,startRegion); - + persistenceCheck(frame_counter,0,buffer,transit,expectedDist); + startRegionMonitor(frame,background,maskrgb,buffer,transit,startRegion,horizontalBandWidth); checkMissing(frame_counter,buffer,transit); - - endRegionMonitor(frame,car_counter,buffer,transit,carArchive,endRegion); + endRegionMonitor(frame,background,maskrgb,extraMask,minObjectSizeDay,car_counter,buffer,transit,carArchive,endRegion); frameArchive.push_back(buffer[0]); } - // VISUALIZATION + // VISUALIZATION/CMD OUTPUT // if online mode is on a window is produced otherwise runs through console with no visualization. - if(online == true){ - // use background. - if(displayType == 0){ - eMOG2.set("history", 1000); - eMOG2.set("nmixtures", nmixtures); - eMOG2.set("backgroundRatio", backgroundratio); - eMOG2.set("detectShadows", false); - eMOG2(frame, efgMaskMOG2,.005); - eMOG2.getBackgroundImage(display); - } - - // use original frame. - else if(displayType == 1) - display = frame; + if(online){ + if(displayType == USE_BACKGROUND) + background.copyTo(display); - // use original frame and overlays. - else if(displayType == 2) - display = resizeF; + else if(displayType == USE_ORGINAL_FRAME) + frame.copyTo(display); - // subtracted. - else if(displayType == 3) - display = fgMaskMOG2; + else if(displayType == USE_RESIZED_WITH_OVERLAYS_FRAME) + resizeF.copyTo(display); + + else if(displayType == USE_SUBTRACTED) + maskrgb.copyTo(display); - drawResult(car_counter,object_counter,display,hierarchy,buffer,transit, showLastCar,boundBoxesOn, predictionOn, latestPathsOn, displayTransitLedger, displayFocusRegions, showPathofId, startRegion,endRegion); // display original with bounding boxes. - imshow("Display", display); - } else { - std::cout << car_counter << std::endl; + String s = "Display_"; + std::string r = s + std::to_string(id); + imshow(r, display); } } @@ -670,51 +1117,4 @@ void carCounter::run(int bufferSize, int minObjectSize, int skip, int learningTi } } closeDB(); -} - -/* HISTOGRAM COMPARISON - cv::Mat croppedFrame; - cv::Mat hsv_croppedFrame; - cv::Mat croppedBackground; - cv::Mat hsv_croppedBackground; - - frame(buffer[0].boundRect[i]).copyTo(croppedFrame); - background(buffer[0].boundRect[i]).copyTo(croppedBackground); - - cvtColor(croppedFrame,hsv_croppedFrame,CV_RGB2HSV); - cvtColor(croppedBackground,hsv_croppedBackground,CV_RGB2HSV); - - // Quantize the hue to 30 levels - // and the saturation to 32 levels - int hbins = 30, sbins = 32; - int histSize[] = {hbins, sbins}; - - // hue varies from 0 to 179, see cvtColor - float hranges[] = { 0, 180 }; - - // saturation varies from 0 (black-gray-white) to - // 255 (pure spectrum color) - float sranges[] = { 0, 256 }; - const float* ranges[] = { hranges, sranges }; - MatND hist_frame; - MatND hist_background; - - // we compute the histogram from the 0-th and 1-st channels - int channels[] = {0, 1, 2, 3}; - - calcHist( &hsv_croppedFrame, 1, channels, Mat(), // do not use mask - hist_frame, 2, histSize, ranges, - true, // the histogram is uniform - false ); - - normalize( hist_frame, hist_frame, 0, 1, NORM_MINMAX, -1, Mat() ); - - calcHist( &hsv_croppedBackground, 1, channels, Mat(), // do not use mask - hist_background, 2, histSize, ranges, - true, // the histogram is uniform - false ); - - normalize( hist_background, hist_background, 0, 1, NORM_MINMAX, -1, Mat() ); - - double val = compareHist( hist_frame, hist_background, CV_COMP_CORREL ); -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/carCounter.h b/carCounter.h index 75684ed..92b77a3 100644 --- a/carCounter.h +++ b/carCounter.h @@ -1,7 +1,40 @@ +#define USE_BACKGROUND 0 +#define USE_ORGINAL_FRAME 1 +#define USE_RESIZED_WITH_OVERLAYS_FRAME 2 +#define USE_SUBTRACTED 3 + +#define DETECT_SHADOWS_ON true +#define DETECT_SHADOWS_OFF false + +#define SHOW_LAST_CAR_ON true +#define SHOW_LAST_CAR_OFF false +#define SHOW_PREDICTION_ON true +#define SHOW_PREDICTION_OFF false +#define SHOW_LATEST_PATHS_ON true +#define SHOW_LATEST_PATHS_OFF false +#define SHOW_TRANSIT_LEDGER_ON true +#define SHOW_TRANSIT_LEDGER_OFF false +#define SHOW_BOUNDBOX_ON true +#define SHOW_BOUNDBOX_OFF false +#define SHOW_REGION_MONITORS_ON true +#define SHOW_REGION_MONITORS_OFF false + +#define SHOW_PATH_OF_CAR_X_OFF -1 + +#define RUN_ONLINE true +#define RUN_OFFLINE false + +#define USE_MOG2_ON true +#define USE_MOG2_OFF false + +#define _VARIADIC_MAX 10 + #ifndef CARCOUNTER_H #include #include +#include #include +#include #include #include @@ -11,9 +44,8 @@ #include #include "sqlite3.h" - - -#define PI 3.14159265358979323846 +#include "DPAdaptiveMedianBGS.h" +#include "FrameDifferenceBGS.h" /* Frame datatype */ /* Holistic reperesentation of all the objects captured in the given frame. */ @@ -41,7 +73,9 @@ struct Frame // Meta-data cv::vector time; cv::vector id; + cv::vector tIdx; cv::vector p; + cv::vector checked; cv::vector start_loc; // Calculated prediction of where the object should be in the future @@ -54,16 +88,26 @@ struct Object { // Target data int id; + int count; cv::Point2f start_loc; cv::vector trajectory; cv::vector area; cv::vector frames; + cv::vector ulx; + cv::vector uly; + cv::vector lrx; + cv::vector lry; cv::Mat img; // Simple flags - bool car; + bool checked; + bool hasSibling; + bool headlight; bool miss; + // Headlight sibling + int siblingID; + // Variables to track last know state of object. int last_seen; cv::vector> trajectories_before_disappearing; @@ -80,6 +124,20 @@ struct Object double distanceX_when_last_seen; double distanceY_when_last_seen; int time_when_last_seen; + + // Buffer index + int bIdx; + + // Transit index + int tIdx; + + // Set default boolean values + Object() { + checked = false; + hasSibling = false; + headlight = false; + miss = false; + } }; /* An instance of carCounter can run the algorithm. @@ -87,7 +145,34 @@ struct Object * processed frames. An alternative to getting the data * from program memory is to pull it from a database. A * carCounter will keep table data updated as the algorithm - * runs. */ + * runs. + * + * while(true) + * - obtainframe < (opencv) + * - createFrame + * - threshold < (opencv) + * - selectBackgroundSubtraction + * - MOG2 < (opencv) || - Adaptive Median < (BGS) || - FrameDifference < (BGS) + * - dilate < (opencv) + * - erode < (opencv) + * - medianblur < (opencv) + * - removeShadow + * - persistenceCheck + * - checkTransitLedgerUsingMomentAndCenter + * - startRegionMonitor + * - safetyChecks + * - histogramCalcAndFindStd + * - calcHistogram + * - findStd + * - checkMissing + * - endRegionMonitor + * - safetyChecks + * - histogramClacAndFindStd + * - calcHistogram + * - findStd + * - drawResult + * + */ class carCounter{ @@ -101,7 +186,10 @@ private: int object_counter; int car_counter; - // Workspace + // Flow control (If nighttime is selected algorithm will take a slightly alternate path each cycle) + bool nightTime; + + // Temporal Workspace std::deque buffer; std::deque transit; @@ -109,30 +197,42 @@ private: std::deque carArchive; std::deque frameArchive; - // Misc. - cv::Mat frame; // current frame. - cv::Mat background; // background. - cv::Mat resizeF; // current frame resized. + // Testing + std::clock_t start; // timer + double duration; // timer + cv::Mat test; // isn't used in calc, output to this to see what something looks like + + // Frame + cv::Mat frame; // current frame + cv::Mat resizeF; // current frame resized + cv::Mat resizeFgray; // current frame resized (grayscale) + + // Display Matrix cv::Mat display; // can use this to draw whatever you want on it. + + // Foreground Matrices + cv::Mat mask; // fg mask generated by MOG2/Adaptive Median or Threshold for night time. + cv::Mat3b maskrgb; // fg mask with 3 channels. + cv::Mat extraMask; // fg mask generated by frame difference (during night time). + cv::Mat3b extraMaskrgb; // fg mask with 3 channels. + + // Background Matrix + cv::Mat background; cv::vector> contours; cv::vector hierarchy; cv::vector vecCircles; cv::vector::iterator itrCircles; - cv::Mat fgMaskMOG2; // fg mask generated by MOG method. - cv::Mat3b fgMaskMOG2rgb; // fg mask with 3 channels for shadow removal. cv::BackgroundSubtractorMOG2 MOG2; // MOG Background subtractor. - - // extra background subtractor. - cv::Mat efgMaskMOG2; - cv::BackgroundSubtractorMOG2 eMOG2; - + IBGS *bgsAdaptiveMedian; + IBGS *bgsFrameDifference; + // db variables sqlite3 *db; int rc; - /* Initializes the frame object once Background subtraction is done. */ + /* Initializes the frame object once background subtraction is done. */ void createFrame(Frame &data, cv::vector> &contours, cv::vector> &contours_poly, @@ -140,62 +240,130 @@ private: cv::vector ¢er, cv::vector &radius, int minObjectSize); - /* Checks what objects in the current frame - * correspond to the ones in the previous */ + /* Select and apply BackgroundSubtraction. + For daytime use either MOG2 or a modified DP Adaptive Median. + For nighttime we use frame difference. (currently not implemented) */ - void persistenceCheck(cv::Mat &frame, - int &car_counter, int &frame_counter, int &object_counter, - int type, - std::deque &buffer, std::deque &transit, - cv::vector startRegion); - + void carCounter::selectBackgroundSubtraction(bool useMOG2, bool nightTime, + cv::Mat &resizeF,cv::Mat &mask, + int nmixtures, double backgroundratio, bool detectShadows); + + /* Checks what objects in the current frame correspond to the ones + in the previous. Will check against the transit ledger and properly update + the most current frame object in the buffer. */ + + void persistenceCheck(int &frame_counter,int type,std::deque &buffer, std::deque &transit,int expectedDist); - /* This method keeps tabs on objects that may have went missing */ + /* This method keeps tabs on objects that may have went missing. + If object transit ledger is updated with information from current frame. + Else the object is simply marked as missing and the transit ledger + will store info from the previous time the object was seen. */ void checkMissing(int &frame_counter, std::deque &buffer,std::deque &transit); /* Checks for new objects entering the transit region. - * Objects in the transit region are suspected cars, if they enter they should also leave - * at some point. When this happens they are identified as being cars. */ - - void startRegionMonitor(std::deque &buffer,std::deque &transit, - cv::vector startRegion); + Objects in the transit region are suspected cars, if they enter they should also leave + at some point. When this happens they are identified as being cars. In the start region objects + are assigned their initial values. During night time we attempt to "match" multiple objects to one + another since we look at headlights. (2 headlights belong to 1 car)*/ + + void startRegionMonitor(cv::Mat &frame,cv::Mat &background, cv::Mat &subtract, + std::deque &buffer,std::deque &transit, + cv::vector startRegion, + int horizontalBandWidth); - /* Checks for objects exiting the transit region */ + /* Checks for objects exiting the transit region. We flush all objects up to + the last one that exited. If A,B, and C entered the transit region in + that order and C ends up crossing first then A and B are disregarded.*/ - void endRegionMonitor(cv::Mat &frame,int &car_counter, - std::deque &buffer,std::deque &transit, - std::deque &carArchive, + void endRegionMonitor(cv::Mat &frame,cv::Mat &background,cv::Mat &subtract, cv::Mat &subtract2, int minObjectSize, + int &car_counter, + std::deque &buffer,std::deque &transit,std::deque &carArchive, cv::vector endRegion); + /* Internal functionality for endRegionMonitor */ + + void detectCarBoxForNight(cv::Mat &subtract,cv::Rect &boundRect,int minObjectSize); + /* Internal functionality for persistenceCheck */ - void checkTransitLedgerUsingMomentAndCenter(cv::Mat &frame, - int &car_counter, int &frame_counter, int &object_counter, - std::deque &buffer,std::deque &transit, - cv::vector startRegion); + + void checkTransitLedgerUsingMomentAndCenter(int &frame_counter,std::deque &buffer,std::deque &transit,int expectDist); + + /* Internal functionality for startRegionMonitor and endRegionMonitor */ + + bool safetyChecks(cv::Mat &frame,cv::Mat &background,cv::Mat &subtract, + std::deque &buffer, + int boundBoxNum,double thresh); + + /* Internal functionality for safetyChecks */ + + double histogramCalcAndFindStd(cv::Mat &frame,cv::Mat &background,cv::Mat &subtract, + std::deque &buffer,int boundBoxNum); + + /* Internal functionality for histogramCalcAndFindMax */ + + cv::vector calcHistogram(cv::Mat& img,cv::Mat& mask); + + double findStd(cv::vector &hist, int channel); /* Visualization */ + void drawResult(int &car_counter, int &object_counter, cv::Mat &frame, cv::vector &hierarchy, std::deque &buffer,std::deque &transit, bool showLastCar, bool boundBoxesOn, bool predictionOn, bool latestPathsOn, bool displayTransitLedger, bool displayFocusRegions, int showPathofId, cv::vector startRegion, cv::vector endRegion); + /* Custom Utility */ + + int carCounter::obtainBoundBoxes(cv::vector> &contours,cv::vector> &contours_poly, + cv::vector &boundRect, + cv::vector ¢er,cv::vector &radius, int minObjectSize); + + /* Applies median blur, dilate/erode and shadow removal */ + void cleanNoise(cv::Mat &mask, cv::Mat &extraMask,cv::Mat3b &maskrgb, cv::Mat3b &extraMaskrgb); + + /* Internal to clean noise, can remove shadows if MOG2 shadow detection is being used*/ + void removeShadow(cv::Mat &subtract,cv::Mat3b &subtractrgb); /* DB functions */ - void openDB(); + void openDB(int expID,char dataBase[200]); void closeDB(); /* Async method for filling the database */ - void exportCarsToDB(int expID, std::deque &carArchive); + void exportCarsToDB(int expID,char fileName[100], char saveImgTo[200], std::deque &carArchive, int fps); public: // constructor - carCounter(int expID); - - /* This call is made to run the algorithm */ - void run(int bufferSize, int minObjectSize, int skip, int learningTime, char fileName[100], - bool online, const cv::Point* ppt, const cv::Point* ppt2,int* npt,int* npt2, + carCounter(int expID,bool night); + + /* Start the counter + * bufferSize: Local workspace (how many of the latest frames of the video to store) + * minObjectSizeDay: Minimum required size for an object to be considered (ignore things that are too small to be a car) + * minObjectSizeNight: Minimum required size for an object to be considered (ignore things that are too small to be a headlight) + * skip: Skips frames from video (potential performance improvement) + * learningTime: Give time for BGS to settle + * fileName: Video filename that you want run the algorithm on. + * saveImgTo: Directory in which cropped images of counted cars will be saved. + * dataBase The local sqlite database to which you want to save data. (absolute location) + * fps: Ignore this for now (set the frames per second of this video. Can be used to track how many seconds into the video the car is detect) + * expectedDist: Tells the algorithm the threshold on how far along in pixels the object will be next frame. + * horizontalBandWidth: If looking for a sibling headlight object this tells the algorithm how wide the search area band should be horizontally. + * online: Whether to display frames + * ppt,ppt2,npt,npt2: Set an overlay mask on the video (optional) + * useMOG2: Choose between MOG2 or Adaptive Median for background subtraction + (Adaptive median is more primitive but is able to handle stationary objects). + Check MOG2 for details. + * startRegion: Set points for start Region. + * endRegion: Set points for end Region. + + Other parameters are settings for displaying if online mode is choosen. + */ + void run(int bufferSize, int minObjectSizeDay, int minObjectSizeNight, int skip, int learningTime, + char fileName[100], char saveImgTo[200], char dataBase[200], + int fps, + int expectedDist, int horizontalBandWidth, + bool online, const cv::Point* ppt, const cv::Point* ppt2,int* npt,int* npt2, bool useMOG2, int nmixtures, double backgroundratio, bool detectShadows, bool showLastCar, bool boundBoxesOn, bool predictionOn, bool latestPathsOn, bool displayTransitLedger, bool displayFocusRegions, int showPathofId, diff --git a/car_count_db b/car_count_db index 4be2c2f..6e2e255 100644 Binary files a/car_count_db and b/car_count_db differ diff --git a/runWrapper.cpp b/runWrapper.cpp index 9d62481..47b8320 100644 --- a/runWrapper.cpp +++ b/runWrapper.cpp @@ -1,27 +1,132 @@ #include "runWrapper.h" +void runACounter(int id){ + char fileName[100] = "Standard_SCU3IU_2014-08-18_0700.002.avi"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 50; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(150,100); + cv::Point Sp4(250,100); + cv::Point Sp2(150,400); + cv::Point Sp3(250,400); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(300,80); + cv::Point Ep4(450,80); + cv::Point Ep2(300,180); + cv::Point Ep3(450,180); + + cv::vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + cv::Point overlay1[1][4]; + overlay1[0][0] = cv::Point( 0, 0 ); + overlay1[0][1] = cv::Point( 0, 180 ); + overlay1[0][2] = cv::Point( 580, 0 ); + overlay1[0][3] = cv::Point( 580, 0 ); + + const cv::Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + cv::Point overlay2[1][4]; + overlay2[0][0] = cv::Point( 0, 320 ); + overlay2[0][1] = cv::Point( 0, 480 ); + overlay2[0][2] = cv::Point( 720, 480); + overlay2[0][3] = cv::Point( 720, 0 ); + + const cv::Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(id,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); +} int runWrapper() { using namespace cv; int runTest = 1; + + // User Prompt + std::cout << "CTDOT CARCOUNTER DEMO: \n"; + std::cout << "This a simple demo application using the CTDOT car counting API. \n\n"; + + std::cout << "Note: Feel free to play around with the runWrapper file to get an idea for how to use this API. \n\n"; + + std::cout << "The following test runs are available: \n"; + std::cout << "1: Day Time/Going away from camera/Multithreaded \n"; + std::cout << "2: Night Time/Going towards camera/Uconn/Before Intersection \n"; + std::cout << "3: Day Time/Going towards camera/Uconn/After Intersection \n"; + std::cout << "4: Night Time/Going towards camera/Uconn/After Intersection \n"; + std::cout << "5: Night Time/Going away from camera/Uconn/Before Intersection \n"; + std::cout << "6: Day Time/Going away from camera/Uconn/Before Intersection \n"; + std::cout << "7: Day Time/Parallel/Highway/Shaky \n"; + std::cout << "8: Day to Night Time/Going towards camera/Uconn/After Intersection \n"; + std::cout << "9: Day to Night Time/Going towards camera/4-way intersection \n"; + std::cout << "10: Day Time/Going away from camera/4-way intersection \n"; + std::cout << "11: Day Time/Parallel/Highway/Stable \n"; + std::cout << "Select (1-11): "; + std::cin >> runTest; + + // TEST1: Day Time/Going away from camera/Multithreaded if(runTest == 1) { - // input params - char fileName[100] = "Standard_SCU3IU_2014-08-18_0700.002.avi"; + std::thread thread1(runACounter,1); + std::thread thread2(runACounter,2); + std::thread thread3(runACounter,3); + std::thread thread4(runACounter,4); + thread1.detach(); + thread2.detach(); + thread3.detach(); + thread4.detach(); + while(true); + } + + // TEST2: Night Time/Going towards camera/Uconn/Before Intersection + if (runTest == 2){ + char fileName[100] = "Standard_SCU3JD_2014-10-21_0845.012.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; int bufferSize = 30; - int minObjectSize = 5000; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; int skip = 3; int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 50; int nmixtures = 5; double backgroundratio = .6; bool detectShadows = false; bool online = true; - cv::Point Sp1(150,100); - cv::Point Sp4(250,100); - cv::Point Sp2(150,400); - cv::Point Sp3(250,400); + cv::Point Sp1(300,250); + cv::Point Sp4(600,250); + cv::Point Sp2(300,300); + cv::Point Sp3(600,300); cv::vector startRegion; startRegion.push_back(Sp1); @@ -29,60 +134,67 @@ int runWrapper() startRegion.push_back(Sp3); startRegion.push_back(Sp4); - cv::Point Ep1(350,80); - cv::Point Ep4(450,80); - cv::Point Ep2(350,180); - cv::Point Ep3(450,180); + cv::Point Ep1(300,325); + cv::Point Ep4(600,325); + cv::Point Ep2(300,375); + cv::Point Ep3(600,375); vector endRegion; endRegion.push_back(Ep1); endRegion.push_back(Ep2); endRegion.push_back(Ep3); endRegion.push_back(Ep4); - - // overlays to focus on area of video where the counting should be done. (can be taken as params) Point overlay1[1][4]; overlay1[0][0] = Point( 0, 0 ); - overlay1[0][1] = Point( 0, 220 ); - overlay1[0][2] = Point( 580, 0 ); - overlay1[0][3] = Point( 580, 0 ); + overlay1[0][1] = Point( 0, 480 ); + overlay1[0][2] = Point( 320, 480); + overlay1[0][3] = Point( 240, 0 ); + const Point* ppt[1] = { overlay1[0] }; int npt[] = { 4 }; - /** Create some points */ Point overlay2[1][4]; - overlay2[0][0] = Point( 0, 320 ); - overlay2[0][1] = Point( 0, 480 ); - overlay2[0][2] = Point( 720, 480); + overlay2[0][0] = Point( 230, 0 ); + overlay2[0][1] = Point( 720, 400 ); + overlay2[0][2] = Point( 720, 400 ); overlay2[0][3] = Point( 720, 0 ); + const Point* ppt2[1] = { overlay2[0] }; int npt2[] = { 4 }; - carCounter CC(2); - CC.run(bufferSize,minObjectSize,skip,learningTime,fileName,online,*ppt,*ppt2,npt,npt2,nmixtures,backgroundratio,detectShadows, - true,true,true,true,true,true,-1,1, startRegion, endRegion); + carCounter CC(5,true); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); return 0; - } - - else{ - // input params - char fileName[100] = "Standard_SCU3JD_2014-10-21_0845.005.avi"; + + // TEST3: Day Time/Going towards camera/Uconn/After Intersection + } if(runTest == 3) { + char fileName[100] = "Standard_SCU3IP_2014-10-21_0830.010.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; int bufferSize = 30; - int minObjectSize = 2000; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; int skip = 3; int learningTime = 240; + int fps = 30; + int expectedDist = 100; + int horizontalBandwidth = 50; int nmixtures = 5; double backgroundratio = .6; bool detectShadows = false; bool online = true; - cv::Point Sp1(250,30); - cv::Point Sp4(350,30); - cv::Point Sp2(250,150); - cv::Point Sp3(350,150); + cv::Point Sp1(200,250); + cv::Point Sp4(600,250); + cv::Point Sp2(200,300); + cv::Point Sp3(600,300); cv::vector startRegion; startRegion.push_back(Sp1); @@ -90,9 +202,9 @@ int runWrapper() startRegion.push_back(Sp3); startRegion.push_back(Sp4); - cv::Point Ep1(300,325); + cv::Point Ep1(200,325); cv::Point Ep4(600,325); - cv::Point Ep2(300,375); + cv::Point Ep2(200,375); cv::Point Ep3(600,375); vector endRegion; @@ -101,31 +213,563 @@ int runWrapper() endRegion.push_back(Ep3); endRegion.push_back(Ep4); - // overlays to focus on area of video where the counting should be done. (can be taken as params) Point overlay1[1][4]; overlay1[0][0] = Point( 0, 0 ); overlay1[0][1] = Point( 0, 480 ); overlay1[0][2] = Point( 320, 480); - overlay1[0][3] = Point( 240, 0 ); + overlay1[0][3] = Point( 30, 0 ); const Point* ppt[1] = { overlay1[0] }; int npt[] = { 4 }; - /** Create some points */ Point overlay2[1][4]; - overlay2[0][0] = Point( 230, 0 ); - overlay2[0][1] = Point( 720, 450 ); - overlay2[0][2] = Point( 720, 450); + overlay2[0][0] = Point( 40, 0 ); + overlay2[0][1] = Point( 720, 400 ); + overlay2[0][2] = Point( 720, 400 ); + overlay2[0][3] = Point( 720, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(6,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + // TEST4: Night Time/Going towards camera/Uconn/After Intersection + } if(runTest == 4) { + char fileName[100] = "Standard_SCU3IP_2014-10-21_0830.023.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 100; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(200,250); + cv::Point Sp4(600,250); + cv::Point Sp2(200,300); + cv::Point Sp3(600,300); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(300,375); + cv::Point Ep4(700,375); + cv::Point Ep2(300,425); + cv::Point Ep3(700,425); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 480 ); + overlay1[0][2] = Point( 320, 480); + overlay1[0][3] = Point( 30, 0 ); + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 40, 0 ); + overlay2[0][1] = Point( 720, 380 ); + overlay2[0][2] = Point( 720, 380 ); + overlay2[0][3] = Point( 720, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(7,true); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + + // TEST5: Night Time/Going away from camera/Uconn/Before Intersection/ DOESN'T WORK. + } if(runTest == 5) { + char fileName[100] = "Standard_SCU3IS_2014-10-21_0930.012.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 50; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(100,325); + cv::Point Sp4(400,325); + cv::Point Sp2(100,375); + cv::Point Sp3(400,375); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(100,250); + cv::Point Ep4(400,250); + cv::Point Ep2(100,300); + cv::Point Ep3(400,300); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 480 ); + overlay1[0][2] = Point( 0, 480); + overlay1[0][3] = Point( 370, 0 ); + + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 410, 0 ); + overlay2[0][1] = Point( 480, 480 ); + overlay2[0][2] = Point( 720, 480 ); + overlay2[0][3] = Point( 720, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(8,true); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + + // TEST6: Day Time/Going away from camera/Uconn/Before Intersection + } if(runTest == 6) { + char fileName[100] = "Standard_SCU3IS_2014-10-21_0930.003.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 100; + int horizontalBandwidth = 50; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(100,325); + cv::Point Sp4(500,325); + cv::Point Sp2(100,375); + cv::Point Sp3(500,375); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(100,150); + cv::Point Ep4(500,150); + cv::Point Ep2(100,200); + cv::Point Ep3(500,200); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 480 ); + overlay1[0][2] = Point( 0, 480); + overlay1[0][3] = Point( 370, 0 ); + + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 410, 0 ); + overlay2[0][1] = Point( 480, 480 ); + overlay2[0][2] = Point( 720, 480 ); overlay2[0][3] = Point( 720, 0 ); const Point* ppt2[1] = { overlay2[0] }; int npt2[] = { 4 }; - carCounter CC(2); - CC.run(bufferSize,minObjectSize,skip,learningTime,fileName,online,*ppt,*ppt2,npt,npt2,nmixtures,backgroundratio,detectShadows, - true,true,true,true,true,true,-1,1, startRegion, endRegion); + carCounter CC(9,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + // TEST7: Day Time/Parallel/Highway/Shaky + } if(runTest == 7) { + char fileName[100] = "Standard_SCU3JD_2014-07-30_0500.002.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 200; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 1000; + int fps = 30; + int expectedDist = 100; + int horizontalBandwidth = 50; + int nmixtures = 5; + double backgroundratio = .6; + + cv::Point Sp1(100,220); + cv::Point Sp4(150,220); + cv::Point Sp2(100,375); + cv::Point Sp3(150,375); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(300,220); + cv::Point Ep4(350,220); + cv::Point Ep2(300,375); + cv::Point Ep3(350,375); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 270 ); + overlay1[0][2] = Point( 720, 270); + overlay1[0][3] = Point( 720, 0 ); + + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 0, 300 ); + overlay2[0][1] = Point( 0, 480 ); + overlay2[0][2] = Point( 720, 480 ); + overlay2[0][3] = Point( 720, 300 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(10,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + // TEST8: Day to Night Time/Going towards camera/Uconn/After Intersection + } if(runTest == 8) { + char fileName[100] = "Standard_SCU3IP_2014-10-21_0830.010.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 100; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(200,250); + cv::Point Sp4(600,250); + cv::Point Sp2(200,300); + cv::Point Sp3(600,300); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(300,375); + cv::Point Ep4(700,375); + cv::Point Ep2(300,425); + cv::Point Ep3(700,425); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 480 ); + overlay1[0][2] = Point( 320, 480); + overlay1[0][3] = Point( 30, 0 ); + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 40, 0 ); + overlay2[0][1] = Point( 720, 380 ); + overlay2[0][2] = Point( 720, 380 ); + overlay2[0][3] = Point( 720, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(11,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + // TEST9: Day to Night Time/Going towards camera/4-way intersection/ + } if(runTest == 9) { + char fileName[100] = "Standard_SCU3IU_2015-01-08_1600.002.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 200; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 1000; + int fps = 30; + int expectedDist = 100; + int horizontalBandwidth = 50; + int nmixtures = 5; + double backgroundratio = .6; + + cv::Point Sp1(20,220); + cv::Point Sp4(60,220); + cv::Point Sp2(20,375); + cv::Point Sp3(60,375); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(70,190); + cv::Point Ep4(110,190); + cv::Point Ep2(70,350); + cv::Point Ep3(110,350); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 0 ); + overlay1[0][2] = Point( 0, 0 ); + overlay1[0][3] = Point( 0, 0 ); + + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 0, 0 ); + overlay2[0][1] = Point( 0, 0 ); + overlay2[0][2] = Point( 0, 0 ); + overlay2[0][3] = Point( 0, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(12,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + // TEST10: Day Time/Going away from camera/4-way intersection/ + } if(runTest == 10) { + char fileName[100] = "Standard_SCU026-R_2014-03-11_0700.002.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 3000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 100; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(200,200); + cv::Point Sp4(500,200); + cv::Point Sp2(200,300); + cv::Point Sp3(500,300); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(300,50); + cv::Point Ep4(700,50); + cv::Point Ep2(300,150); + cv::Point Ep3(700,150); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 0 ); + overlay1[0][2] = Point( 0, 0 ); + overlay1[0][3] = Point( 0, 0 ); + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 0, 0 ); + overlay2[0][1] = Point( 0, 0 ); + overlay2[0][2] = Point( 0, 0 ); + overlay2[0][3] = Point( 0, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(13,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); + return 0; + + // TEST11: Day Time/Parallel/Highway/Stable + } if(runTest == 11) { + char fileName[100] = "Standard_SCU3JD_2014-08-11_0000.016.mp4"; + char saveImgTo[200] = "C:/Users/Vanya/Desktop/Car/"; + char dataBase[200] = "C:/Users/Vanya/Desktop/car_count_db"; + int bufferSize = 30; + int minObjectSizeDay = 5000; + int minObjectSizeNight = 10; + int skip = 3; + int learningTime = 240; + int fps = 30; + int expectedDist = 20; + int horizontalBandwidth = 100; + int nmixtures = 5; + double backgroundratio = .6; + bool detectShadows = false; + bool online = true; + + cv::Point Sp1(50,100); + cv::Point Sp4(200,100); + cv::Point Sp2(50,400); + cv::Point Sp3(200,400); + + cv::vector startRegion; + startRegion.push_back(Sp1); + startRegion.push_back(Sp2); + startRegion.push_back(Sp3); + startRegion.push_back(Sp4); + + cv::Point Ep1(400,100); + cv::Point Ep4(700,100); + cv::Point Ep2(400,400); + cv::Point Ep3(700,400); + + vector endRegion; + endRegion.push_back(Ep1); + endRegion.push_back(Ep2); + endRegion.push_back(Ep3); + endRegion.push_back(Ep4); + + Point overlay1[1][4]; + overlay1[0][0] = Point( 0, 0 ); + overlay1[0][1] = Point( 0, 0 ); + overlay1[0][2] = Point( 0, 0 ); + overlay1[0][3] = Point( 0, 0 ); + + const Point* ppt[1] = { overlay1[0] }; + int npt[] = { 4 }; + + Point overlay2[1][4]; + overlay2[0][0] = Point( 0, 0 ); + overlay2[0][1] = Point( 0, 0 ); + overlay2[0][2] = Point( 0, 0 ); + overlay2[0][3] = Point( 0, 0 ); + + + const Point* ppt2[1] = { overlay2[0] }; + int npt2[] = { 4 }; + + carCounter CC(14,false); + CC.run(bufferSize,minObjectSizeDay,minObjectSizeNight,skip,learningTime,fileName,saveImgTo,dataBase,fps,expectedDist,horizontalBandwidth,RUN_ONLINE, + *ppt,*ppt2,npt,npt2, + USE_MOG2_ON,nmixtures,backgroundratio, + DETECT_SHADOWS_ON,SHOW_LAST_CAR_ON,SHOW_BOUNDBOX_ON,SHOW_PREDICTION_ON,SHOW_LATEST_PATHS_ON,SHOW_TRANSIT_LEDGER_ON,SHOW_REGION_MONITORS_ON, + SHOW_PATH_OF_CAR_X_OFF,USE_RESIZED_WITH_OVERLAYS_FRAME, startRegion, endRegion); return 0; } } \ No newline at end of file diff --git a/runWrapper.h b/runWrapper.h index a4dcd19..d86dbb4 100644 --- a/runWrapper.h +++ b/runWrapper.h @@ -3,6 +3,7 @@ #include "carCounter.h" +void runACounter(int id); int runWrapper(); #endif \ No newline at end of file