The problem that the camera cannot be opened has not been solved. Start school, class, time
A little nervous. Let's talk about some attempts.
The problem is:AlgorithmAfter the camera is running but the camera device is not turned on, the algorithm prints "capture device failed to open! "
After several days of exploration, I guess this may be the case:
The camera device cannot be opened because FFmpeg is not cross-compiled during cross-Compilation of opencv.
There are two solutions: (1) Cross-compiling FFMPEG
(2) Using the video for Linux interface on ok6410 to collect camera data
Here, I use the first solution:
(1) download FFMPEG source code: ffmpeg-0.7.11.tar.bz2
(2) configuration :. /configure -- CPU = libavcodec/ARM/-- cc = arm-Linux-GCC -- enable-shared -- enable-Cross-compile -- arch = libavcodec/ARM/-- target-OS = Linux -- disable-ffserver -- enable-libxvid -- enable-libx264 -- enable-GPL -- enable-pthreads -- disable-Stripping
(3) install make and make install to the Lib of the Cross-compilation tool chain.
Try to re-compile opencv2.2, # cmake-Gui & then find that there is no with_ffmpegworkflow, and add it in cmakecache.txt.
With_ffmpeg, started to compile according to the previous method, install to the tool chain, compile the TLD algorithm, no error is reported.
However, put run_tld on the Development Board for testing. The error is still the same --Capture device failed to open!.
It's almost three weeks. Please be depressed ....
PS: At the same time, I also learned that, because ok6410 does not have a GTK library, it is not supported for highgui in opencv,
Therefore, the image cannot be displayed. Solve this problem, or transplant GTK (it is difficult to pass data), or use the QT image library,
Display. This is estimated to involve the meeting, Mark.