mjmarin / libpabod Goto Github PK
View Code? Open in Web Editor NEWlibPaBOD: a C++ library for PArt Based Object Detection on images.
License: MIT License
libPaBOD: a C++ library for PArt Based Object Detection on images.
License: MIT License
make all
Building obj/makeDetection.o...
src/makeDetection.cpp: In function ‘float makeDetection(LDetections&, IplImage_, Model_, float, double)’:
src/makeDetection.cpp:16:7: warning: variable ‘detected’ set but not used [-Wunused-but-set-variable]
int detected = 0;
^
src/makeDetection.cpp: In function ‘float makeDetection(CvMat*, IplImage, Model_, float, double)’:
src/makeDetection.cpp:86:7: warning: variable ‘detected’ set but not used [-Wunused-but-set-variable]
int detected = 0;
^
Assembler messages:
Fatal error: can't create obj/makeDetection.o: No such file or directory
make: *_* [obj/makeDetection.o] Error 1
Getting below error while compiling:
..\..\src\gdetect.cpp(568): error C2440: 'initializing' : cannot convert from 'CvMat *' to 'cv::Mat'
The line of code in question is:
cv::Mat sTmp2 = sTmp;
Here is the full error:
2>E:\Codebase\libpabod\include\cell.h(551): error C2664: 'void std::vector<cv::Mat,std::allocator<_Ty>>::push_back(const cv::Mat &)' : cannot convert argument 1 from 'CvMat *' to 'cv::Mat &&'
2> with
2> [
2> _Ty=cv::Mat
2> ]
2> Reason: cannot convert from 'CvMat *' to 'cv::Mat'
2> No constructor could take the source type, or constructor overload resolution was ambiguous
2>E:\Codebase\libpabod\include\cell.h(552): error C2664: 'void std::vector<cv::Mat,std::allocator<_Ty>>::push_back(const cv::Mat &)' : cannot convert argument 1 from 'CvMat *' to 'cv::Mat &&'
2> with
2> [
2> _Ty=cv::Mat
2> ]
2> Reason: cannot convert from 'CvMat *' to 'cv::Mat'
2> No constructor could take the source type, or constructor overload resolution was ambiguous
2>E:\Codebase\libpabod\include\featPyramid.h(247): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'CvMatND *' (or there is no acceptable conversion)
2> E:\Codebase\opencv\build\include\opencv2/core/mat.hpp(1098): could be 'cv::Mat &cv::Mat::operator =(const cv::Scalar &)'
2> E:\Codebase\opencv\build\include\opencv2/core/mat.hpp(943): or 'cv::Mat &cv::Mat::operator =(const cv::MatExpr &)'
2> E:\Codebase\opencv\build\include\opencv2/core/mat.hpp(934): or 'cv::Mat &cv::Mat::operator =(const cv::Mat &)'
2> while trying to match the argument list '(cv::Mat, CvMatND *)'
2>..\..\src\gdetect.cpp(568): error C2440: 'initializing' : cannot convert from 'CvMat *' to 'cv::Mat'
2> No constructor could take the source type, or constructor overload resolution was ambiguous
2>..\..\src\gdetect.cpp(654): error C2664: 'void std::vector<cv::Mat,std::allocator<_Ty>>::push_back(const cv::Mat &)' : cannot convert argument 1 from 'CvMat *' to 'cv::Mat &&'
2> with
2> [
2> _Ty=cv::Mat
2> ]
2> Reason: cannot convert from 'CvMat *' to 'cv::Mat'
2> No constructor could take the source type, or constructor overload resolution was ambiguous
2> getDetections.cpp
VS2013 compiler with Win32 x86 with latest OpenCV 3 RC1
can you please tell us how can we train our own dataset for detection ..
Ubuntu 15.04 (64-bit)
libmatio-dev:amd64 1.5.2-3build1 amd64
libcv-dev:amd64 2.4.9+dfsg-1ub amd64
libhighgui-dev:amd64 2.4.9+dfsg-1ub amd64
[ 5%] Building CXX object src/CMakeFiles/pabod.dir/gdetect.cpp.o
In file included from /home/user/libpabod/include/model.h:5:0,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/home/user/libpabod/include/cell.h: In member function ‘void Cell::addIxItem(CvMat*)’:
/home/user/libpabod/include/cell.h:551:46: error: no matching function for call to ‘std::vector<cv::Mat>::push_back(CvMat*&)’
void addIxItem(CvMat * Ix){_Ix.push_back(Ix);};
^
/home/user/libpabod/include/cell.h:551:46: note: candidate is:
In file included from /usr/include/c++/4.9/vector:64:0,
from /home/user/libpabod/include/cell.h:4,
from /home/user/libpabod/include/model.h:5,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = cv::Mat; _Alloc = std::allocator<cv::Mat>; std::vector<_Tp, _Alloc>::value_type = cv::Mat]
push_back(const value_type& __x)
^
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from ‘CvMat*’ to ‘const value_type& {aka const cv::Mat&}’
In file included from /home/user/libpabod/include/model.h:5:0,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/home/user/libpabod/include/cell.h: In member function ‘void Cell::addIyItem(CvMat*)’:
/home/user/libpabod/include/cell.h:552:46: error: no matching function for call to ‘std::vector<cv::Mat>::push_back(CvMat*&)’
void addIyItem(CvMat * Iy){_Iy.push_back(Iy);};
^
/home/user/libpabod/include/cell.h:552:46: note: candidate is:
In file included from /usr/include/c++/4.9/vector:64:0,
from /home/user/libpabod/include/cell.h:4,
from /home/user/libpabod/include/model.h:5,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = cv::Mat; _Alloc = std::allocator<cv::Mat>; std::vector<_Tp, _Alloc>::value_type = cv::Mat]
push_back(const value_type& __x)
^
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from ‘CvMat*’ to ‘const value_type& {aka const cv::Mat&}’
In file included from /home/user/libpabod/include/gdetect.h:4:0,
from /home/user/libpabod/src/gdetect.cpp:1:
/home/user/libpabod/include/featPyramid.h: In member function ‘void FeatPyramid::setFeat(CvMatND*, int)’:
/home/user/libpabod/include/featPyramid.h:247:14: error: no match for ‘operator=’ (operand types are ‘cv::Mat’ and ‘CvMatND*’)
_feat[i] = feat;
^
/home/user/libpabod/include/featPyramid.h:247:14: note: candidates are:
In file included from /usr/local/include/opencv2/core/mat.hpp:3417:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/core/types_c.h:101,
from /usr/local/include/opencv2/core/core_c.h:48,
from /usr/local/include/opencv/cv.h:63,
from /home/user/libpabod/include/image.h:1,
from /home/user/libpabod/include/handlerOpenCVStructs.h:4,
from /home/user/libpabod/include/cell.h:6,
from /home/user/libpabod/include/model.h:5,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/usr/local/include/opencv2/core/mat.inl.hpp:565:6: note: cv::Mat& cv::Mat::operator=(const cv::Mat&)
Mat& Mat::operator = (const Mat& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:565:6: note: no known conversion for argument 1 from ‘CvMatND*’ to ‘const cv::Mat&’
/usr/local/include/opencv2/core/mat.inl.hpp:3015:6: note: cv::Mat& cv::Mat::operator=(const cv::MatExpr&)
Mat& Mat::operator = (const MatExpr& e)
^
/usr/local/include/opencv2/core/mat.inl.hpp:3015:6: note: no known conversion for argument 1 from ‘CvMatND*’ to ‘const cv::MatExpr&’
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from /usr/local/include/opencv2/core/types_c.h:101,
from /usr/local/include/opencv2/core/core_c.h:48,
from /usr/local/include/opencv/cv.h:63,
from /home/user/libpabod/include/image.h:1,
from /home/user/libpabod/include/handlerOpenCVStructs.h:4,
from /home/user/libpabod/include/cell.h:6,
from /home/user/libpabod/include/model.h:5,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/usr/local/include/opencv2/core/mat.hpp:1103:10: note: cv::Mat& cv::Mat::operator=(const Scalar&)
Mat& operator = (const Scalar& s);
^
/usr/local/include/opencv2/core/mat.hpp:1103:10: note: no known conversion for argument 1 from ‘CvMatND*’ to ‘const Scalar& {aka const cv::Scalar_<double>&}’
/home/user/libpabod/src/gdetect.cpp: In function ‘void applyStructuralRule(Model*, const Cell&, int, int)’:
/home/user/libpabod/src/gdetect.cpp:568:28: error: conversion from ‘CvMat*’ to non-scalar type ‘cv::Mat’ requested
cv::Mat sTmp2 = sTmp;
^
/home/user/libpabod/src/gdetect.cpp: In function ‘void applyDeformationRule(Model*, const Cell&)’:
/home/user/libpabod/src/gdetect.cpp:654:31: error: no matching function for call to ‘std::vector<cv::Mat>::push_back(CvMat*&)’
scoreTmp.push_back(score[i]);
^
/home/user/libpabod/src/gdetect.cpp:654:31: note: candidate is:
In file included from /usr/include/c++/4.9/vector:64:0,
from /home/user/libpabod/include/cell.h:4,
from /home/user/libpabod/include/model.h:5,
from /home/user/libpabod/include/featPyramid.h:4,
from /home/user/libpabod/include/gdetect.h:4,
from /home/user/libpabod/src/gdetect.cpp:1:
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = cv::Mat; _Alloc = std::allocator<cv::Mat>; std::vector<_Tp, _Alloc>::value_type = cv::Mat]
push_back(const value_type& __x)
^
/usr/include/c++/4.9/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from ‘CvMat*’ to ‘const value_type& {aka const cv::Mat&}’
src/CMakeFiles/pabod.dir/build.make:54: recipe for target 'src/CMakeFiles/pabod.dir/gdetect.cpp.o' failed
make[2]: *** [src/CMakeFiles/pabod.dir/gdetect.cpp.o] Error 1
CMakeFiles/Makefile2:137: recipe for target 'src/CMakeFiles/pabod.dir/all' failed
make[1]: *** [src/CMakeFiles/pabod.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
Hi, there was a linking error regarding openmp:
./libs//libpabod.a(fconvThreads.o): In function fconv(CvMatND*, CvMatND**, int, int)': fconvThreads.cpp:(.text+0x53b): undefined reference to
omp_set_num_threads'
I added -fopenmp to CPPFLAGS in makefile seems to be resolving the problem. On an x64 ubuntu 12.04.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.