Skip to content
Snippets Groups Projects
Commit 5ed8f779 authored by Holger Friedrich's avatar Holger Friedrich
Browse files

remove opencv1 dependencies.

bgslib now compiles on Linux systems without libcv-dev installed.
Almost all calls and incudes have been ported to opencv2, some are
still used via opencv2/legacy/compat.hpp (e.g. cvFillImage).
Hope I got everything fine also for mingw since I removed two
mingw related defines.
I don't have a mingw install to check it against.
parent 233a37ee
Branches
Tags
No related merge requests found
Showing
with 39 additions and 38 deletions
......@@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License
along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "package_bgs/FrameDifferenceBGS.h"
#include "package_bgs/StaticFrameDifferenceBGS.h"
......
......@@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License
along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "package_bgs/FrameDifferenceBGS.h"
#include "package_bgs/StaticFrameDifferenceBGS.h"
......
......@@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
*/
#include "FrameProcessor.h"
#include <iomanip>
namespace bgslibrary
{
......
......@@ -16,7 +16,7 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <cv.h>
#include <opencv2/opencv.hpp>
namespace bgslibrary
{
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
namespace bgslibrary
{
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "Config.h"
#include "IFrameProcessor.h"
......
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "package_bgs/FrameDifferenceBGS.h"
......
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "package_bgs/jmo/MultiLayerBGS.h"
......
......@@ -18,8 +18,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#include <iostream>
#include <string>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
namespace bgslibrary
{
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -16,7 +16,7 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <cv.h>
#include <opencv2/opencv.hpp>
class IBGS
{
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include <opencv2/video/background_segm.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include <opencv2/video/background_segm.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "IBGS.h"
......
......@@ -17,8 +17,8 @@ along with BGSLibrary. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include "NPBGSubtractor.h"
#include "../IBGS.h"
......
......@@ -70,11 +70,11 @@ int TBackground::Init(IplImage * pSource)
bool TBackground::isInitOk(IplImage * pSource, IplImage *pBackground, IplImage *pMotionMask)
{
bool bResult = TRUE;
bool bResult = true;
int nbl, nbc;
if(pSource == NULL || pSource->nChannels != 1 || pSource->depth != IPL_DEPTH_8U)
bResult = FALSE;
bResult = false;
if(bResult)
{
......@@ -82,10 +82,10 @@ bool TBackground::isInitOk(IplImage * pSource, IplImage *pBackground, IplImage *
nbc = pSource->width;
if(pBackground == NULL || pBackground->width != nbc || pBackground->height != nbl || pBackground->imageSize != pSource->imageSize)
bResult = FALSE;
bResult = false;
if(pMotionMask == NULL || pMotionMask->width != nbc || pMotionMask->height != nbl || pMotionMask->imageSize != pSource->imageSize)
bResult = FALSE;
bResult = false;
}
return bResult;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment