Giter Club home page Giter Club logo

simple_vehicle_counting's Introduction

Vehicle Detection, Tracking and Counting

Last page update: 12/04/2017 (Added Python API & OpenCV 3.x support)

Last version: 1.0.0 (see Release Notes for more info)

Hi everyone,

There are several ways to perform vehicle detection, tracking and counting. Here is a step-by-step of a simplest way to do this:

  1. First, you will need to detect the moving objects. An easy way to do vehicle detection is by using a Background Subtraction (BS) algorithm. You can try to use a background subtraction library like BGSLibrary.
  2. For vehicle tracking, you will need to use a tracking algorithm. A simplest way to do this is by using a blob tracker algorithm (see cvBlob or OpenCVBlobsLib). So, send the foreground mask to cvBlob or OpenCVBlobsLib. For example, the cvBlob library provide some methods to get the centroid, the track and the ID of the moving objects. You can also set to draw a bounding box, the centroid and the angle of the tracked object.
  3. And then, check if the centroid of the moving object has crossed a region of interest (i.e. virtual line) in your video.
  4. Voilà! enjoy it :)

Citation

If you use this code for your publications, please cite it as:

@ONLINE{vdtc,
    author = "Andrews Sobral",
    title  = "Vehicle Detection, Tracking and Counting",
    year   = "2014",
    url    = "https://github.com/andrewssobral/simple_vehicle_counting"
}

For Windows users

  • There is no Visual Studio 2013 template project anymore. Please, use CMAKE instead.

Compiling with OpenCV 3.x and Visual Studio 2015 from CMAKE

Dependencies:

  • OpenCV 3.x (tested with OpenCV 3.2.0)
  • GIT (tested with git version 2.7.2.windows.1).
  • CMAKE for Windows (tested with cmake version 3.1.1).
  • Microsoft Visual Studio (tested with VS2015).

Note: the procedure is similar for OpenCV 2.4.x and Visual Studio 2013.

Please follow the instructions below:

  1. Go to Windows console.

  2. Clone git repository:

git clone --recursive https://github.com/andrewssobral/simple_vehicle_counting.git
  1. Go to simple_vehicle_counting/build folder.

  2. Set your OpenCV PATH:

set OpenCV_DIR=C:\OpenCV3.2.0\build
  1. Launch CMAKE:
cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 14 Win64" ..
  1. Include OpenCV binaries in the system path:
set PATH=%PATH%;%OpenCV_DIR%\x64\vc14\bin
  1. Open the bgs.sln file in your Visual Studio and switch to 'RELEASE' mode

  2. Click on 'ALL_BUILD' project and build!

  3. If everything goes well, copy simple_vehicle_counting.exe to simple_vehicle_counting/ and run!

For Linux users

  • For Linux and Mac users, a CMakefile is provided to compile the source code.

    • Check out the latest project source code and compile it:
~/git clone --recursive https://github.com/andrewssobral/simple_vehicle_counting.git
~/cd simple_vehicle_counting
~/simple_vehicle_counting/cd build
~/simple_vehicle_counting/build/ cmake ..
~/simple_vehicle_counting/build/ make
    • Run demo:
~/simple_vehicle_counting/run_simple_vehicle_counting.sh

Docker image

Example code

#include <iostream>
#include <opencv2/opencv.hpp>

#include "package_bgs/PBAS/PixelBasedAdaptiveSegmenter.h"
#include "package_tracking/BlobTracking.h"
#include "package_analysis/VehicleCouting.h"

