OpenGL-Android binding error

I use opencv on Android and successfully downloaded and processed jpg images from the phone’s SD card. Now I want to manipulate the frames from the video stored on the SD card. I coded and tested opencv code in C ++, but I got a binding error when trying to include it in my android-opencv project. In particular, when I add a line of code

CvCapture* capture = cvCreateFileCapture( "/sdcard/testVideo.MOV" );

And then try rebuilding the project, I get the following output / error:

OPENCV_CONFIG = ../../build/android-opencv.mk
PROJECT_PATH defaulting to this directory
/Users/me/Documents/Android/android-ndk-r4-crystax/ndk-build OPENCV_CONFIG=../../build/android-opencv.mk PROJECT_PATH=. V=0 
Compile++ thumb: Assay <= /Users/me/Documents/Android/opencv/android/apps/MyApp/jni/Processor.cpp
SharedLibrary  : libAssay.so
/Users/me/Documents/Android/opencv/android/build/obj/local/armeabi-v7a/libhighgui.a(cap.o): In function `cvCreateVideoWriter':
cap.cpp:(.text.cvCreateVideoWriter+0x16): undefined reference to `cvCreateVideoWriter_Images(char const*)'
cap.cpp:(.text.cvCreateVideoWriter+0x20): undefined reference to `cvCreateVideoWriter_Images(char const*)'
/Users/me/Documents/Android/opencv/android/build/obj/local/armeabi-v7a/libhighgui.a(cap.o): In function `cvCreateFileCapture':
cap.cpp:(.text.cvCreateFileCapture+0x2): undefined reference to `cvCreateFileCapture_Images(char const*)'
collect2: ld returned 1 exit status
make[1]: *** [/Users/me/Documents/Android/opencv/android/apps/MyApp/obj/local/armeabi/libAssay.so] Error 1
make: *** [libs/armeabi-v7a/libAssay.so] Error 2

It seems to have problems with binding to cvCreateFileCapture. I read that the order in which the opencv libraries are listed does matter, but I'm not sure which order I should use (or if this is my problem). My opencv libraries are listed in the following order:

OPENCV_LIBS := $(OPENCV_LIB_DIRS) -lfeatures2d  -lcalib3d -limgproc -lobjdetect  \
     -lvideo  -lhighgui -lml -llegacy -lcore -lopencv_lapack -lflann \
    -lzlib -lpng -ljpeg -ljasper 

Does anyone know how to make it cvCreateFileCapturework?

Thank!

+3
1

, , , : https://code.ros.org/trac/opencv/changeset/4756

:

// capture video from a sequence of images
// the filename when opening can either be a printf pattern such as
// video%04d.png or the first frame of the sequence i.e. video0001.png

- / , ffmpeg -. ffmpeg, , opencv Android. , , . opencv trac.

https://code.ros.org/trac/opencv/wiki

+1

Source: https://habr.com/ru/post/1793317/


All Articles