FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Android-based MJPEG network camera design

     

    "1 system hardware composition and network architecture The camera hardware core uses the ARM9 architecture-based S3C24440A chip introduced by Samsung. The processor frequency reaches 400 MHz to meet real-time compression, and the MJPEG video stream can reach 320 × 240 resolution 25 FPS performance requirements. The peripheral with 64 MB SDRAM, 256 MB NAND FLASH, the network function is responsible by the DM9000 Ethernet MAC control chip, the camera module is controlled by the USB controller, and the system is powered by 3 LM71117, which outputs 3.3 V, 1.8 V, 1.25 V, respectively. The auxiliary peripheral interface constitutes a hardware structure of the camera. The S3C2440A system hardware block diagram is shown in Figure 1. Figure 1 S3C2440A system hardware block diagram The webcam is a TCP / IP device on the Internet, and the system network topology is shown in Figure 2. Among them, in the home area, according to the feature of security, the camera is arranged in the gatehouse, the balcony area, the balcony area, and then connected to the router by the network cable, configuring the router parameter map to the IP address of each camera independent port, and complete the Internet access. The distal end is composed of 3G notebooks with a fixed location, a 3G notebook that is moving. The PC can access and control the network camera through the web browser, and the Android phone implements real-time access through the client. Figure 2 System Network Topology 2 system software design 2.1 Network Camera Software Design Building a camera requires a Linux system environment, first transplanting BootLoader, cropping Linux 2.6.32 kernel, load Linux UVC (USB Video Device Class) driver, and write compiled Linux system image to ARM board NAND Flash, Start the boot address for the bootloader, which completes the software running environment to build [2]. Analyze network camera performance requirements and expansion, must meet the following conditions: ◆ Video monitoring is real-time; ◆ Support multiple clients simultaneously; ◆ Image recognition algorithm or reserved interface; ◆ Function modularity satisfies the expansion of future development. Therefore, the multi-threaded architecture and the mutex mechanism are used to ensure real-time, modular ideological code structure. The software program main process is shown in Figure 3. Figure 3 Software Program Main Process It is mainly implemented as follows. 1 Initializing the Linux V4L2 interface, the structure must be initialized according to the V4L2 standard structure, including Struct V4L2_Capability Cap; Struct V4L2_Format FMT; Struct V4L2_Buffer BUF; Struct V4L2_RequestBuffers RB; Struct V4L2_StreamParm SetFPS. In addition, pass the video device name, video width, video height, frame rate, video format, and crawler method to function init_videoin (struct vdin * vd, char * device, int width, int hotht, int fps, int format, int grabmethod) Implementation. It is worth noting that numerous USB Camera does not support JPEG format video streams directly, and it is widely supported for the yuyv format. In the late stage of image recognition algorithm, the Yuyv raw image data is directly analyzed, and JPEG compressed data is saved to a large number of calculation overhead of the original image data, so the yuyv crawler mode is used. 2 Create a core image processing thread. Implemented within the thread: grab function. ◆ UVC device single frame capture, UVCGRAB (Struct Vdin * VD) function implements the original image copy to memory in single frame yuyv format, using efficient MMAP memory mapping method read; ◆ JPEG core algorithm implementation, JPEG compression algorithm takes up a lot of CPU time, the next section will be discussed in detail. 3 Create a socket interface. To achieve multiple users, connect the network camera, Socket service thread must be used, whenever a new user connection is generated, a new thread is generated, and multi-user synchronous monitoring is implemented. 4 Construction web homepage based on web browser access methods. Embedded equipment resources are limited, and the lightweight web server is: BOA, HTTPD, THTTTPD, etc. This design uses open source BOA, cross-compiled BOA source code configuration boa.conf files, configuring the system ETC Self-start Shell to join the Boa program, will write the HTML page file into the WWW directory in the system, you can work. 2.2 MJPEG compression algorithm research and implementation MTON JOINT PhotoGraphic Experts Group Video Code Format, handles motion of video sequences as a continuous still image, this compression mode is completely compressed separately, and each frame can be stored in the editing process, which can be accurate. To the editing of the frame. The MJPEG single frame compression algorithm is JPEG (Joint PhotoGraphic Experts Group). The human eye visual physiological characteristics determine that the eye has different sensitivity to different frequency components constituting the image. JPEG compression is damaged [3], but the loss of the loss is part of human visual is not easy to detect, using the eye to the high-frequency information part of the color domain, saving a large number of data information that needs to be processed. One frame of raw image data is divided into two parts: JPEG algorithm encoding process: 1 spatial redundancy, remove excess information on visual; 2 Structure (static) redundant degree, remove extra information on the data itself. The JPEG encoding mainly involves: DCT, Zigzag encoding, quantization, RLE coding, paradigm HUFFMAN encoding, DC (DC component) encoding. The JPEG encoding process is shown in Figure 4. Figure 4 JPEG encoding process DCRETE COSINE TRANSFORM transformation, also known as discrete cosine transformation is reversible, discrete quadrature transformation. It converts the original image color spatial domain into a spectrum domain. Since the neighbor two-point pixel color is many, compressing these unwanted data must utilize the spectrum characteristics of the image signal. The theoretical basis for the principle of JPEG compression is that the image signal spectrum line is largely distributed in the range of 0 to 6 MHz, and most of the images are low frequent frequency lines, while high-frequency lines only account for the image ratio of image proportion. The signal of the fine texture details appear. According to this feature, the number of bits are allocated to the low spectrum area containing the amount of information when doing digital image processing, and the opposite is the purpose of image compression to the number of images compressed for high spectrum regions containing low information low. And the image quality does not have a decrease in naked eye. In addition to DCT transformation, commonly used variation algorithms include: Walshhadamard Walshhamma transform, Har transformation, Fu Shi. The DCT transform formula is: When C (U) = 1, C (V) = 1.f (i, j) After the DCT transformation, F (0, 0) is a DC coefficient, and the other parameters are AC coefficients. After the DCT transform, the DCT coefficient block of the image is concentrated on the upper left of the 8 × 8 matrix. The DC DC coefficient is the largest, and this matrix area concentrates most of the low frequency bandcand components of the image, the farther high from the upper left corner of the matrix. The frequency spectrum is almost free of image information. Although the transformation process itself does not generate compression, the frequency coefficient after transform is very conducive to the compression rate. Quantization is an optimization process for the DCT coefficient, which uses the high-frequency insensitive characteristics of the naked eye to significantly compress the data. The entire process is simple to divide each component of the frequency domain, and the result is rounded, the purpose of the entire process is to reduce non-zero coefficients and increase the number of zero value factors. Quantization is a lossy operation, which is the main factor in the decline in image quality. For the human eye, the sensitivity of the brightness and color difference is inconsistent, and the brightness quantization table is used to quantify the color quantization table. The quantized data is used as Zigzag serpentine coding because the AC component contains a large number of zero values, and Zigzag encoding can generate more consecutive zero values, which is very advantageous for the next step. Run Length Coding is an algorithm for simplifying a simplified representation of a situation in succession according to the same data. For example, 5555333333999 may be (5, 4) (3, 6) (9, 3) according to the stroke coding, in particular a large amount of zero value compressed data length. The encoded data must also be compressed by Huffman encoding. The maximum feature of Huffman encoding is that the number of frequent frequencies is less than 8 bits, while the number of frequent frequencies is greater than 8 bits, which makes the data significantly compressed. At the end of the compression process of this data, the compressed data is saved in accordance with the JPEG file format, plus file start tag start of image = ffd8, file end tag end of image = ffd9, quantization table mark define quantization table = ffdb, Hoffman Code Table Tag DDFINE HUFFMAN TABLE = FFC4, Frame Start Mark START OF FRAME = FFC0, etc. The word interface is uninterrupted to send the JPEG image to form a MJPEG video stream. In order to improve the efficiency of CPU, reduce the overhead of inter-process switching, integrate the compression algorithm function into a single thread. JPEG core compression encoding function Mcucode is implemented as follows: UINT8_T * MCUCODE (S_JPEG_Encoder_Structure * ENC, UINT32_T Image_FORMAT, UINT8_T * OUTPUT_PTR) { DCT (ENC> Y1); // DCT Discrete Cosine Transformation Function Quantization (ENC, ENC> Y1, ENC > ILQT); // Quantization function, brightness quantization table quantization and arranges in Zigzag Output_ptr = huffman (eNC, component_y, output_ptr); // Hoffman encoding function DCT (ENC> Y2) ...... DCT (ENC> Y3) ...... DCT (ENC> Y4) ...... DCT (ENC> CB); // DCT Discrete Cosine Transformation Function Quantization (ENC, ENC > CB, ENC> ICQT); // Quantization function, color measure quantization table quantization S3C2440A Web video camera TCP / IP Agreement

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us