int main(int argc, char **argv)
{
  /* Open video file */
  CvCapture *capture = 0;
  capture = cvCaptureFromAVI("dataset/video.avi");
  if(!capture){
    std::cerr << "Cannot open video!" << std::endl;
    return 1;
  }

  /* Background Subtraction Algorithm */
  IBGS *bgs;
  bgs = new PixelBasedAdaptiveSegmenter;

  /* Blob Tracking Algorithm */
  cv::Mat img_blob;
  BlobTracking* blobTracking;
  blobTracking = new BlobTracking;

  /* Vehicle Counting Algorithm */
  VehicleCouting* vehicleCouting;
  vehicleCouting = new VehicleCouting;

  std::cout << "Press 'q' to quit..." << std::endl;
  int key = 0;
  IplImage *frame;
  while(key != 'q')
  {
    frame = cvQueryFrame(capture);
    if(!frame) break;

    cv::Mat img_input = cv::cvarrToMat(frame);
    cv::imshow("Input", img_input);

    // bgs->process(...) internally process and show the foreground mask image
    cv::Mat img_mask;
    bgs->process(img_input, img_mask);

    if(!img_mask.empty())
    {
      // Perform blob tracking
      blobTracking->process(img_input, img_mask, img_blob);

      // Perform vehicle counting
      vehicleCouting->setInput(img_blob);
      vehicleCouting->setTracks(blobTracking->getTracks());
      vehicleCouting->process();
    }

    key = cvWaitKey(1);
  }

  delete vehicleCouting;
  delete blobTracking;
  delete bgs;

  cvDestroyAllWindows();
  cvReleaseCapture(&capture);

  return 0;
}

Python API

A python demo shows how to call the Python API. It is similar as the C++ demo.

To use the Python API, you should copy "python" directory to overwrite the generated one.

