Migration of luvcview on arm Board

Source: Internet
Author: User
The porting of luvcview on the arm board has been trying to display the content in the camera on its own development board. Today, it's a little time. I tried to find it online, we found that many camera applications support V4L. After a brief look, luvcview supports direct Echo. So try... the porting of luvcview on the arm board has been trying to display the content in the camera on its own development board. Today, it's a little time. I tried to find it online, we found that many camera applications support V4L. After a brief look, luvcview supports direct Echo. So we attempted to Port luvcview. Www.2cto.com development environment: main machine VM & Ubuntu 10.04 development board devkit8500 (arm-cortex a8 dm3730) cross compiler arm-2009q1 1. The first is to download luvcview source code, this needless to say, everywhere. I am using luvcview_20070512.orig.tar.gz. this package requires the support of the SDL library. Find out how to port it online. 2. decompress the package to your working directory and go to the source directory: www.2cto.com # tar xvf/mnt/hgfs/share/luvcview_20070512.orig.tar.gz3. modify the Makefile file. the key lines must be modified. CC = gcc CPP = g ++ INSTALL = install APP_BINARY = luvcview BIN =/usr/local/bin SDLLIBS = $ (shell sdl-config -- libs) SDLFLAGS = $ (shell sdl-config -- cflags) # LIBX11FLAGS =-I/usr/X11R6/include-L/usr/X11R6/lib ----- >>> TARGET = arm-none-linux-gnueabi-CC = $ (TARGET) gcc CPP = $ (TARGET) g ++ INSTALL = install APP_BINARY = luvcview BIN =/usr/local/bin SDLLIBS =-L/work/prj/root-dev/usr/local/lib-lSDL SDLFLAGS =/ work/prj/ro Ot-dev/usr/local/include where SDLLIBS and SDLFLAGS identify the directory where the header files and library files of the SDL library are located, I put it under/work/prj/root-dev/usr/local/. By the way, we recommend that you port some libraries at home, try to install these libraries in a fixed directory for later use when porting other libraries, for example, if I install all the basic libraries previously ported to the/work/prj/root-dev/directory, I don't need to find them in the east. 3. modify the source code luvcview. c (1). # include --- >>> // # Include (2 ). static Uint32 SDL_VIDEO_Flags = SDL_ANYFORMAT | SDL_DOUBLEBUF | SDL_RESIZABLE; ---> static Uint32 SDL_VIDEO_Flags = SDL_ANYFORMAT | SDL_RESIZABLE; // | SDL_DOUBLEBUF; (3 ). int format = V4L2_PIX_FMT_MJPEG; --- >>> int format = V4L2_PIX_FMT_YUYV; 4. you can directly make the compilation, copy the luvcview to the development board, plug in the USB camera, and run luvcview to view the image on the LCD. * *** (1) comment out SDL_DOUBLEBUF because SDL_Flip is not called in the luvcview code, so it cannot be displayed using dual buffer. If you do not want to comment out SDL_DOUBLEBUF, you need to add a sentence in the main loop/* main big loop */while (videoIn-> signalquit ){...... SDL_Flip (pscreen); SDL_Delay (10);} (2) V4L2_PIX_FMT_MJPEG changed to V4L2_PIX_FMT_YUYV because the image data obtained through the V4L interface is in YUV format unless your camera supports mjpeg format. Of course, you can also add a parameter to run the luvcview without modifying the source code, for example,./luvcview-f yuv.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.