Abstract: This paper introduces the hardware and software design of a vision precision measurement system based on a 32-bit high-performance processor. The absolute displacement value is obtained from the barcode image acquired by the image sensor through a precision positioning algorithm, and high-speed image acquisition is achieved via an Ethernet interface. This system is suitable for various displacement measurements with high-precision positioning. Keywords: ARM; Embedded system; Vision measurement; Barcode Introduction A typical instrument for precision measurement using barcode technology is the NA2000 digital level developed by Leica in 1990. This optoelectronic integrated instrument has many advantages, including fast measurement speed, high accuracy, simple operation, intuitive readings, automatic calculation of height difference and elevation, automatic data recording, computer data processing, and easy integration of reference measurement. Currently, there is limited research on this technology in China. This paper proposes a measurement system scheme based on the ST Semiconductor 32-bit high-performance processor STR912FW44X6. System Structure This system consists of the following parts: barcode scale, optical system, CMOS image acquisition module, STR912 main control board, keyboard and LCD display module, power supply module, and computer testing system. The hardware structure block diagram is shown in Figure 1. The system works as follows: A barcode image with precise position information is imaged onto the photosensitive surface of a CMOS image sensor through an optical system. The STR912FW44X6 processor automatically controls the exposure of the SVI LIS-1024 image sensor, acquires the image information, and processes it using algorithms to obtain the position information carried by the barcode. When the system performs high-speed image acquisition, the STR912FW44X6 processor sends the acquired signal to the computer measurement system via an Ethernet interface for final data processing. Hardware Design Image Acquisition Module: The image acquisition module mainly consists of a linear CMOS image sensor (LIS-1024) and an operational amplifier (TLV2221IDBVR). The video signal is amplified by the operational amplifier and then transmitted to the STR912FW44X6 main processor for A/D conversion, transforming it into a digital image signal. The STR912FW44X6 main processor directly controls the image acquisition timing. The image acquisition module itself does not have an automatic exposure function; changes in ambient light intensity require the main chip to analyze the acquired image signal and then control the image sensor to achieve adaptive ambient light intensity. The main chip of the motherboard module system is the high-performance embedded chip STR912FW44X6 based on the ARM966E-S core, with a processing speed of 96 MIPS and support for single-cycle DSP instructions. The chip's system peripherals include a clock, reset, power management, vector interrupt controller (VIC), internal PLL, RTC, timers, 9 programmable DMA channels, and up to 80 GPIOs. It also features an 8-channel 10-bit ADC, a 3-phase motor controller, PWM output, and various communication interfaces. The chip has dual built-in Flash memory, allowing in-system programming via any communication port. An external 64MB memory chip (ST-M25P64) is connected to expand storage space. The main motherboard peripheral interfaces include a CMOS image sensor interface, an RS-232 interface, an I2C interface, and a 10/100M Ethernet interface. The CMOS image sensor interface primarily enables automatic exposure control and image acquisition. The RS-232 interface (SP3222 chip) facilitates program downloading, communication with the host computer, and receiving control commands. The I2C interface enables communication between the main chip and the keyboard and LCD display modules. The 10/100M Ethernet interface (STE100P chip) works with computer software to achieve high-speed image acquisition. The keyboard module uses an ATMega48 chip for keyboard control and I2C communication, while the LCD screen module uses I2C communication. The system software flowchart is shown in Figure 2. The software functions primarily involve a barcode positioning algorithm, including: Barcode detection: Extracting various feature parameters from the barcode signal, typically including detection of the edge position, center, and width of each barcode, and codeword segmentation. Determining the object-to-image ratio based on known parameters of the scale, simultaneously calculating the viewing distance, calculating the relative distance between the reference position and the target code position, and enlarging it to the actual size d2 according to the object-to-image ratio (accuracy result). Decoding: This is equivalent to the reverse process of source coding, calculating the codeword position d1 (coarse reading result) of the target codeword. The final scale reading ds is the sum of the coarse and fine reading results: ds = d1 + d2. This system uses equally spaced periodic displacement barcodes. Utilizing the equally spaced structure of the barcode, the image-to-object ratio is calculated by extracting the feature spectral lines corresponding to the equally spaced barcodes, thereby obtaining the equivalent width sequence of the barcode. Finally, decoding is achieved based on the periodicity of the barcode. Software Architecture: The entire software uses the embedded operating system mCOS-II as the main carrier. The software is mainly divided into five threads, which work in parallel after the system is powered on. The five threads are: serial port control, I2C interface control, Ethernet interface control, system menu control, data acquisition, and decoding. Test Results: To examine the system performance, a comparison experiment was designed with a micrometer with an accuracy of 0.004 mm. The actual movement of the barcode scale was measured using a micrometer, with each movement being 0.500 mm. A total of 11 measurements were taken, yielding barcode values at 11 different positions. The differences were calculated and compared. The measurement results are shown in Table 1. The measurement data shows that the deviation of the system's measurement data is within ±0.0185 mm, indicating that the system has achieved a certain level of accuracy. A preliminary test of the system's resolution was conducted. Keeping the relative position of the barcode and the measurement system constant, 10 consecutive measurements were taken, as shown in Table 2. The average measurement data was 130.5049 mm, and the system's arithmetic deviation was within ±0.3 mm, meaning the current system's resolution is approximately 0.3 mm. Further improvements in system error calibration and software algorithm enhancement are expected to further improve the system's measurement accuracy. Conclusion This system is an ARM-based precision vision measurement platform that realizes precise barcode measurement. Further development on this platform could lead to a system applicable to one-dimensional and two-dimensional length precision measurements, with broad application prospects. References: 1. Wang Fengpeng, Wang Zhixing, Zhang Xiao, A new algorithm for digital level measurement, Jiangxi Science, 2007, 25(3), 1 2. ST Product Catalog, 2006 3. Zhang Xiao, Wang Zhixing, Li Xiangyin, et al. Displacement measurement using sine barcode ruler, Optoelectronic Engineering, 2005, 32(3)