~/simple_vehicle_counting/cd build
~/simple_vehicle_counting/build/cmake ..
~/simple_vehicle_counting/build/make -j 8
~/simple_vehicle_counting/build/cp -r ../python/* python/
~/simple_vehicle_counting/build/../run_python_demo.sh

If you have previously built the project at the project root, make sure there are no previously generated libraries in the "python" directory by make clean.

Release Notes:

  • 12/04/2017: Added OpenCV 3.x support. Removed vs2013 template project (use CMAKE instead).

  • 07/04/2017: Added Python API, thanks to @kyu-sz.

  • Version 1.0.0: First version.

simple_vehicle_counting's People

Contributors

andrewssobral avatar kyu-sz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple_vehicle_counting's Issues

the version of opencv

Hi Andrews, I notice that you said the project can use OpenCV 2.4.x (it only works with this version).I run your code, it runs successful, but it couldn't load the video.avi, I try some methods to solve this problem but they all failed. I‘d like to ask if its gonna possible because I use the version of opencv is 2.4.9 rather than 2.4.10. Thank you so much~

Make issues

Hi. This might be a newbie question/problem, but I'm not finding any help online so far.

So, I'm just trying to make the project at

~/simple_vehicle_counting/build $ sudo make

And then I'm receiving

/usr/bin/ld: warning: libicui18n.so.56, needed by ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)

/usr/bin/ld: warning: libicuuc.so.56, needed by ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)

/usr/bin/ld: warning: libicudata.so.56, needed by ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link)
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para u_strToLower_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_getStandardName_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_getAlias_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para uenum_next_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para u_strToUpper_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_setSubstChars_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_getTimeZoneDisplayName_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_fromUnicode_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para u_errorName_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para uenum_close_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_getDSTSavings_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_openTimeZoneIDEnumeration_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_setMillis_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucol_close_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucol_getSortKey_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_get_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucol_open_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_compareNames_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_clone_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_open_56'
~Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucol_setAttribute_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_openCountryTimeZones_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_open_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_openTimeZones_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_countAliases_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_inDaylightTime_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_close_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_getAvailableName_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_getDefaultName_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucal_getDefaultTimeZone_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_toUnicode_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucol_strcoll_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_close_56' ~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para ucnv_getMaxCharSize_56'
~/Qt/5.8/gcc_64/lib/libQt5Core.so.5: referência indefinida para `ucnv_countAvailable_56'
collect2: error: ld returned 1 exit status
CMakeFiles/simple_vehicle_counting_bin.dir/build.make:138: recipe for target 'simple_vehicle_counting' failed
make[2]: *** [simple_vehicle_counting] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/simple_vehicle_counting_bin.dir/all' failed
make[1]: *** [CMakeFiles/simple_vehicle_counting_bin.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Any tips? Thanks in advance.

just can't open the video

Hi, thank you for response my question on https://www.youtube.com/watch?v=27JxVkpIXW0 ..
I can't opened the video from your project file. When I debug your program, the 'black box' will showed and just closed but I've read the message from the black box. the message is, 'cannot open the video'.. Black box I mean, a box with black color. please give me a solution, thank you so much, Sir.

Error importing analysis package

Traceback (most recent call last):
File "demo.py", line 4, in
import analysis
File "/home/comp-proj-22/simple_vehicle_counting/python/analysis/init.py", line 1, in
from _analysis import *
ModuleNotFoundError: No module named '_analysis'

Video Playback time very slow

sorry about this but I do not know whether or not my Computer is absolute but you sample really lags, I do not think its my computer, I was doing a background subtractor app in Java with frame size of 700 + 600 and was working perfect with no lag but this sample lags uncontrollably, is there something am missing out that I have not yet discovered?

When use release mode,the program crash

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

Using OpenCV 3.2.0
PBAS()
PixelBasedAdaptiveSegmenter()
BlobTracking()
VehicleCouting()
Press 'q' to quit...
OpenCV Error: Assertion failed (dims <= 2 && step[0] > 0) in cv::Mat::locateROI, file D:\opencv\sources\modules\core\src\matrix.cpp, line 949

How to apply other algorithms in BGSLibrary?

Hi,

I could build your sample project in vs2013. Then I tried to apply DPEigenbackgroundBGS instead of PixelBasedAdaptiveSegmenter. I copied .h and .cpp from BGSLibrary to package_bgs and changed some codes as follows, then the building progress was interrupted.

How to apply DPEigenbackgroundBGS in this program?

Thanks!

Here are my changes in Demo.cpp

cv::Mat img_eigbkg;
DPEigenbackgroundBGS* bgs;
bgs->process(img_input, img_mask, img_eigbkg);

Error loading libraries Python

Hello Andrewssobral, i don't understand your step to install python API "/simple_vehicle_counting/build/cp -r ../python/* python/" . But i installed the program normally.
When i run the "demo.py" i have always import errors. The script is on the same root paste of the packet analysis.

Do you have any idea to solve my problem, or what i am doing wrong?

ERROR:

Traceback (most recent call last):
File "demo.py", line 4, in
import analysis
File "/home/miguel/simple_vehicle_counting/python/analysis/init.py", line 1, in
from _analysis import *
ImportError: No module named _analysis

Running Python Demo 'module' object has no attribute 'PixelBasedAdaptiveSegmenter'

I am having difficulties trying to get the Python Demo working. I had to change "from _-------- import ---------" lines in "build" to simply "from --------- import ---------" inorder to fix import errors. Unfortunately, I have gotten stuck at:

"from bgs.pbas import *" in the init.py file in the /bgs/pbas folder. When I try to run the demo file, I get

Traceback (most recent call last):
  File "./demo.py", line 17, in <module>
    segmenter = pbas.PixelBasedAdaptiveSegmenter()
AttributeError: 'module' object has no attribute 'PixelBasedAdaptiveSegmenter'

I am not sure how to debug this issue.

Python Code

Do you have any idea how to make a Python Code instead of using C. I am not a big fan of Microsoft Languages 😄 . Help would be really appreciated, detection is easy to do, but my problem is in counting

Train to detect cars from front

Hello,
I need to train it to detect multiple front faced cars. Which xml i have replace?
I need to train Haar XML right?
Is it detecting multiple cars now, or I should set it to?

How to detect motorcycle

Hello, Mr. Andrew. I'm Teddy Ernanto. I ask where is the code must changed for detect motorcycle? Change minArea & maxArea or any else?

Error Building Project.

[ 7%] Building CXX object CMakeFiles/simple_vehicle_counting.dir/package_bgs/PBAS/PixelBasedAdaptiveSegmenter.cpp.o
In file included from /home/nakul/work/yolo/simple_vehicle_counting/package_bgs/PBAS/PixelBasedAdaptiveSegmenter.h:7,
from /home/nakul/work/yolo/simple_vehicle_counting/package_bgs/PBAS/PixelBasedAdaptiveSegmenter.cpp:1:
/home/nakul/work/yolo/simple_vehicle_counting/package_bgs/PBAS/../IBGS.h:3:10: fatal error: cv.h: No such file or directory
3 | #include <cv.h>
| ^~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/simple_vehicle_counting.dir/build.make:76: CMakeFiles/simple_vehicle_counting.dir/package_bgs/PBAS/PixelBasedAdaptiveSegmenter.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/simple_vehicle_counting.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

cv::Scalar & const CvScalar

issues:There is no appropriate user-defined conversion from "cv::Scalar" to "const CvScalar"
environment:VS2017
CMAKE:3+

avi is not opened

Hello,

I succesfully compiled the proj. But when I have started app cvCaptureFromAVI in line #15 returns NULL. Do you have any ideas in what the matter? Maybe I must to install something additional like ffmpeg?

Thanks,
Igor

Can't find BGS.SLN after building with CMAKE

Hi, I am trying to compile this project using OpenCV 3.4.2 and MS Visual Studio 2017 x64.

As the product versions differ from the versions you tested on, I am giving you the commands that I used.

After cloning the repo and cd'ing into "simple_vehicle_counting" folder, I used -

  1. set OpenCV_DIR=C:\opencv\build
  2. cmake -DOpenCV_DIR=%OpenCV_DIR% -G "Visual Studio 15 2017 Win64" ..
  3. Included the OpenCV binary in the System Variables

I can see all the .vcxproj file and so but not any BGS.SLN file to open it in the VS 2017. I tried it many way but no luck.

Screenshots:

  1. https://goo.gl/y8MKX8
  2. https://goo.gl/QeU2Sh

I am trying to run this project for almost two days now. Please help, sir.

Multiple tracking of vehicle issue

hello sir..thanks for your source code .It is working properly ,but
how will we detect multiple vehicle at same time when it's pass a horizontal line??
...plz modified the source code..

some about the paper

Wheter your code is based on the paper named "Vehicle Detection, Tracking and Counting"?thank you!

can not counting cars number correctly

hello , first thanks for your good library .
i try to count cars and also i want to put number of each car above the car.
i try to do it but i saw one of car not die and another car keep on its track , so total number always is wrong and number of each car also wrong. i really confused and wast more time on this bug.
please tell me whats the problem? and how i can do that?
another problem happen, when i ShowAB=0 i saw that both A->B and B->A counting that must just one of them counted in vertical or horizontal line, i think its related to before problem that i pointed to.

thanks in advance
i waiting for your help

Error building project

Hello i was unable to build the projcect when doing make.

The error was the following:

[ 61%] Building CXX object CMakeFiles/simple_vehicle_counting.dir/package_tracking/cvblob/cvlabel.cpp.o
In file included from /home/pi/CV/simple_vehicle_counting/package_tracking/cvblob/cvlabel.cpp:30:0:
/home/pi/CV/simple_vehicle_counting/package_tracking/cvblob/cvblob.h:433:4: warning: extra ‘;’ [-Wpedantic]
   };
    ^
/home/pi/CV/simple_vehicle_counting/package_tracking/cvblob/cvlabel.cpp:38:3: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
   };
   ^
/home/pi/CV/simple_vehicle_counting/package_tracking/cvblob/cvlabel.cpp:38:3: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { } [-Wnarrowing

error null pointer

i use opencv 3.3.0 and 64bit windows. after run your sample c++ in QT , error happened:


PBAS()
PixelBasedAdaptiveSegmenter()
BlobTracking()
VehicleCouting()
Press 'q' to quit...
OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteInt, file C:\build\master_winpack-build-win64-vc14\opencv\modules\core\src\persistence.cpp, line 4625

Python problems

Using Ubuntu 16.04
Build

  1. Updated CMakeLists.txt: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=gnu++0x")
  2. From build folder: cmake -D BUILD_PYTHON_SUPPORT=ON .. and make -j4
  3. Followed README.md for python: cp -r ../python/* python/

Testing

  1. ../run_simple_vehicle_counting.sh runs OK

  2. ../run_python_demo.sh
    Traceback (most recent call last):
    File "./build/python/demo.py", line 4, in
    import analysis
    File "/home/zeev/PYTHON/SIMPLE-VEHICLE-COUNT/simple_vehicle_counting/build/python/analysis/init.py", line 6, in
    import pyboostcvconverter as pbcvt
    ImportError: No module named pyboostcvconverter

  3. Apparently __init__.py was missing in pyboostconverter folder, so entered
    touch python/pyboostcvconverter/__init__.py

  4. ../run_python_demo.sh
    PBAS()
    PixelBasedAdaptiveSegmenter()
    VehicleCouting()
    BlobTracking()
    ../run_python_demo.sh: line 4: 2089 Segmentation fault (core dumped) python ./build/python/demo.py

Any suggestions to help locate the problem?

Slow Action when it works in OS Linux Ubuntu Odroid

Hello, Mr. Andrew. I'm Teddy Ernanto. Before I ask about how to detect motorcycle and it works in VS2013 Windows. Now, I use odroid with OS Linux Ubuntu 14.04 and OpenCV 2.4.12. The system works is too slow when detect from camera.

  1. Can I change PBAS with other algorithm? Example FrameDifferentTest.cpp in your sub folder BGS Library
  2. Any changes for Cmake?

Shit performance

This is absolute shit.

The performance on this motherfucker is just astronomic.

On a 480p uncompressed m-jpeg video it ran about 10fps on a i7-6700k CPU.

Tried different vms, tried different physical machines, tried different input videos. Same thing.

Sorry but your code is shit.

P.S. This shit was forked 91 times...

error at Mat img_input(frame);

I copied the code as is but I get an error at the code that reads
cv::Mat img_input(frame);

the error i get says

Severity Code Description Project File Line Suppression State
Error (active) no instance of constructor "cv::Mat::Mat" matches the argument list

Failed to run MSBuild command

Failed to run MSBuild command :
MSBuild.exe
to get the value of VCTargetsPath

I have an error in the 6th step, when I try to launch cmake.
I use opencv3.1, and also cmake 3.10.
can you tell me what should I do to fix this error?
Thanks for your answer

capture

Some error in ./package_bgs/PBAS/PBAS.h

./package_bgs/PBAS/PBAS.h:120:32: error: a space is required between consecutive right angle brackets (use '> >')
      std::vector<std::vector<float*>>B_Mag_Pts;

Make Error when building project and Python API

Hello,

I follow the instructions on the main site trying to use the Python demo. These are the commads I have entered so far:

~/git clone --recursive https://github.com/andrewssobral/simple_vehicle_counting.git
~/cd simple_vehicle_counting
~/simple_vehicle_counting/cd build
~/simple_vehicle_counting/build/ cmake ..
~/simple_vehicle_counting/build/make -j 8

However, when running the 'make' command (and when trying to build the normal C version, the same error shows up), it fails with Error 2. Here is the end of the output:

...
/home/tamas/simple_vehicle_counting/package_tracking/cvblob/cvcontour.cpp:378:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
/home/tamas/simple_vehicle_counting/package_tracking/cvblob/cvlabel.cpp: In function ‘cvb::CvLabel cvb::cvGetLabel(const IplImage*, unsigned int, unsigned int)’:
/home/tamas/simple_vehicle_counting/package_tracking/cvblob/cvlabel.cpp:442:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
CMakeFiles/simple_vehicle_counting.dir/build.make:230: recipe for target 'CMakeFiles/simple_vehicle_counting.dir/package_tracking/cvblob/cvlabel.cpp.o' failed
make[2]: *** [CMakeFiles/simple_vehicle_counting.dir/package_tracking/cvblob/cvlabel.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/simple_vehicle_counting.dir/all' failed
make[1]: *** [CMakeFiles/simple_vehicle_counting.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

What is the problem and how can I fix it? Or how can I modify the Python code so that I don't have to actually build the project?

Thanks for the answers in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.