Hello,
We are trying to see the performance of the GPU with a simple example such as segmentation. For this purpose, we have tried to use the gesture recognition example prepared by Mr. Andre Silva given in the following link:
http://imxcv.blogspot.com/2012/03/gesture-recognition-on-imx6.html
But this example is compiled with LTIB, so it didn't work with Yocto image. I have tried to compile it with Yocto, but I had some problems.
First of all, it was not compiled, because it can not find stubs_soft.h. So I changed -mfloat-abi flag from softfp to hard. I have also changed the include and library directories according to my PC. I have attached the modified makefile to this post.
Now, it starts compiling, but I get another error because of fbGetDisplay function. It says that too few arguments to the function. The complete log is given below. I have also tried to change fbGetDisplay function with fbGetDisplayByIndex(4). But it still was not compiled
What can be wrong? If there are other examples that use a webcam and perform some video processing tasks on GPU that I can use with Yocto image, it will also very helpful for us (OpenCL or OpenGL examples).
Thank you
Fikret
fikret@fikret-VirtualBox:/media/918970b5-b414-445e-b8f3-7e4029338bc8/GPUbased/gesture-recognition-master$ make
cd src; \
make -f Makefile distclean; \
make -f Makefile install;
make[1]: Entering directory `/media/918970b5-b414-445e-b8f3-7e4029338bc8/GPUbased/gesture-recognition-master/src'
rm -rf main.o glcvutils.o glcvplane.o netplayer_gst.o mlp.o
rm -rf *~ core *.core
rm -rf ../bin/gesture
make[1]: Leaving directory `/media/918970b5-b414-445e-b8f3-7e4029338bc8/GPUbased/gesture-recognition-master/src'
make[1]: Entering directory `/media/918970b5-b414-445e-b8f3-7e4029338bc8/GPUbased/gesture-recognition-master/src'
arm-poky-linux-gnueabi-g++ -Wall -O2 -fsigned-char -march=armv7-a -mfpu=neon -mfloat-abi=hard -I. -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10 -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/glib-2.0 -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/lib/glib-2.0/include -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/libxml2 -c -o main.o main.cpp
main.cpp:167:0: warning: "EXIT" redefined [enabled by default]
#define EXIT 5
^
In file included from /media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/opencv/cv.h:79:0,
from main.cpp:39:
/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/opencv2/core/internal.hpp:90:0: note: this is the location of the previous definition
#define EXIT __CV_EXIT__
^
main.cpp: In function 'int main(int, char**)':
main.cpp:242:8: warning: unused variable 'key' [-Wunused-variable]
char key = 0;
^
main.cpp:243:10: warning: variable 'endpoint' set but not used [-Wunused-but-set-variable]
CvPoint endpoint = cvPoint (10, TEXTURE_H/2/2-10);
^
main.cpp:244:7: warning: unused variable 'm' [-Wunused-variable]
char m[100];
^
main.cpp: In function 'void Render()':
main.cpp:389:15: warning: unused variable 'z_angle' [-Wunused-variable]
static float z_angle = 0;
^
main.cpp: In function 'void* UpdateTextureFromCamera(void*)':
main.cpp:479:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
main.cpp: In function 'void* GstLoop(void*)':
main.cpp:493:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
main.cpp: In function 'void IPInit()':
main.cpp:628:10: warning: unused variable 'contours' [-Wunused-variable]
CvSeq *contours;
^
main.cpp: In function 'void PreProcessing()':
main.cpp:737:13: warning: unused variable 'menu_option' [-Wunused-variable]
static int menu_option;
^
main.cpp: In function 'int PatternRecognition(IplImage*, CvSeq*, CvPoint*)':
main.cpp:886:7: warning: unused variable 'a' [-Wunused-variable]
char a[100];
^
main.cpp: In function 'int StateMachine(int, int, int)':
main.cpp:1081:6: warning: unused variable 'new_state' [-Wunused-variable]
int new_state;
^
main.cpp: In function 'int PatternRecognition(IplImage*, CvSeq*, CvPoint*)':
main.cpp:890:3: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (pos)
^
main.cpp: In function 'int MotionDetect(int, CvPoint, bool)':
main.cpp:985:56: warning: 'vertical' may be used uninitialized in this function [-Wmaybe-uninitialized]
state = StateMachine (CHANNEL, horizontal, vertical);
^
main.cpp:1010:55: warning: 'horizontal' may be used uninitialized in this function [-Wmaybe-uninitialized]
state = StateMachine (VOLUME, horizontal, vertical);
^
arm-poky-linux-gnueabi-g++ -Wall -O2 -fsigned-char -march=armv7-a -mfpu=neon -mfloat-abi=hard -I. -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/gstreamer-0.10 -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/glib-2.0 -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/lib/glib-2.0/include -I/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/libxml2 -c -o glcvutils.o glcvutils.cpp
glcvutils.cpp: In member function 'bool GLCVUtils::GLInit()':
glcvutils.cpp:59:53: error: too few arguments to function '_FBDisplay* fbGetDisplay(void*)'
EGLNativeDisplayType native_display = fbGetDisplay();
^
In file included from /media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/EGL/eglplatform.h:38:0,
from /media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/EGL/egl.h:34,
from glcvutils.h:45,
from glcvutils.cpp:21:
/media/918970b5-b414-445e-b8f3-7e4029338bc8/yocto/fsl-community-bsp/build/tmp/sysroots/imx6qsabrelite/usr/include/EGL/eglvivante.h:101:1: note: declared here
fbGetDisplay(
^
make[1]: *** [glcvutils.o] Error 1
make[1]: Leaving directory `/media/918970b5-b414-445e-b8f3-7e4029338bc8/GPUbased/gesture-recognition-master/src'
make: *** [gpucv] Error 2
Original Attachment has been moved to: Makefile.zip