1. Introduction
With the advent of the post-PC era and the booming development of embedded systems, the use of embedded systems to achieve remote data acquisition has become a trend in social demand. This paper uses embedded systems to collect image data to achieve remote measurement of processed parts, replacing traditional manual inspection. Its characteristics are: networking, high accuracy, and saving manpower and material resources.
2. System hardware and software platform
Due to the limited resources of embedded devices, the software part of the embedded system development needs to be implemented on the host platform, and the host resources are used to compile the software that can be run on the target platform. The host platform of this system is Redhat 9.0, cross-compilation environment: ARM-Linux-Gcc; target platform: UBOOT 1.1, Linux 2.4.18 and YAFFS root file system.
The processor of the system hardware platform is Samsung's S3C2410 processor with an integrated ARM920T core. The processor is rich in resources, with 16KB instruction cache and 16KB data cache, MMU virtual memory manager, LCD controller, support for NAND Flash system boot, RAM controller, 3-channel UART, 4-channel DMA, 4-channel PWM timer, RTC, parallel I/O port, 8-channel 10-bit ADC, touch screen interface, IIC interface, IIS interface, 2 USB interface controllers, 2-channel SPI and internal PLL clock multiplier, with a main frequency of up to 203MHz. In addition, based on the rich resources of the processor, relevant configuration and expansion are also carried out, with 64MB Flash and 64MB SDRAM configured, and two HOST USB interfaces are introduced. The camera Webeye V 2000 with a USB port is connected to the USB interface. Two software modules, image acquisition and image recovery, are established on the embedded Linux operating system. The development board has a CS8900A-CQ3 chip with 10~100M adaptive network communication capability. It can realize the remote transmission of image data. The hardware overview of the whole system is shown in Figure 1:
Figure 1 System hardware structure diagram
3. Collection of RGB data stream
The Webeye V 2000 camera has ov7620, ov511 and a storage chip inside. Since the driver of the ov511 chip is embedded in the Linux operating system, the ov511 driver needs to be loaded when compiling the Linux operating system. The main steps are:
①(*) Select Multimedia device->Video for linux. Load the video4linux module, which provides a programming interface;
② Under USB Support->Catalog (*), select Support for USB and USB Camera OV511 Support. Driver support for USB digital cameras using the OV511 interface chip has been added.
Drive the camera on the embedded Linux operating system platform, and control the camera parameters, image format, window size, etc. through the Video4Linux interface. Video4Linux is the kernel driver for video devices in Linux. It provides a series of interface functions for application programming for video devices. The USB port camera driver needs to provide the implementation of basic I/O operation interface functions open, read, write, and close. The interrupt processing implementation, memory mapping function, and the implementation of the control interface function ioctl for the I/O channel are defined in struct file_operations. This system uses memory mapping, namely mmap(), to capture image or video data. The mmap() function call enables processes to share memory by mapping the same ordinary file. The mapped content area is readable and writable and can be shared between different processes without the need for any data copying. [page]
Function, which is used in user programs to control I/O channels. fd represents the device file descriptor, cmd represents the user program's control command for the device, and the ellipsis generally indicates a parameter of type and length, which may also be absent.
4. Image Restoration
The previous section has introduced the system's acquisition of RGB image data streams. In order to satisfy users' viewing of the acquired image data and corresponding tests, it is necessary to convert the RGB stream into a BMP format image that can be browsed under both Linux and Windows systems. BMP format images are divided into two parts: the file description area and the image storage area. The header file information contains two parts: the information area and the palette area. The information area can be further divided into the file information area and the image information area. The key to restoring BMP images is to first manually generate the header file of the BMP file, and then fill the acquired RGB data stream into the data area of the BMP file. The object photographed is a processed circular part, and its processing is checked to see if it is qualified, the center point position, etc. The following will introduce the data structure and header file of the BMP file, and the image recovery is shown in Figure 2:
[page]
5. Image transmission and processing
The system uses the network (FTP) method to read BMP files. The remote terminal establishes an FTP server to establish a connection between the system and the FTP server, and places the BMP file on the server. The specific command is: FTP open server IP address Put command to place the BMP file on the FTP server. The terminal can obtain the BMP file on the FTP server through the network. The Matlab7.1 application is installed on the terminal, and Matlab7.1 is used for image processing to obtain the median filtering, edge detection, binarization and center point coordinates of the processed parts to check whether the parts are qualified. The specific commands and results are as follows:
The following is the command to extract the center point coordinates:
6. Conclusion
This paper implements image acquisition software and hardware based on embedded platform, conversion of RGB image data stream to BMP file and image processing (median filtering, edge detection, binarization and center point coordinates). Experimental results show that networked detection of processed parts is highly accurate and saves manpower and material resources. It lays a certain foundation for completing robot positioning in the future.
The author's innovation: The embedded Linux platform integrates image acquisition software and hardware, RGB stream and BMP conversion, and the remote terminal processes the part image, realizing a remote detection system with the characteristics of miniaturization, graphics, convenience and economy.
References:
[1]. ARM920T datasheet http://www.dzsc.com/datasheet/ARM920T+_139814.html.
[2]. CS8900A-CQ3 datasheet http://www.dzsc.com/datasheet/CS8900A-CQ3+_593569. html.
[3]. 100M datasheet http://www.dzsc.com/datasheet/100M+_2509927.html.
[4]. ov7620 datasheet http://www.dzsc.com/datasheet/ov7620_525855.html.
Previous article:Design of sensor network gateway based on Linux
Next article:Design of PCB drilling machine controller based on I²C and dual ARM
Recommended ReadingLatest update time:2024-11-16 21:35
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Common usage of MSP430 watchdog and writing method of interrupt function
- MQBoard - MicroPython microframework for managing MQTT
- BT8896A Specification (Zhongke Bluexun)
- What is the amplification factor of this op amp?
- Multisim simulation of infinite gain multi-channel negative feedback (MFB) second-order Butterworth low-pass filter
- Help with "How to select capacitor voltage for VBAT pin of SIM900A?"
- Request a Free VICOR UHV BCM Evaluation Sample
- IBM develops 2-nanometer chip
- NXP MCU development environment installation prompts expiration
- Crazy Shell AI open source drone ADC (joystick control)