2017-03-27 10:07:06 -0600
| asked a question | 'Tracker': undeclared identifier in (OpenCV with Extra Modules) I got opencv 3.2 (with extra modules) built successfully in Visual Studio (2015). I am trying to build a code that uses the tracking module and especially the TrackerKCF. However, the compiler cannot recognize this library as appears in errors. I have added the following dependencies in Linker>Input>Additional Dependencies: opencv_aruco320d.lib
opencv_bgsegm320d.lib
opencv_bioinspired320d.lib
opencv_calib3d320d.lib
opencv_ccalib320d.lib
opencv_core320d.lib
opencv_datasets320d.lib
opencv_dnn320d.lib
opencv_dpm320d.lib
opencv_face320d.lib
opencv_features2d320d.lib
opencv_flann320d.lib
opencv_fuzzy320d.lib
opencv_hdf320d.lib
opencv_highgui320d.lib
opencv_imgcodecs320d.lib
opencv_imgproc320d.lib
opencv_line_descriptor320d.lib
opencv_ml320d.lib
opencv_objdetect320d.lib
opencv_optflow320d.lib
opencv_phase_unwrapping320d.lib
opencv_photo320d.lib
opencv_plot320d.lib
opencv_reg320d.lib
opencv_rgbd320d.lib
opencv_saliency320d.lib
opencv_shape320d.lib
opencv_stereo320d.lib
opencv_stitching320d.lib
opencv_structured_light320d.lib
opencv_superres320d.lib
opencv_surface_matching320d.lib
opencv_text320d.lib
opencv_tracking320d.lib
opencv_video320d.lib
opencv_videoio320d.lib
opencv_videostab320d.lib
opencv_xfeatures2d320d.lib
opencv_ximgproc320d.lib
opencv_xobjdetect320d.lib
opencv_xphoto320d.lib Part of Code: delay_toDeleteinFrame.insert(delay_toDeleteinFrame.end(), 0);
Rect a;
a.x = a.y = a.height = a.width = 0;
group_whenOcclusion.insert(group_whenOcclusion.end(), a);
TrackerKCF::Params param;
param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
Ptr<TrackerKCF> tracker = TrackerKCF::createTracker(param);
//Ptr<Tracker> tracker = Tracker::create("KCF");
tracker_vector.insert(tracker_vector.end(), tracker);
Errors: Error C2653 'TrackerKCF': is not a class or namespace name
Error C2065 'Tracker': undeclared identifier
Error C2923 'cv::Ptr': 'TrackerKCF' is not a valid template type argument for parameter 'T'
What could I be missing here? Thanks in advance |
2017-03-23 13:43:50 -0600
| received badge | ● Enthusiast
|
2017-03-01 12:30:50 -0600
| commented question | Error building opencv with extra modules in Visual Studio Thanks @LBerger , disabling hdf and python has solved the problem |
2017-02-28 12:27:47 -0600
| commented question | Error building opencv with extra modules in Visual Studio Where do I choose to build a 64 bit version? I did not face an option to select |
2017-02-28 10:54:31 -0600
| asked a question | Error building opencv with extra modules in Visual Studio I have configured and generated opencv 3.2 with extra modules on CMAKE successfully using a 32-bit compiler of Visual Studio 2015 (vs14). However, when building this project in Visual Studio I get several errors.
Below, you could find: small sample of the errors, the CMake ouput , the set of all errors, Error Sample LNK1120 50 unresolved externals opencv_hdf C:\OpenCV3_02_Custom\build\bin\Debug\opencv_hdf320d.dll 1
LNK1112 module machine type 'x64' conflicts with target machine type 'X86' opencv_python3 C:\OpenCV3_02_Custom\build\modules\python3\python35.lib(python35.dll) 1
CMake Ouput: FP16: Compiler support is available
found IPP (ICV version): 9.0.1 [9.0.1]
at: C:/OpenCV3_02_Custom/build/3rdparty/ippicv/ippicv_win
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Found PythonInterp: C:/Users/Ibrahim/Anaconda3/python.exe (found suitable version "3.5.2", minimum required is "2.7")
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe: NO
Protobuf: NO
Glog: NO
freetype2: NO
harfbuzz: NO
CMake Warning at C:/OpenCV3_Custom/source/opencv_contrib/modules/matlab/CMakeLists.txt:58 (message):
Your compiler is 32-bit but your version of Matlab is 64-bit. To build
Matlab bindings, please switch to a 64-bit compiler.
Call Stack (most recent call first):
C:/OpenCV3_Custom/source/opencv_contrib/modules/matlab/CMakeLists.txt:67 (warn_mixed_precision)
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Tesseract: NO
Check contents of vgg_generated_48.i ...
Check contents of vgg_generated_64.i ...
Check contents of vgg_generated_80.i ...
Check contents of vgg_generated_120.i ...
Check contents of boostdesc_bgm.i ...
Check contents of boostdesc_bgm_bi.i ...
Check contents of boostdesc_bgm_hd.i ...
Check contents of boostdesc_binboost_064.i ...
Check contents of boostdesc_binboost_128.i ...
Check contents of boostdesc_binboost_256.i ...
Check contents of boostdesc_lbgm.i ...
General configuration for OpenCV 3.2.0 =====================================
Version control: unknown
Extra modules:
Location (extra): C:/OpenCV3_Custom/source/opencv_contrib/modules
Version control (extra): unknown
Platform:
Timestamp: 2017-02-28T15:51:02Z
Host: Windows 10.0.14393 AMD64
CMake: 3.7.1
CMake generator: Visual Studio 14 2015
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe (ver 19.0.23506.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP4 ... (more) |
2017-02-14 14:40:11 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux Dear @Tetragramm ,
Following are lines of the code around the error: Rect a;
a.x = a.y = a.height = a.width = 0;
group_whenOcclusion.insert(group_whenOcclusion.end(), a);
TrackerKCF::Params param;
param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
Ptr<TrackerKCF> tracker = TrackerKCF::createTracker(param);
//Ptr<Tracker> tracker = Tracker::create("KCF");
tracker_vector.insert(tracker_vector.end(), tracker);
vector<Rect> rect_save;
Thanks much |
2017-02-14 14:39:09 -0600
| answered a question | Error in Using TrackerKCF in Ubuntu /Linux Dear @Tetragramm ,
Following are lines of the code around the error: Rect a;
a.x = a.y = a.height = a.width = 0;
group_whenOcclusion.insert(group_whenOcclusion.end(), a);
TrackerKCF::Params param;
param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
Ptr<TrackerKCF> tracker = TrackerKCF::createTracker(param);
tracker_vector.insert(tracker_vector.end(), tracker);
Thanks much |
2017-02-14 14:35:01 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux I managed to fix the libopencv_tracking.so error from this link:
http://stackoverflow.com/questions/19164343/opencv-libopencv-core-so-2-4-cannot-open-shared-object-file-no-such-file-or (http://stackoverflow.com/questions/19...) However, now kcf.cpp compiles and I have replaced the file with the file I want to run as you have suggested, but I still get the original error here: error: ‘cv::TrackerKCF::MODE’ is not a class or namespace param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
==========================================
Thanks much for help so far |
2017-02-14 13:02:22 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux @LBerger, sorry I think I did not give the right answer. When I run opencv_contrib/modules/tracking/samples/kcf.cpp in this directory I get the following error:
"error while loading shared libraries: libopencv_tracking.so.3.2: cannot open shared object file: No such file or directory
"
And I actually have more than one opencv version, but I'm only interested in the latest 3.2 |
2017-02-12 14:11:10 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux Yes I can. I expect something like a syntax difference when using TrackerKCF::Mode, or in including the required libraries for it in Ubuntu? |
2017-02-12 13:48:17 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux Yes they all exist actually |
2017-02-12 13:07:17 -0600
| commented question | Error in Using TrackerKCF in Ubuntu /Linux Thanks. How could I determine or check that? |
2017-02-12 12:35:14 -0600
| asked a question | Error in Using TrackerKCF in Ubuntu /Linux I have built successfully OpenCV 3.2 with the extra modules contribution successfully on Ubuntu. However, I'm having an error when building a code that uses (TrackerKCF::MODE), although this code was compiled successfully on Windows. Is there some syntax or includes I need to change or add? Error Message:
(error: ‘cv::TrackerKCF::MODE’ is not a class or namespace
param.desc_pca = TrackerKCF::MODE::CN | TrackerKCF::MODE::GRAY;
) Include List: #include <iostream>
#include <string>
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <opencv2/video/video.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/tracking.hpp>
#include <opencv2/videoio.hpp>
#include <cstdio>
#include <fstream>
#include <sstream>
#include<math.h>
#include<time.h>
|