开发者

error of using cvCaptureFromFile in android local part when building the xxx.so!~~

开发者 https://www.devze.com 2023-03-01 01:30 出处:网络
I was do as whatthe Opencv2.2 said(this) ; now,i can use builded static opencv libs to build my needed xx.so file,and than android program,and it works.but when i use the function cvCaptureFromFile,th

I was do as what the Opencv2.2 said(this) ; now,i can use builded static opencv libs to build my needed xx.so file,and than android program,and it works.but when i use the function cvCaptureFromFile,there is a error like below during build.

$ $NDK_ROOT/ndk-b开发者_高级运维uild Compile++ thumb: facedetection <= /cygdrive/e/workspace/Recognization1_0/jni/hus t_iprai1104_jni_FaceDetectedJNI.cpp SharedLibrary : libfacedetection.so /cygdrive/d/OpenCV-2.2.0/android/build/obj/local/armeabi-v7a/libopencv_highgui.a (cap.o): In function cvCreateVideoWriter': cap.cpp:(.text.cvCreateVideoWriter+0x16): undefined reference tocvCreateVideoW riter_Images(char const*)' cap.cpp:(.text.cvCreateVideoWriter+0x20): undefined reference to cvCreateVideoW riter_Images(char const*)' /cygdrive/d/OpenCV-2.2.0/android/build/obj/local/armeabi-v7a/libopencv_highgui.a (cap.o): In functioncvCreateFileCapture': cap.cpp:(.text.cvCreateFileCapture+0x2): undefined reference to `cvCreateFileCap ture_Images(char const*)' collect2: ld returned 1 exit status make: * [/cygdrive/e/workspace/Recognization1_0/obj/local/armeabi/libfacedetec tion.so] Error 1

it said can not find cvCreateFileCapture_Images(char const*),what can i do???? is that opencv2.2 actrually not suport video process when cmake or make???


HighGUI is actually responsible for constructing the UI elements for the OPENCV NATIVE UI , for displaying the images etc , and it is also used for grabbing frames etc, as this cannot be compiled in android because unavailability of the UI libraries in the JNI library as well as , in android the UI is created in java , so HIGHGUI cannot be incorporated to the OPENCV library , if incorporated also u cannot use it in full swing ,

so for reading Video file or grabbing the frame from camera, use android java framework (eg: camera.Preview callback to get raw YUV frames) , then use it to construct the IplImage and use it for processing.

Hope this solves ur problems..

0

精彩评论

暂无评论...
验证码 换一张
取 消