Multi-channel image bidirectional transmission and display switching method and system, and storage medium
By employing a timing chain coordination method involving cross-clock domain synchronization, driving pixel clock switching, and frame boundary reset, the problem of image transmission and display switching between the ARM processor and the FPGA was solved, achieving flicker-free seamless switching and low-cost, high-real-time image display.
Patent Information
- Application Number
- CN202611465020.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-11-27
AI Technical Summary
In the existing technology, the image transmission and display switching between ARM processor and FPGA has problems such as high hardware cost, increased power consumption, reduced real-time performance and discontinuous display, especially when switching between different display sources, tearing or flickering is likely to occur.
A timing chain coordination method involving cross-clock domain synchronization, driving pixel clock switching, and frame boundary reset is adopted. Image data format conversion and display mode switching are implemented through FPGA on-chip logic, avoiding metastability caused by asynchronous signal sampling, and completing display mode switching within the frame blanking period.
It achieves flicker-free and seamless switching between infrared images and ARM-returned images, reducing hardware costs and power consumption, improving system integration and real-time performance, and avoiding screen tearing and flickering.
Smart Images

Figure CN123185301A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of embedded image processing technology, specifically relating to a method, system, and storage medium for multi-channel bidirectional image transmission and display switching. Background Technology
[0002] With the development of embedded image processing technology, heterogeneous processing architectures combining ARM processors and FPGAs have been widely used in handheld observation devices, infrared thermal imaging devices, and airborne / vehicle-mounted optoelectronic pods. In this architecture, the ARM processor is responsible for human-computer interaction and video processing, while the FPGA is responsible for image acquisition, preprocessing, and display driving from multiple sensors. Image data transmission between the two is a crucial component of the entire system.
[0003] In terms of display and transmission formats, the images processed internally by the FPGA are usually in RGB format, which is suitable for directly driving the display screen, while the video input interface of the ARM processor usually requires Bayer RAW or YUV format; at the same time, the system also needs to support switching between multiple display modes such as real-time images from the sensor and playback images from the ARM processor.
[0004] In existing technologies, the main methods for realizing image transmission between FPGA and ARM processor are: First, setting up a dedicated video format conversion chip between the FPGA and the ARM processor to convert the image signal output by the FPGA into a format that the ARM processor can receive; Second, the FPGA directly transmits image data to the ARM processor through a parallel interface, and the software on the ARM processor side completes the format conversion; Third, the entire system uses a unified pixel clock, and image data from different display sources are first buffered across clock domains before being output and displayed.
[0005] However, the aforementioned image transmission methods all rely on additional resources such as off-chip components, software processing, or frame buffers, leading to increased hardware costs and power consumption, and decreased real-time performance. Specifically: using a dedicated conversion chip requires additional chips and occupies circuit board space, increasing material costs and system power consumption; using software conversion consumes ARM processor computing resources, affecting the real-time performance of image transmission; using a unified pixel clock and frame buffer requires additional frame buffer resources, further increasing hardware costs. Furthermore, the pixel clocks of different display sources are usually independent. If the display source is switched directly without frame buffering, screen tearing or flickering will occur, and the display device will briefly lose lock due to clock abrupt changes, generating uncertain image noise at the moment of switching, making it difficult to guarantee the continuity of the display when switching between different display sources. Therefore, how to improve the integration and real-time performance of multi-channel image transmission and display switching between ARM processors and FPGAs, and ensure the continuity of the displayed image when switching display sources, has become a technical problem that urgently needs to be solved in this field.
[0006] It should be noted that the above content is only used to help understand the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention
[0007] The main objective of this application is to provide a method, system, and storage medium for bidirectional transmission and display switching of multi-channel images, aiming to solve the technical problem of how to improve the integration and real-time performance of multi-channel image transmission and display switching between ARM processors and FPGAs, and to ensure the continuity of the displayed image when switching display sources.
[0008] To achieve the above objectives, this application provides a multi-channel bidirectional image transmission and display switching method, applied to an image processing system including a programmable logic device (FPGA) and an ARM processor. The ARM processor includes a video input interface and an LCD output interface. The FPGA converts image data into a format acceptable to the video input interface and then inputs it to the ARM processor via the video input interface. The ARM processor inputs image data output from the LCD output interface into the FPGA. The method includes: The FPGA drives the display device to display local image source images using a local pixel clock. The local image source images include infrared detector images. The FPGA receives the display mode switching signal and, in response to the display mode switching signal, synchronizes the display mode switching signal from the local pixel clock domain to the pixel clock output domain of the FPGA through cross-clock domain synchronization processing, so as to control the FPGA output driving pixel clock to switch from the local pixel clock to the LCD output clock of the ARM processor. The FPGA detects the rising edge of the field synchronization signal in the pixel clock output domain and resets the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal, switching the display screen from the local image source display mode to the ARM feedback image display mode, so that the image source switching is completed within the frame blanking period. Through a coordinated timing chain of "cross-clock domain synchronization, driving pixel clock switching, and frame boundary reset": the display mode switching signal is first processed through cross-clock domain synchronization to avoid metastability caused by direct sampling of asynchronous signals, ensuring reliable switching control; after the driving pixel clock switches between the local pixel clock and the LCD output clock of the ARM processor, the display logic is reset at the complete frame boundary corresponding to the rising edge of the field synchronization signal, so that the display screen switching action falls within the frame blanking period. During the blanking period, there is no effective pixel output, and the display device outputs a complete frame before and after the switching, thereby avoiding display screen tearing, flickering, and noise caused by clock sudden loss of lock-up in the display device. This achieves flicker-free and seamless switching between infrared images and ARM-returned images. At the same time, the above-mentioned switching timing chain and bidirectional image transmission link are all implemented by the FPGA on-chip logic, without the need for external conversion chips, software conversion, or frame buffers and other additional resources. This helps to reduce hardware costs and power consumption, does not occupy ARM processor computing resources, and ensures display continuity while taking into account system integration and real-time performance.
[0009] Preferably, the multi-channel image bidirectional transmission and display switching method further includes a step of initiating hierarchical isolation: After the image processing system is powered on, the FPGA completes the configuration before the ARM processor. Before the ARM processor completes the operating system startup, the FPGA sets the interface signals output to the ARM processor to an invalid level to isolate the interface signals.
[0010] After the system is powered on, the FPGA completes the configuration before the ARM processor. Before the ARM processor finishes the operating system startup, the interface signal output to the ARM processor is set to an invalid level. This ensures that the video input interface, which has not yet been initialized, always samples a definite level, preventing it from sampling an uncertain level and entering an error state or triggering the interface protection mechanism. This helps ensure the safe startup of the ARM processor, and the transmission link can be put into operation after the ARM processor starts up.
[0011] Preferably, the tiered isolation initiation steps specifically include: After the system clock is locked, the FPGA starts a delay count and sets the first-level soft reset threshold and the second-level soft reset threshold. When the count value is less than the first-level soft reset threshold, the FPGA internal logic is reset. When the count value is greater than the first-level soft reset threshold and less than the second-level soft reset threshold, the FPGA internal logic works normally, and the interface signal output to the ARM processor is forced to a low level through the AND gate logic. The interface signal includes at least the DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. After the ARM processor completes the operating system startup and pulls the ARM soft reset signal high, the FPGA releases the isolation of the interface signals and enables the output.
[0012] When the count value is less than the first-level soft reset threshold, the FPGA's internal logic is in a reset state, ensuring that the FPGA starts in a self-determined state after power-on and preventing the propagation of an undetermined state through the interface. When the count value is between the two thresholds, the FPGA's internal logic works normally while the interface signal is set to a low level through AND gate logic, forming a hierarchical timing sequence of "FPGA works first, ARM connects later," which matches the second-level startup time of the ARM processor operating system. The six signals of DVP pixel clock, line synchronization, field synchronization, data bus and serial port, and SPI are uniformly set low by AND gate hardware. The isolation action is completed purely in hardware, with precise timing and no software intervention required, avoiding the omission of any signal related to clock, synchronization, data, and control. After the ARM soft reset signal is pulled high, the isolation is released and the output is enabled, and the startup is seamlessly connected with the link opening.
[0013] Preferably, the FPGA converts the image data into a format acceptable to the video input interface, specifically including: The FPGA outputs 24-bit RGB pixel data; The FPGA performs multi-level pixel delay alignment processing on its output 24-bit RGB image data to align the DVP line synchronization signal and the DVP field synchronization signal with the 24-bit RGB pixel data, thus obtaining the aligned RGB pixel data. The color components of the aligned RGB pixel data are reordered to obtain reordered RGB pixel data, which is adapted to the color component arrangement order of the ARM processor. The reordered RGB pixel data is converted into 8-bit Bayer RAW format data and used as image data input to the video input interface.
[0014] The 24-bit RGB pixel data is converted into 8-bit BayerRAW format data after multi-level pixel delay alignment and color component reordering. All of this is done in real time by the FPGA on-chip hardware, without occupying the ARM processor's computing resources, which helps ensure the real-time performance of image transmission. Multi-level pixel delay alignment ensures that the DVP horizontal sync signal and DVP vertical sync signal are aligned with the pixel data frame by frame, avoiding misalignment in subsequent encoding and sampling. Color component reordering makes the data match the color component arrangement requirements of the ARM processor's video input interface, avoiding color distortion after decoding on the ARM processor side. The data bit width is reduced from 24 bits to 8 bits, which is compatible with the receiving format of the video input interface.
[0015] Preferably, the method further includes a digital video interface timing coding step: The FPGA generates DVP timing signals using row and column counters: the row counter increments on the falling edge of the data enable signal and is cleared on the rising edge of the field synchronization signal, while the column counter increments during the active period of the data enable signal. When the column count value equals the first column and the row count value equals the first row, a frame start marker signal TUSER is generated, representing the start of a frame of image. When the column count value equals the image width, a row end marker signal TLAST is generated to indicate the end of a row of images; The 8-bit Bayer RAW format data is encoded according to the DVP timing signal and then output to the video input interface.
[0016] The DVP timing signal is generated by the row and column counters. The row and column counts are cleared to zero by the edge drive of the data enable signal and the DVP field synchronization signal, respectively. The timing is generated by hardware and has no accumulated error. The frame start marker signal TUSER marks the start of a frame and the row end marker signal TLAST marks the end of a row. The ARM processor uses this to identify the frame boundary and row boundary to avoid frame misalignment or row misalignment when receiving images, and to ensure that the ARM processor can correctly reassemble the image frame.
[0017] Preferably, the method further includes an effective region adaptive extraction step: The FPGA counts the rows and columns of the complete image frame sent by the ARM processor using row and column counters. The field synchronization signal of the complete image frame resets the row and column counters as the frame start flag. The row counter increments under the row synchronization signal of the complete image frame, and the column counter increments under the LCD output clock of the ARM processor. Based on the preset cropping start coordinates and cropping size parameters, a cropping data enable signal is generated when the column count value is greater than or equal to the cropping start X coordinate and less than the sum of the cropping start X coordinate and the cropping width, and the row count value is greater than or equal to the cropping start Y coordinate and less than the sum of the cropping start Y coordinate and the cropping height. The rectangular effective image area is then extracted from the complete image frame to adapt to the display device.
[0018] The system counts rows and columns of the complete image frame sent by the ARM processor, generates a cropping data enable signal according to the preset cropping start coordinates and cropping size parameters, and extracts only the pixels within the valid period from the complete image frame, automatically extracting a rectangular valid image area that fits the display device perfectly. When facing different ARM processors with different display output resolutions, only the two sets of parameters, cropping start coordinates and cropping size, need to be modified to complete the adaptation without changing the hardware logic, which helps to solve the problem of resolution adaptive matching difficulties.
[0019] Furthermore, to achieve the above objectives, this application also provides a multi-channel image bidirectional transmission and display switching system, comprising: The ARM processor features a video input interface and an LCD output interface. A programmable logic device (FPGA) establishes a bidirectional image transmission link with an ARM processor: the first direction is that the FPGA converts the image data into a format that can be received by the video input interface and then sends it to the ARM processor through the video input interface; the second direction is that the ARM processor sends the image data output from the LCD output interface to the FPGA. Display device, connected to the image output terminal of FPGA; The clock switching unit, located on the FPGA chip, includes a clock multiplexer, a cross-clock domain synchronizer, and frame boundary switching control logic. The clock multiplexer has a first clock input, a second clock input, and a selection terminal. The first clock input is connected to the local pixel clock, the second clock input is connected to the LCD output clock of the ARM processor, and the selection terminal is connected to the display mode switching signal, which is used to switch the FPGA output driving pixel clock between the local image source display mode and the ARM feedback image display mode. A cross-clock domain synchronizer is connected between the selection terminal and the pixel clock output domain of the clock multiplexer to synchronize the display mode switching signal from the local pixel clock domain to the pixel clock output domain. The frame boundary switching control logic is connected to the output of the clock multiplexer. It is used to detect the rising edge of the field synchronization signal in the pixel clock output domain after the display mode switching signal takes effect, and reset the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal, so that the image source switching is completed within the frame blanking period.
[0020] Preferably, it also includes an ARM soft reset hierarchical isolation module, located within the FPGA chip. The ARM soft reset hierarchical isolation module includes: A delay counter is used to start counting after the system clock is locked, and it has a first-level soft reset threshold and a second-level soft reset threshold. AND gate logic is used to force the interface signals output from the FPGA to the ARM processor to a low level when the count value is greater than the first-level soft reset threshold and less than the second-level soft reset threshold. The interface signals include DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. The ARM soft reset hierarchical isolation module is also used to release the isolation of interface signals and enable output after the ARM processor completes the operating system startup and pulls the ARM soft reset signal high.
[0021] Preferably, it also includes an RGB to Bayer format conversion and digital video interface encoding module, located on-chip within the FPGA, the module comprising: The pixel delay alignment register unit is used to perform multi-level delay alignment on the DVP line synchronization signal, the DVP field synchronization signal and the 24-bit RGB pixel data; The color component reordering logic unit is used to reorder the standard RGB arrangement into a color component arrangement order adapted to the ARM processor. The RGB to Bayer conversion unit is used to convert the reordered RGB pixel data into 8-bit Bayer RAW format data; and The DVP timing encoding unit is used to generate DVP timing signals through row and column counters. When the column count value is equal to the first column and the row count value is equal to the first row, it generates a frame start marker signal TUSER. When the column count value is equal to the image width, it generates a row end marker signal TLAST. It then encodes 8-bit Bayer RAW format data according to the DVP timing signals and outputs it to the ARM processor through the video input interface.
[0022] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a program, which, when executed by a processor, implements a method for bidirectional transmission and display switching of multi-channel images.
[0023] This invention provides a multi-channel image bidirectional transmission and display switching method, system, and storage medium with the following advantages: Through a coordinated timing chain of "cross-clock domain synchronization, driving pixel clock switching, and frame boundary reset": the display mode switching signal is first processed through cross-clock domain synchronization, avoiding metastability caused by direct sampling of asynchronous signals and ensuring reliable switching control; after the driving pixel clock switches between the local pixel clock and the LCD output clock of the ARM processor, the display logic is reset at the complete frame boundary corresponding to the rising edge of the field synchronization signal, ensuring that the display screen switching action falls within the frame blanking period. During the blanking period, there is no effective pixel output, and the display device outputs a complete frame before and after the switch, thereby avoiding display screen tearing, flickering, and noise caused by clock sudden changes. This achieves flicker-free and seamless switching between infrared images and ARM-returned images. Simultaneously, the above-mentioned switching timing chain and bidirectional image transmission link are all implemented by on-chip FPGA logic, eliminating the need for external conversion chips, software conversion, or frame buffers and other additional resources. This helps reduce hardware costs and power consumption, avoids occupying ARM processor computing resources, and ensures display continuity while maintaining system integration and real-time performance. Attached Figure Description
[0024] Figure 1 This illustration shows a flowchart of a multi-channel image bidirectional transmission and display switching method provided in an exemplary embodiment of this application; Figure 2 This invention provides a schematic diagram of the startup hierarchical isolation steps according to an exemplary embodiment of the present application. Figure 3 This illustration shows a schematic block diagram of a multi-channel image bidirectional transmission and display switching system provided in an exemplary embodiment of this application; Figure 4 This illustration shows an effective region clipping diagram provided by an exemplary embodiment of this application; Figure 5 This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0026] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0027] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0028] This embodiment uses a handheld infrared thermal imaging observation device as the application scenario. The device adopts a heterogeneous processing architecture that combines an ARM processor and an FPGA. It needs to support multiple display modes such as real-time images from the infrared detector, white light images, and video playback images, and needs to realize bidirectional image transmission between the FPGA and the ARM processor.
[0029] Key terms involved in this embodiment: DVP (Digital Video Port), a parallel video interface standard that includes pixel clock, line synchronization, field synchronization, and data bus signals; Bayer RAW format, the raw data format output by an image sensor, where each pixel contains only one of the three primary colors: red, green, and blue; BUFGMUX, a global clock buffer multiplexer, a native hard-core resource on the FPGA chip that enables glitch-free switching between two clock input sources; XPM_CDC, a cross-clock domain synchronization primitive used to securely transmit signals between different clock domains to avoid metastability.
[0030] On the one hand, this application provides a method for switching between bidirectional transmission and display of multi-channel images, such as... Figures 1-4The image processing system shown includes an FPGA and an ARM processor. The ARM processor includes a video input interface and an LCD output interface. The FPGA converts the image data into a format acceptable to the video input interface and then inputs it to the ARM processor via the video input interface. The ARM processor inputs the image data output from the LCD output interface back into the FPGA. Figure 1 As shown, the method includes: S100 and FPGA drive the display device to display local image source images using local pixel clocks. The local image source images include infrared detector images. S200: The FPGA receives the display mode switching signal and, in response to the display mode switching signal, synchronizes the display mode switching signal from the local pixel clock domain to the pixel clock output domain of the FPGA through cross-clock domain synchronization processing, so as to control the FPGA output driving pixel clock to switch from the local pixel clock to the LCD output clock of the ARM processor. The S300 and FPGA detect the rising edge of the field synchronization signal in the pixel clock output domain and reset the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal. This switches the display screen from the local image source display mode to the ARM return image display mode, ensuring that the image source switching is completed within the frame blanking period. Specifically, such as Figure 3 As shown, the image processing system includes an FPGA, an ARM processor, and a display device. The ARM processor's video input interface is a VI / CSI interface supporting Bayer RAW format, and the LCD output interface outputs parallel image data with pixel clock, horizontal synchronization, vertical synchronization, and a data bus. A bidirectional image transmission link is thus established between the FPGA and the ARM processor: In the first direction, the FPGA acquires images from the infrared detector, preprocesses them, converts them into a format acceptable to the video input interface, and sends them to the ARM processor for encoding, storage, and other processing; in the second direction, the ARM processor sends image data (such as white light images or video playback images) output from the LCD output interface to the FPGA for display.
[0031] The display device is an OLED display, with a resolution of 1024×768 in this embodiment. The local pixel clock is generated by the on-chip PLL of the FPGA at a frequency of 54MHz. After the system powers on and enters infrared display mode, the FPGA drives the OLED display with this 54MHz local pixel clock. The infrared detector image, after scaling and preprocessing, is sent to the display device as the local image source image.
[0032] A display mode switching signal is generated when the user switches to white light display mode or video playback mode. In this embodiment, the display mode switching signal is valid when white light display enable or video playback enable is active. Since the display mode switching signal is generated in the local pixel clock domain (54MHz domain), while the switched driving pixel clock is the LCD output clock of the ARM processor, the two belong to different clock domains. If the display mode switching signal is directly sent to the target clock domain, metastability will occur due to insufficient setup / hold time. Therefore, the display mode switching signal is first processed by cross-clock domain synchronization: the XPM_CDC synchronization primitive synchronizes the single-bit display mode switching signal from the 54MHz local pixel clock domain to the pixel clock output domain of the FPGA (i.e., the output clock domain of the clock multiplexer). XPM_CDC samples the signal step by step through multiple flip-flops to make the output signal stable in the target clock domain, thereby preventing metastability from propagating downstream.
[0033] The synchronized display mode switching signal controls the clock multiplexing selector, switching the FPGA output driving pixel clock from the local 54MHz pixel clock to the ARM processor's LCD output clock. The clock multiplexing selector is implemented using the FPGA's native on-chip BUFGMUX hard core resource, rather than a clock MUX built with combinational logic: the BUFGMUX does not produce glitches when switching between the two input clocks, and the output is directly connected to the global clock network, avoiding glitch clocks that could cause the display logic to trigger incorrectly.
[0034] After the clock switching is complete, the FPGA does not immediately switch the display screen. Instead, it detects the rising edge of the field synchronization signal (VS) in the pixel clock output domain. The rising edge of VS corresponds to the start of a new complete frame. At the boundary of the complete frame corresponding to this rising edge, the display logic is reset, causing the display screen to switch from the local image source display mode to the ARM feedback image display mode. Since the reset and switching actions occur during the frame blanking period, during which there is no effective pixel output, the display device outputs a complete frame before and after the switching, thereby achieving a flicker-free and seamless switching between the infrared image and the ARM feedback image.
[0035] Through a coordinated timing chain of "cross-clock domain synchronization, driving pixel clock switching, and frame boundary reset": the display mode switching signal is first processed through cross-clock domain synchronization to avoid metastability caused by direct sampling of asynchronous signals, ensuring reliable switching control; after the driving pixel clock switches between the local pixel clock and the LCD output clock of the ARM processor, the display logic is reset at the complete frame boundary corresponding to the rising edge of the field synchronization signal, so that the display screen switching action falls within the frame blanking period. During the blanking period, there is no effective pixel output, and the display device outputs a complete frame before and after the switching, thereby avoiding display screen tearing, flickering, and noise caused by clock sudden loss of lock-up in the display device. This achieves flicker-free and seamless switching between infrared images and ARM-returned images. At the same time, the above-mentioned switching timing chain and bidirectional image transmission link are all implemented by the FPGA on-chip logic, without the need for external conversion chips, software conversion, or frame buffers and other additional resources. This helps to reduce hardware costs and power consumption, does not occupy ARM processor computing resources, and ensures display continuity while taking into account system integration and real-time performance.
[0036] In one specific feasible implementation, the multi-channel image bidirectional transmission and display switching method also includes an initiation hierarchical isolation step: After the image processing system is powered on, the FPGA completes the configuration before the ARM processor. Before the ARM processor completes the operating system startup, the FPGA sets the interface signals output to the ARM processor to an invalid level to isolate the interface signals.
[0037] Specifically, an FPGA can complete configuration and enter working state in just a few hundred milliseconds after power-on, while an ARM processor running an operating system such as Linux takes several seconds to boot. During the period before the ARM processor completes its operating system boot, its video input interface has not yet been initialized. If the interface signal output by the FPGA is in an uncertain state at this time, the ARM processor's video input interface may sample an uncertain level and enter an error state, or even trigger the interface protection mechanism. Therefore, after completing configuration, the FPGA enters a hierarchical isolation process: before the ARM processor completes its operating system boot, the FPGA sets its interface signal output to the ARM processor to an invalid level. In this embodiment, the invalid level is a low level, ensuring that the ARM processor always samples a definite level, thereby isolating the interface signal.
[0038] After the system is powered on, the FPGA completes the configuration before the ARM processor. Before the ARM processor finishes the operating system startup, the interface signal output to the ARM processor is set to an invalid level. This ensures that the video input interface, which has not yet been initialized, always samples a definite level, preventing it from sampling an uncertain level and entering an error state or triggering the interface protection mechanism. This helps ensure the safe startup of the ARM processor, and the transmission link can be put into operation after the ARM processor starts up.
[0039] In a specific feasible implementation, such as Figure 2 As shown, the specific steps to initiate tiered isolation include: After the system clock is locked, the FPGA starts a delay count and sets the first-level soft reset threshold and the second-level soft reset threshold. When the count value is less than the first-level soft reset threshold, the FPGA internal logic is reset. When the count value is greater than the first-level soft reset threshold and less than the second-level soft reset threshold, the FPGA internal logic works normally, and the interface signal output to the ARM processor is forced to a low level through the AND gate logic. The interface signal includes at least the DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. After the ARM processor completes the operating system startup and pulls the ARM soft reset signal high, the FPGA releases the isolation of the interface signals and enables the output.
[0040] Specifically, the delay counting is implemented using a 32-bit delay counter, with the counting clock being the 50MHz clock output by the system PLL. The 32-bit delay counter starts counting after the system PLL is locked. The first-level soft reset threshold corresponds to the time required for the FPGA's internal logic to stabilize; in this embodiment, it is set to 200ms, i.e., a count value of 10,000,000. The second-level soft reset threshold corresponds to the conservative time required for the ARM processor's operating system to start; in this embodiment, it is set to 4s, i.e., a count value of 200,000,000. The 32-bit counting width is approximately 4.29 × 10⁻⁶. 9 Sufficient margin is left for this count value.
[0041] The control is implemented in three levels: When the count value is less than 10,000,000, the FPGA's internal logic is in a reset state, ensuring that the logic starts automatically after power-on. When the count value is greater than 10,000,000 but less than 200,000,000, the FPGA's internal logic is released and reset, and it operates normally. However, the six interface signals output to the ARM processor—DVP pixel clock signal, DVP horizontal synchronization signal, DVP vertical synchronization signal, DVP 8-bit data bus signal, serial port signal between the FPGA and the ARM processor, and SPI data signal—are all processed through AND gate logic. One input of the AND gate is the corresponding interface signal, and the other input is the isolation enable signal. During the isolation enable period, each interface signal is forcibly pulled low to achieve output isolation. When the ARM processor completes the operating system startup and pulls the ARM soft reset signal high, the isolation enable is disabled, the AND gate output follows the interface signal, the FPGA releases the isolation and enables the output, and the bidirectional transmission link enters normal operation. When the count value is less than the first-level soft reset threshold, the FPGA's internal logic is in a reset state, ensuring that the FPGA starts in a self-determined state after power-on and preventing the propagation of an undetermined state through the interface. When the count value is between the two thresholds, the FPGA's internal logic works normally while the interface signal is set to a low level through AND gate logic, forming a hierarchical timing sequence of "FPGA works first, ARM connects later," which matches the second-level startup time of the ARM processor operating system. The six signals of DVP pixel clock, line synchronization, field synchronization, data bus and serial port, and SPI are uniformly set low by AND gate hardware. The isolation action is completed purely in hardware, with precise timing and no software intervention required, avoiding the omission of any signal related to clock, synchronization, data, and control. After the ARM soft reset signal is pulled high, the isolation is released and the output is enabled, and the startup is seamlessly connected with the link opening.
[0042] In one specific implementation, the FPGA converts image data into a format acceptable to the video input interface, specifically including: The FPGA outputs 24-bit RGB pixel data; The FPGA performs multi-level pixel delay alignment processing on its output 24-bit RGB image data to align the DVP line synchronization signal and the DVP field synchronization signal with the 24-bit RGB pixel data, thus obtaining the aligned RGB pixel data. The color components of the aligned RGB pixel data are reordered to obtain reordered RGB pixel data, which is adapted to the color component arrangement order of the ARM processor. The reordered RGB pixel data is converted into 8-bit Bayer RAW format data and used as image data input to the video input interface.
[0043] Specifically, the 24-bit RGB pixel data displayed by the display device is simultaneously sent to the format conversion path. First, the 24-bit RGB pixel data passes through a 5-stage pixel delay alignment register unit: each register is timed according to the pixel clock to ensure that the data path delay matches the delays of the DVP horizontal sync signal and the DVP vertical sync signal path, guaranteeing that the synchronization signal is aligned with the pixel data frame-by-frame during subsequent encoding. Then, the aligned 24-bit RGB pixel data enters the color component reordering logic unit: the components of the 24-bit RGB pixel data before reordering are structured as follows... ,in The original red component, The original green component, The original blue component is used; the reordering logic rearranges the standard RGB arrangement into an RGB order adapted to the ARM processor, matching the ARM processor's video input interface requirements for color component arrangement. Finally, the reordered RGB pixel data is converted to 8-bit Bayer RAW format data by the RGB to Bayer IP core, retaining only one color component per pixel, reducing the data bit width from 24 bits to 8 bits, becoming image data that the video input interface can directly receive. All of the above conversions are completed in real-time by the FPGA's on-chip hardware logic, without consuming the ARM processor's computing resources. The 24-bit RGB pixel data is converted into 8-bit BayerRAW format data after multi-level pixel delay alignment and color component reordering. All of this is done in real time by the FPGA on-chip hardware, without occupying the ARM processor's computing resources, which helps ensure the real-time performance of image transmission. Multi-level pixel delay alignment ensures that the DVP horizontal sync signal and DVP vertical sync signal are aligned with the pixel data frame by frame, avoiding misalignment in subsequent encoding and sampling. Color component reordering makes the data match the color component arrangement requirements of the ARM processor's video input interface, avoiding color distortion after decoding on the ARM processor side. The data bit width is reduced from 24 bits to 8 bits, which is compatible with the receiving format of the video input interface.
[0044] In one specific implementation, the method further includes a digital video interface timing coding step: The FPGA generates DVP timing signals using row and column counters: the row counter increments on the falling edge of the data enable signal and is cleared on the rising edge of the field synchronization signal, while the column counter increments during the active period of the data enable signal. When the column count value equals the first column and the row count value equals the first row, a frame start marker signal TUSER is generated, representing the start of a frame of image. When the column count value equals the image width, a row end marker signal TLAST is generated to indicate the end of a row of images; The 8-bit Bayer RAW format data is encoded according to the DVP timing signal and then output to the video input interface.
[0045] Specifically, the row and column counters include a row counter and a column counter: the row counter increments on the falling edge of the data enable signal DE, increments by one at the end of each row of valid data, and is reset to zero on the rising edge of the DVP field synchronization signal VS, aligning with the start of the frame; the column counter increments with the pixel clock while the data enable signal DE is active, and is reset to zero on the rising edge of the DVP field synchronization signal VS or when the data enable signal DE is inactive. When the column count is equal to 1 (i.e., the first column) and the row count is equal to 0 (i.e., the first row), a high-level active frame start marker signal TUSER is generated, marking the first valid pixel of a frame; when the column count is equal to the image width of 1024, a high-level active row end marker signal TLAST is generated, marking the last valid pixel of a row. The 8-bit Bayer RAW format data, encoded according to the above DVP timing signals, is output to the ARM processor via the video input interface. The ARM processor identifies frame boundaries based on TUSER and row boundaries based on TLAST, thereby correctly reconstructing the image frame. The DVP timing signal is generated by the row and column counters. The row and column counts are cleared to zero by the edge drive of the data enable signal and the DVP field synchronization signal, respectively. The timing is generated by hardware and has no accumulated error. The frame start marker signal TUSER marks the start of a frame and the row end marker signal TLAST marks the end of a row. The ARM processor uses this to identify the frame boundary and row boundary to avoid frame misalignment or row misalignment when receiving images, and to ensure that the ARM processor can correctly reassemble the image frame.
[0046] In one specific feasible implementation, the method further includes an effective region adaptive extraction step: The FPGA counts the rows and columns of the complete image frame sent by the ARM processor using row and column counters. The field synchronization signal of the complete image frame resets the row and column counters as the frame start flag. The row counter increments under the row synchronization signal of the complete image frame, and the column counter increments under the LCD output clock of the ARM processor. Based on the preset cropping start coordinates and cropping size parameters, a cropping data enable signal is generated when the column count value is greater than or equal to the cropping start X coordinate and less than the sum of the cropping start X coordinate and the cropping width, and the row count value is greater than or equal to the cropping start Y coordinate and less than the sum of the cropping start Y coordinate and the cropping height. The rectangular effective image area is then extracted from the complete image frame to adapt to the display device.
[0047] Specifically, such as Figure 3 and Figure 4As shown, the complete image frame output by the LCD output interface of the ARM processor includes a blanking region, and its effective image area is located at a specific offset position within the frame. Furthermore, the LCD output resolution varies depending on the ARM processor. The FPGA contains row and column counters for adaptive extraction of the effective area: the row and column counters are reset by the field synchronization signal VS of the complete image frame as the frame start flag. The row counter increments under the row synchronization signal HS of the complete image frame, and the column counter increments under the LCD output clock of the ARM processor. The generation condition for the cropping data enable signal is: and ,in For column count values, This is the row count value. , The preset starting coordinates for cropping. , The preset cropping size parameters; when the conditions are met, the cropping data enable signal is valid, and only pixels during the period when the cropping data enable signal is valid are extracted, that is, the rectangular valid image area is extracted from the complete image frame.
[0048] Taking an ARM processor with an LCD output frame of 1249×830 and a display resolution of 1024×768 as an example: Preset cropping starting X coordinate Crop starting Y coordinate Cut width Cutting height This involves extracting a rectangular region with column coordinates from 186 to 1210 and row coordinates from 68 to 836 from the complete image frame as the effective image. The extracted 1024×768 effective image is perfectly suited for OLED displays. For ARM processors with different resolutions, adaptation can be achieved by modifying only the four preset parameters mentioned above, without changing the hardware logic. The complete image frame sent by the ARM processor is counted in rows and columns, and a cropping data enable signal is generated according to the preset cropping start coordinates and cropping size parameters. Only the pixels within the effective period are extracted from the complete image frame, and the rectangular effective image region that perfectly fits the display device is automatically extracted. For different ARM processors with different display output resolutions, adaptation can be achieved by modifying only the cropping start coordinates and cropping size parameters, without changing the hardware logic. This helps to solve the problem of resolution adaptive matching difficulties.
[0049] On the other hand, this application also provides a multi-channel image bidirectional transmission and display switching system, including: The ARM processor features a video input interface and an LCD output interface. A programmable logic device (FPGA) establishes a bidirectional image transmission link with an ARM processor: the first direction is that the FPGA converts the image data into a format that can be received by the video input interface and then sends it to the ARM processor through the video input interface; the second direction is that the ARM processor sends the image data output from the LCD output interface to the FPGA. Display device, connected to the image output terminal of FPGA; The clock switching unit, located on the FPGA chip, includes a clock multiplexer, a cross-clock domain synchronizer, and frame boundary switching control logic. The clock multiplexer has a first clock input, a second clock input, and a selection terminal. The first clock input is connected to the local pixel clock, the second clock input is connected to the LCD output clock of the ARM processor, and the selection terminal is connected to the display mode switching signal, which is used to switch the FPGA output driving pixel clock between the local image source display mode and the ARM feedback image display mode. A cross-clock domain synchronizer is connected between the selection terminal and the pixel clock output domain of the clock multiplexer to synchronize the display mode switching signal from the local pixel clock domain to the pixel clock output domain. The frame boundary switching control logic is connected to the output of the clock multiplexer. It is used to detect the rising edge of the field synchronization signal in the pixel clock output domain after the display mode switching signal takes effect, and reset the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal, so that the image source switching is completed within the frame blanking period.
[0050] Specifically, such as Figure 3As shown, the system includes an FPGA, an ARM processor, a display device, and a clock switching unit located within the FPGA chip. The clock switching unit 10 includes a clock multiplexer, a cross-clock domain synchronizer, and frame boundary switching control logic. The clock multiplexer uses BUFGMUX hard-core resources. Its first clock input I0 is connected to a 54MHz local pixel clock generated by the FPGA's on-chip PLL, corresponding to the infrared display mode; its second clock input I1 is connected to the LCD output clock of the ARM processor, corresponding to the white light display mode and video playback mode; the selection terminal S is connected to the display mode switching signal. When white light display enable or video playback enable is active, S=1, selecting the LCD output clock; otherwise, S=0, selecting the local 54MHz pixel clock. The cross-clock domain synchronizer uses the XPM_CDC synchronization primitive and is connected between the selection terminal S and the pixel clock output domain of the clock multiplexer. The frame boundary switching control logic is connected to the output of the clock multiplexer. After the display mode switching signal takes effect, it detects the rising edge of VS in the pixel clock output domain and resets the display logic. The clock multiplexer, cross-clock domain synchronizer, and frame boundary switching control logic are all located on the FPGA chip. The connection relationship between each component is clear, and they work together to complete the switching timing chain. The system can achieve flicker-free and seamless switching without the need for external format conversion devices and frame buffer resources. It has a simple structure, low cost, and low power consumption, making it easy to integrate into handheld observation equipment, airborne / vehicle-mounted optoelectronic pods, and other devices that are sensitive to size and power consumption.
[0051] In one specific implementation scheme, the multi-channel image bidirectional transmission and display switching system also includes an ARM soft-reset hierarchical isolation module, located within the FPGA chip. The ARM soft-reset hierarchical isolation module includes: A delay counter is used to start counting after the system clock is locked, and it has a first-level soft reset threshold and a second-level soft reset threshold. AND gate logic is used to force the interface signals output from the FPGA to the ARM processor to a low level when the count value is greater than the first-level soft reset threshold and less than the second-level soft reset threshold. The interface signals include DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. The ARM soft reset hierarchical isolation module is also used to release the isolation of interface signals and enable output after the ARM processor completes the operating system startup and pulls the ARM soft reset signal high.
[0052] Specifically, the ARM soft reset hierarchical isolation module includes a 32-bit delay counter and AND gate logic. The delay counter and AND gate logic are modularly housed within the FPGA chip. After power-on, it automatically completes hierarchical isolation and de-isolation of interface signals according to two threshold levels. The entire process is hardware-autonomous and requires no ARM processor software intervention, achieving a safe startup protection effect with a simple circuit structure.
[0053] In one specific implementation, the multi-channel image bidirectional transmission and display switching system also includes an RGB to Bayer format conversion and digital video interface encoding module, located on the FPGA chip. The module includes: The pixel delay alignment register unit is used to perform multi-level delay alignment on the DVP line synchronization signal, the DVP field synchronization signal and the 24-bit RGB pixel data; The color component reordering logic unit is used to reorder the standard RGB arrangement into a color component arrangement order adapted to the ARM processor. The RGB to Bayer conversion unit is used to convert the reordered RGB pixel data into 8-bit Bayer RAW format data; and The DVP timing encoding unit is used to generate DVP timing signals through row and column counters. When the column count value is equal to the first column and the row count value is equal to the first row, it generates a frame start marker signal TUSER. When the column count value is equal to the image width, it generates a row end marker signal TLAST. It then encodes 8-bit Bayer RAW format data according to the DVP timing signals and outputs it to the ARM processor through the video input interface.
[0054] Specifically, the RGB to Bayer format conversion and digital video interface encoding module includes a 5-level pixel delay alignment register unit, a color component reordering logic unit, an RGB to Bayer conversion unit, and a DVP timing encoding unit connected in sequence; the DVP timing encoding unit contains a row and column counter. The pixel delay alignment register unit, color component reordering logic unit, RGB to Bayer conversion unit, and DVP timing encoding unit are connected in sequence to form a pipelined structure. The format conversion and timing encoding are all completed in real time on the FPGA chip, outputting an 8-bit BayerRAW bitstream that can be directly received by the ARM processor's video input interface, achieving real-time conversion and error-free encoding.
[0055] In another aspect, this application also provides a computer-readable storage medium storing a program, which, when executed by a processor, implements a method for bidirectional transmission and display switching of multi-channel images.
[0056] Specifically, the storage medium can be a non-volatile memory such as FLASH, and the program includes a hardware description language (HDL) configuration program for configuring the FPGA or bitstream configuration data compiled from it. After the system is powered on, the bitstream configuration data is loaded from the storage medium to the FPGA, and its internal programmable logic resources are configured as the clock switching unit 10, the ARM soft reset hierarchical isolation module, the RGB to Bayer format conversion and digital video interface encoding module, and the logic required for effective area adaptive extraction, so that the multi-channel image bidirectional transmission and display switching method is executed immediately after the system is powered on.
[0057] In summary, this embodiment achieves high integration, high real-time performance, and screen continuity through a timing chain collaboration of "cross-clock domain synchronization, glitch-free clock switching, and frame boundary reset," ensuring that display source switching does not require additional resources such as off-chip conversion chips, software conversion, or frame buffers, while also guaranteeing that the switching occurs within the frame blanking period. Combined with startup hierarchical isolation, on-chip RGB to Bayer hardware conversion, and effective area adaptive extraction, it realizes bidirectional transmission of multi-channel images and display switching.
[0058] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
[0059] It should be noted that the multi-channel image bidirectional transmission and display switching system provided in this application embodiment is only an example of the above-mentioned division of functional modules / functional units. In practical applications, the above functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the multi-channel image bidirectional transmission and display switching system can be divided into different functional modules / functional units to complete all or part of the functions described above.
[0060] Figure 5This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. The computer device can be a desktop computer, a laptop computer, a handheld computer, or a cloud server, etc. The computer device may include, but is not limited to, a processor and memory. The processor and memory can be connected via a bus or other means. The processor can be a Central Processing Unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0061] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0062] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods in the above embodiments. The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0063] In some embodiments, the computer device may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit, a display screen, and a keyboard.
[0064] Peripheral device interfaces can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory. In some embodiments, the processor, memory, and peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and peripheral device interface can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0065] The display screen is used to display the UI (User Interface). This UI can include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, it also has the ability to collect touch signals on or above the surface of the display. These touch signals can be input as control signals to a processor for processing. In this case, the display screen can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen, located on the front panel of the computer device; in other embodiments, there may be at least two display screens, respectively located on different surfaces of the computer device or in a folded design; in still other embodiments, the display screen may be a flexible display screen, located on a curved or folded surface of the computer device. Furthermore, the display screen can be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0066] A power supply is used to power the various components in a computer device. The power supply can be alternating current (AC), direct current (DC), a disposable battery, or a rechargeable battery. When the power supply includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired connection, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0067] Those skilled in the art will understand that the structure shown in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0068] This application also discloses a computer-readable storage medium. Specifically, the computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the methods described in the above-described method embodiments. Those skilled in the art will understand that implementing all or part of the processes in the methods described above can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0069] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for bidirectional transmission and display switching of multi-channel images, characterized in that, An image processing system including a programmable logic device (FPGA) and an ARM processor is described. The ARM processor includes a video input interface and an LCD output interface. The FPGA converts image data into a format acceptable to the video input interface and then inputs it to the ARM processor via the video input interface. The ARM processor inputs image data output from the LCD output interface into the FPGA. The method includes: The FPGA drives the display device to display a local image source image using a local pixel clock, and the local image source image includes an infrared detector image. The FPGA receives a display mode switching signal and, in response to the display mode switching signal, synchronizes the display mode switching signal from the local pixel clock domain to the pixel clock output domain of the FPGA through cross-clock domain synchronization processing, so as to control the driving pixel clock output by the FPGA to switch from the local pixel clock to the LCD output clock of the ARM processor. The FPGA detects the rising edge of the field synchronization signal in the pixel clock output domain and resets the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal, switching the display screen from the local image source display mode to the ARM return image display mode, so that the image source switching is completed within the frame blanking period.
2. The multi-channel image bidirectional transmission and display switching method according to claim 1, characterized in that, The method also includes initiating a graded isolation step: After the image processing system is powered on, the FPGA completes the configuration before the ARM processor; before the ARM processor completes the operating system startup, the FPGA sets the interface signal output to the ARM processor to an invalid level to isolate the interface signal.
3. The multi-channel image bidirectional transmission and display switching method according to claim 2, characterized in that, The specific steps for initiating tiered isolation include: The FPGA starts a delay count after the system clock is locked, and sets a first-level soft reset threshold and a second-level soft reset threshold. When the count value is less than the first-level soft reset threshold, the internal logic of the FPGA is reset. When the count value is greater than the first-level soft reset threshold and less than the second-level soft reset threshold, the internal logic of the FPGA works normally, and the interface signal output to the ARM processor is forced to a low level through the AND gate logic. The interface signal includes at least the DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. After the ARM processor completes the operating system startup and pulls the ARM soft reset signal high, the FPGA releases the isolation of the interface signal and enables the output.
4. The multi-channel image bidirectional transmission and display switching method according to claim 1, characterized in that, The FPGA converts the image data into a format that the video input interface can accept, specifically including: The FPGA outputs 24-bit RGB pixel data; The FPGA performs multi-level pixel delay alignment processing on its output 24-bit RGB image data to align the DVP line synchronization signal and the DVP field synchronization signal with the 24-bit RGB pixel data, thus obtaining aligned RGB pixel data. The aligned RGB pixel data is reordered by color components to obtain reordered RGB pixel data, which is adapted to the color component arrangement order of the ARM processor. The reordered RGB pixel data is converted into 8-bit Bayer RAW format data and used as image data input to the video input interface.
5. The multi-channel image bidirectional transmission and display switching method according to claim 4, characterized in that, The method also includes a digital video interface timing coding step: The FPGA generates DVP timing signals using row and column counters: the row counter increments on the falling edge of the data enable signal and is cleared on the rising edge of the field synchronization signal, while the column counter increments during the active period of the data enable signal. When the column count value equals the first column and the row count value equals the first row, a frame start marker signal TUSER is generated, representing the start of a frame of image. When the column count value equals the image width, a row end marker signal TLAST is generated to indicate the end of a row of images; The 8-bit Bayer RAW format data is encoded according to the DVP timing signal and then output to the video input interface.
6. The multi-channel image bidirectional transmission and display switching method according to claim 1, characterized in that, The method further includes an effective region adaptive extraction step: The FPGA counts the rows and columns of the complete image frame sent by the ARM processor using a row and column counter. The field synchronization signal of the complete image frame resets the row and column counters as a frame start flag. The row counter increments under the row synchronization signal of the complete image frame, and the column counter increments under the LCD output clock of the ARM processor. Based on the preset cropping start coordinates and cropping size parameters, when the column count value is greater than or equal to the cropping start X coordinate and less than the sum of the cropping start X coordinate and the cropping width, and the row count value is greater than or equal to the cropping start Y coordinate and less than the sum of the cropping start Y coordinate and the cropping height, a cropping data enable signal is generated to extract a rectangular effective image area from the complete image frame to adapt to the display device.
7. A multi-channel image bidirectional transmission and display switching system, characterized in that, include: The ARM processor features a video input interface and an LCD output interface. A programmable logic device (FPGA) establishes a bidirectional image transmission link with the ARM processor: the first direction is that the FPGA converts the image data into a format that the video input interface can accept and then sends it to the ARM processor through the video input interface; The second direction involves the ARM processor sending the image data output from the LCD output interface to the FPGA; The display device is connected to the image output terminal of the FPGA; The clock switching unit is located within the FPGA chip and includes a clock multiplexer, a cross-clock domain synchronizer, and frame boundary switching control logic. The clock multiplexing selector has a first clock input terminal, a second clock input terminal, and a selection terminal. The first clock input terminal is connected to the local pixel clock, the second clock input terminal is connected to the LCD output clock of the ARM processor, and the selection terminal is connected to a display mode switching signal, used to switch the driving pixel clock output by the FPGA between the local image source display mode and the ARM feedback image display mode. The cross-clock domain synchronizer is connected between the selection terminal and the pixel clock output domain of the clock multiplexing selector, and is used to synchronize the display mode switching signal from the local pixel clock domain to the pixel clock output domain. The frame boundary switching control logic is connected to the output of the clock multiplexer. It is used to detect the rising edge of the field synchronization signal of the pixel clock output domain after the display mode switching signal takes effect, and reset the display logic at the complete frame boundary corresponding to the rising edge of the field synchronization signal, so that the image source switching is completed within the frame blanking period.
8. The multi-channel image bidirectional transmission and display switching system according to claim 7, characterized in that, It also includes an ARM soft reset hierarchical isolation module, which is located within the FPGA chip. The ARM soft reset hierarchical isolation module includes: A delay counter is used to start counting after the system clock is locked, and it has a first-level soft reset threshold and a second-level soft reset threshold. AND gate logic is used to force the interface signal output from the FPGA to the ARM processor to a low level when the count value is greater than the first level soft reset threshold and less than the second level soft reset threshold. The interface signal includes DVP pixel clock signal, DVP line synchronization signal, DVP field synchronization signal, DVP data bus signal, serial port signal and SPI data signal. The ARM soft reset hierarchical isolation module is also used to release the isolation of the interface signal and enable output after the ARM processor completes the operating system startup and pulls the ARM soft reset signal high.
9. The multi-channel image bidirectional transmission and display switching system according to claim 7, characterized in that, It also includes an RGB to Bayer format conversion and digital video interface encoding module, located within the FPGA chip, the module comprising: The pixel delay alignment register unit is used to perform multi-level delay alignment on the DVP line synchronization signal, the DVP field synchronization signal and the 24-bit RGB pixel data; A color component reordering logic unit is used to reorder the standard RGB arrangement into a color component arrangement order adapted to the ARM processor. The RGB to Bayer conversion unit is used to convert the reordered RGB pixel data into 8-bit Bayer RAW format data; and The DVP timing encoding unit is used to generate DVP timing signals through row and column counters, generate a frame start marker signal TUSER when the column count value is equal to the first column and the row count value is equal to the first row, generate a row end marker signal TLAST when the column count value is equal to the image width, and output the 8-bit Bayer RAW format data to the ARM processor through the video input interface after encoding the DVP timing signals.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program, which, when executed by a processor, implements the multi-channel image bidirectional transmission and display switching method as described in any one of claims 1 to 6.
