Image dynamic clipping and frame buffer method and device

By determining the cropping buffer control information in the image processing system, image frames are alternately written and read in multiple buffers and displayed for adaptation. This solves the problems of inflexible cropping area adjustment and poor adaptability, and improves image processing efficiency and display stability.

CN122265464BActive Publication Date: 2026-07-24HEFEI HAOXIANG AUTO PARTS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI HAOXIANG AUTO PARTS
Filing Date
2026-05-15
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, the cropping area adjustment in image cropping and frame buffering is not flexible enough, the image buffering efficiency is low, the cropped image and the display output are poorly adapted, and it is difficult to adapt to the real-time display changes in continuous video streams.

Method used

By acquiring the image frame sequence to be processed, cropping requirement information, and display adaptation information, cropping buffer control information is determined, including buffer write and cropping read control rules, enabling alternating writing and reading of image frames in the first and second buffers, and output adaptation processing is performed according to the display adaptation information.

Benefits of technology

It improves the flexibility of cropping area adjustment, enhances image caching and cropping processing efficiency, improves the adaptability of cropped images to display output, and reduces cache read/write wait time and processing latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265464B_ABST
    Figure CN122265464B_ABST
Patent Text Reader

Abstract

The application provides an image dynamic cropping and frame buffer method and device, and relates to the technical field of image processing. The method comprises the following steps: in response to an image display task, acquiring a to-be-processed image frame sequence, cropping requirement information and display adaptation information; determining a buffer write control rule and a cropping read control rule according to the cropping requirement information and the display adaptation information; alternately writing the image frame into a first buffer area and a second buffer area based on the buffer write control rule; when the image frame is written in one buffer area, reading buffer frame data corresponding to a target cropping area from another buffer area in which the image frame has been written to obtain cropping frame data; and performing output adaptation processing on the cropping frame data according to the display adaptation information to obtain display image data. Through the method provided by the application, the cropping area adjustment flexibility can be improved, the image buffer and cropping processing efficiency can be improved, and the adaptability between the cropped image and the display output can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing technology, and in particular relates to a method and apparatus for dynamic image cropping and frame buffering. Background Technology

[0002] With the development of automotive displays, industrial vision, security monitoring, and embedded image processing systems, the demand for data adaptation between image acquisition devices and display devices is increasing. In practical applications, the video images output by image acquisition devices typically have high resolution and fixed data formats, while backend display devices or image processing units often only require a local area or a specific size of image content. Therefore, during video image transmission and display, image data typically needs to be buffered, cropped, converted in format, and adapted for output to meet the needs of different display scenarios and image processing tasks.

[0003] In related technologies, image cropping and caching typically rely on pre-defined image dimensions, storage addresses, and output parameters. When the display area, target cropping area, or output resolution changes, the system usually needs to reconfigure the corresponding data transmission parameters or rebuild the image processing flow. This results in inflexible cropping area adjustments, making it difficult to adapt to real-time display changes in continuous video streams. Furthermore, in high-resolution video image processing scenarios, the image data volume is large. If the scheduling between cache read / write, area reading, and display output is not reasonable, it can easily lead to data waiting, increased processing latency, or unstable display. In addition, different display terminals have different resolutions, refresh rates, and synchronization timings. If the cropped image data does not match the display output parameters sufficiently, it may also affect the integrity and stability of the image display.

[0004] Therefore, in video image cropping and frame buffering, the lack of flexibility in adjusting the cropping area, the low efficiency of image buffering, and the poor adaptability of cropped images to display output have become urgent problems to be solved. Summary of the Invention

[0005] This application provides a method and apparatus for dynamic image cropping and frame buffering, aiming to solve the technical problems of insufficient flexibility in adjusting the cropping area, low efficiency in image buffering, and poor adaptability between cropped images and display output in existing video image cropping and frame buffering processes.

[0006] In a first aspect, this application provides a method for dynamic image cropping and frame buffering, the method comprising: In response to an image display task, the system acquires the image frame sequence to be processed, cropping requirements, and display adaptation information. Based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information, cropping cache control information is determined, which includes cache write control rules and cropping read control rules. Based on the cache write control rules, the image frames in the image frame sequence to be processed are alternately written into the first cache area and the second cache area to obtain cache frame data; When one of the first and second buffers performs image frame writing, the buffer frame data corresponding to the target cropping area is read from the other buffer that has already written the image frame, based on the cropping read control rule, to obtain the cropping frame data; The cropped frame data is output and adapted based on the display adaptation information to obtain the display image data.

[0007] In one possible design, determining the cropping buffer control information based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information includes: Based on the image attribute information and the cropping requirement information, the target cropping region description information is determined; Based on the display adaptation information, determine the target output description information; The cropping buffer control information is determined based on the image attribute information, the target cropping region description information, and the target output description information.

[0008] In one possible design, determining the target cropping region description information based on the image attribute information and the cropping requirement information includes: Based on the image attribute information and the cropping requirement information, the initial cropping area information is determined; In response to the cropping adjustment information, the initial cropping area information is updated to obtain the updated cropping area information; Based on the image boundary information corresponding to the image frame sequence to be processed, the updated cropping region information is subjected to boundary constraint processing to obtain the target cropping region description information.

[0009] In one possible design, determining the cropping buffer control information based on the image attribute information, the target cropping region description information, and the target output description information includes: Based on the image attribute information and the target cropping region description information, determine the cropping start position, cropping range, and intra-frame reading span; Based on the target output description information, determine the output size parameters and output timing parameters; The cache write control rule and the clipping read control rule are generated based on the clipping start position, the clipping range, the intra-frame read span, the output size parameter, and the output timing parameter.

[0010] In one possible design, the cache write control rules include cache write order, image frame write unit, and cache switching conditions; The step of alternately writing image frames from the image frame sequence to be processed into the first buffer and the second buffer based on the buffer write control rules includes: According to the writing order of the buffers, the current image frame in the sequence of image frames to be processed is written into one of the first buffer and the second buffer; If the buffer switching condition is met, subsequent image frames in the image frame sequence to be processed are written to another buffer, resulting in alternately written buffer frame data.

[0011] In one possible design, the buffer switching condition includes at least one of the following: frame write completion condition, frame synchronization condition, and buffer status condition. Wherein, if the buffer in the first buffer and the second buffer where image frame writing is currently performed meets the frame writing completion condition, the buffer in the current image frame writing is determined as the buffer in which image frames have been written, and the other buffer in the first buffer and the second buffer is determined as the buffer in the next image frame writing.

[0012] In one possible design, the clipping read control rules include the read start position, the clipping read range, and the intra-frame read span; The step of reading the cached frame data corresponding to the target cropping region from the cache of another image frame that has already been written, based on the cropping read control rule, to obtain the cropping frame data, includes: Based on the read start position, determine the start read position of the target cropping region in the buffer of the other image frame that has been written; Based on the cropping read range and the intra-frame read span, the cached frame data corresponding to the target cropping region is read starting from the starting read position to obtain the cropped frame data.

[0013] In one possible design, the sequence of image frames to be processed is obtained, including: Obtain the raw image data stream; The original image data stream is subjected to signal parsing and image preprocessing to obtain a standardized image data stream; The standardized image data stream is divided into frames to obtain the image frame sequence to be processed.

[0014] In one possible design, after performing output adaptation processing on the cropped frame data according to the display adaptation information to obtain display image data, the method further includes: Obtain the display status feedback information corresponding to the displayed image data; Based on the display status feedback information, the clipping cache control information is updated to obtain the updated clipping cache control information; Based on the updated cropping cache control information, subsequent image frames are cropped and cached.

[0015] Secondly, this application provides an image dynamic cropping and frame buffering apparatus, the apparatus comprising: The information acquisition module is used to acquire the image frame sequence to be processed, cropping requirement information and display adaptation information in response to the image display task; The control information determination module is used to determine cropping cache control information based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information. The cropping cache control information includes cache write control rules and cropping read control rules. The cache writing module is used to alternately write image frames from the image frame sequence to be processed into the first cache area and the second cache area based on the cache writing control rules, so as to obtain cache frame data; The cropping and reading module is used to read the cache frame data corresponding to the target cropping area from the other cache area that has already written the image frame, based on the cropping and reading control rules, when one of the first cache area and the second cache area performs image frame writing, to obtain cropping frame data; The display adaptation module is used to perform output adaptation processing on the cropped frame data according to the display adaptation information to obtain display image data.

[0016] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, implement the method described in the first aspect or various possible designs of the first aspect.

[0017] Fourthly, this application provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to implement the method described in the first aspect or various possible designs of the first aspect.

[0018] This application provides a method and apparatus for dynamic image cropping and frame caching. The method acquires the image frame sequence to be processed, cropping requirement information, and display adaptation information in response to an image display task, enabling the image content, initial cropping target, and display output requirements to be associated within the same processing flow. Further, based on the cropping requirement information and display adaptation information, it determines cropping cache control information, including cache write control rules and cropping read control rules, allowing the image frame cache write process and the cropping region read process to be executed collaboratively based on unified cropping cache control information. On this basis, the image frames to be processed are alternately written to a first cache area and a second cache area. While writing an image frame in one cache area, cache frame data corresponding to the target cropping region is read from another cache area where an image frame has already been written, thereby achieving parallel processing of image frame writing and cropping read, reducing cache read / write waiting time and processing latency. Simultaneously, output adaptation processing is performed on the cropping frame data according to the display adaptation information, ensuring that the obtained display image data matches the requirements of the display terminal. Therefore, the method provided in this application can improve the flexibility of cropping area adjustment, enhance the efficiency of image caching and cropping processing, and improve the adaptability between cropped images and display output. Attached Figure Description

[0019] Figure 1 A flowchart illustrating an image dynamic cropping and frame buffering method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of an image dynamic cropping and frame buffering device provided in an embodiment of this application; Figure 3 A flowchart illustrating another image dynamic cropping and frame buffering method provided in an embodiment of this application; Figure 4 A schematic diagram of another image dynamic cropping and frame buffering device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims and drawings of this application are intended to cover non-exclusive inclusion.

[0022] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B can exist simultaneously, and B exists. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0024] Furthermore, the terms "first," "second," etc., in the specification and claims of this application or in the aforementioned drawings are used to distinguish different objects rather than to describe a specific order, and may explicitly or implicitly include one or more of the features.

[0025] In the description of this application, unless otherwise stated, "multiple" and "at least two" mean two or more (including two), and similarly, "multiple groups" and "at least two groups" mean two or more (including two groups).

[0026] In the description of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, "connected" or "linked" can refer not only to a physical connection, but also to an electrical connection or a signal connection. For instance, it can be a direct connection, i.e., a physical connection, or an indirect connection through at least one intermediate component, as long as the circuit is connected. It can also refer to the internal connection between two components. A signal connection can refer not only to a signal connection through a circuit, but also to a signal connection through a medium, such as radio waves. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, different technical features in this application can be combined with each other.

[0028] In related technologies, the size of the original image captured by the camera is usually not completely consistent with the display size, display area or output timing of the display terminal. Therefore, before the image is output to the display terminal, the image data usually needs to be cropped and frame buffered.

[0029] Specifically, image frame buffering and cropping output can be achieved by using a Video Direct Memory Access (VDMA) module combined with Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM). This process typically involves configuring the VDMA module's write and read channels to first write image data into the DDR SDRAM for frame buffering, and then, by setting the read address, address offset, or read range of the read channel, reading the target area image data from the buffered image frame, thereby achieving image cropping and display output.

[0030] However, in the above processing methods, parameters such as the cropping area, cropping size, and read / write address usually need to be configured along with the data transmission link of the VDMA module. When the cropping area or cropping size changes, the relevant read / write channels often need to be reconfigured, resulting in insufficient flexibility in adjusting cropping parameters and difficulty in adapting to the dynamic cropping requirements during continuous image display. Furthermore, the configuration process of the VDMA module is usually completed by the processing system (PS). If the configuration instructions are deeply coupled with the image data transmission link, it can easily lead to slow parameter adjustment response speeds. Moreover, the process correlation between image data writing, caching, and cropping reading is strong. If the read / write scheduling method is unreasonable, data waiting can easily occur, affecting the efficiency of image caching and cropping processing.

[0031] Furthermore, in Field Programmable Gate Array (FPGA) video processing systems, the on-chip Block Random Access Memory (BRAM) typically has limited storage capacity, making it difficult to directly meet the frame buffering requirements of high-resolution images. Therefore, external DDR SDRAM is often required for frame buffering. Accessing external memory typically involves address mapping, data bit width conversion, read / write timing control, and buffer scheduling. If the read / write interface design and buffer scheduling method are complex, it can increase the difficulty of system development and affect operational stability. Simultaneously, different display terminals have differences in resolution, refresh rate, pixel clock, and horizontal / vertical synchronization timing. If the cropped image data does not match the display output parameters sufficiently, it may lead to problems such as display offset, screen aspect ratio mismatch, or timing synchronization abnormalities, thereby affecting the image display effect.

[0032] Based on this, this application provides an image dynamic cropping and frame caching method, which uses cropping cache control information to correlate and control cache writing and cropping reading, thereby improving the flexibility of cropping area adjustment, image cache processing efficiency, and display output adaptability.

[0033] Figure 1 This is a flowchart illustrating an image dynamic cropping and frame buffering method provided in an embodiment of this application. Figure 1 As shown, the method provided in this application embodiment specifically includes S101 to S105, and S101 to S105 will be described in detail below.

[0034] It should be noted that the method provided in this application embodiment can be executed by an image dynamic cropping and frame buffering device.

[0035] Figure 2 This is a schematic diagram of an image dynamic cropping and frame buffering device provided in an embodiment of this application. Figure 2 As shown, the image dynamic cropping and frame buffering device may include functional units such as an image acquisition and processing module, a configuration control module, a cropping parameter dynamic configuration module, a data scheduling module, a dual-zone storage module, and a video output driver module.

[0036] In some embodiments, the configuration control module is communicatively connected to the image acquisition and processing module, the cropping parameter dynamic configuration module, and the data scheduling module; the cropping parameter dynamic configuration module is communicatively connected to the data scheduling module; the image acquisition and processing module is communicatively connected to the data scheduling module; the dual-zone storage module is communicatively connected to the data scheduling module; and the video output driver module is communicatively connected to the data scheduling module and the external display terminal. Through the data interaction between the above functional units, image frame acquisition, cropping control information generation, buffer writing, cropping reading, and display adaptation output can be realized.

[0037] In specific implementations, the aforementioned functional units can be integrated into field-programmable gate arrays, system-on-a-chip, image processing chips, embedded processing devices, or other electronic devices with image processing capabilities, and this application does not limit this.

[0038] S101. In response to the image display task, obtain the image frame sequence to be processed, cropping requirement information and display adaptation information.

[0039] It should be noted that an image display task can be a task that outputs image content captured by a camera, video capture device, or other image input source to a display terminal. An image display task can be triggered by external control commands, or it can be triggered upon detecting the input of raw image data streams, the connection of the display terminal, or the completion of display parameter configuration. In response to the image display task, the image dynamic cropping and frame buffering device acquires the sequence of image frames to be processed, cropping requirement information, and display adaptation information, so that subsequent caching, cropping, and output processing of the image frames to be processed can be performed based on the initial cropping requirements and display adaptation requirements.

[0040] In some embodiments, the image frame sequence to be processed can be acquired by an image acquisition and processing module. Specifically, the image acquisition and processing module can receive a raw image data stream and perform signal parsing and image preprocessing on the raw image data stream to obtain a standardized image data stream; further, it can perform frame division processing on the standardized image data stream according to frame synchronization information or a preset frame division rule to obtain the image frame sequence to be processed. The image frame sequence to be processed may include multiple image frames arranged in chronological order, and each image frame may include corresponding pixel data, frame sequence number, frame synchronization identifier, and / or image size information.

[0041] Signal parsing may include at least one of differential signal separation, synchronous decoding, and data format recognition; image preprocessing may include at least one of decompression, noise reduction, color restoration, resolution normalization, and pixel format conversion. In one specific implementation, the image acquisition and processing module can process the raw image data stream into an image data stream in Advanced eXtensible Interface 4-Stream (AXI4-Stream) format, and thereby form a sequence of image frames to be processed.

[0042] In some embodiments, cropping requirement information can be obtained by a configuration control module. Specifically, the configuration control module can receive externally input cropping parameter instructions and determine cropping requirement information based on these instructions. The cropping requirement information characterizes the initial cropping requirements for selecting a region from the image frame to be processed, and may include at least one of the following: initial cropping region position, initial cropping region size, initial cropping ratio, target region selection mode, or offset relationship of the initial cropping region relative to the image frame to be processed. By obtaining the cropping requirement information, subsequent processing can clearly define the initial cropping target in the image frame to be processed.

[0043] It should be noted that the clipping requirement information is mainly used to determine the initial clipping area and is not used to directly represent subsequent dynamic adjustment actions; the control requirements for subsequent translation, scaling, or aspect ratio adjustment of the initial clipping area can be represented by the clipping adjustment information. By distinguishing between clipping requirement information and clipping adjustment information, "determining the initial clipping target" and "updating the dynamic clipping area" can be made independent of each other at the processing level, avoiding overlapping meanings of clipping parameters.

[0044] In some embodiments, display adaptation information can also be obtained by the configuration control module. Specifically, the configuration control module can receive display parameters from an external display terminal and determine display adaptation information based on these parameters. Display adaptation information characterizes the adaptation requirements between the cropped image data and the display terminal, and may include display resolution, output image size, pixel clock, refresh rate, line synchronization parameters, field synchronization parameters, display interface type, and / or output timing parameters. By obtaining display adaptation information, subsequent output adaptation processing can perform timing synchronization and format adaptation of the cropped frame data according to the actual display requirements of the display terminal.

[0045] In this embodiment, the image dynamic cropping and frame buffering device can obtain three types of basic inputs required for subsequent cropping and frame buffering processing: the image frame sequence to be processed provides the image data basis for buffering and cropping, the cropping requirement information is used to determine the initial cropping target, and the display adaptation information is used to determine the display output requirements. The method steps shown in S101 can be executed by the image acquisition and processing module and the configuration control module in cooperation, providing a data basis for subsequently determining the cropping buffer control information.

[0046] S102. Determine the cropping buffer control information based on the image attribute information, cropping requirement information, and display adaptation information of the image frames in the image frame sequence to be processed.

[0047] It should be noted that after obtaining the cropping requirement information and display adaptation information, the image dynamic cropping and frame buffering device can generate cropping buffer control information to control the writing of image frame buffers and the reading of cropping regions, based on the initial cropping target represented by the cropping requirement information and the display output requirements represented by the display adaptation information. The cropping buffer control information is used to coordinate the buffer writing process of image frames and the reading process of the target cropping region under the same control basis, thereby establishing a correspondence between the storage location of the image frame, the reading area, and the display output requirements.

[0048] In some embodiments, the pruning cache control information includes cache write control rules and pruning read control rules.

[0049] The cache write control rules control how image frames in the image frame sequence to be processed are written to the first and second cache areas; the cropping read control rules control how cache frame data corresponding to the target cropping region is read from the cache areas where image frames have already been written. By unifying the cache write control rules and cropping read control rules into the cropping cache control information, subsequent cache write and cropping read steps can be executed according to mutually matching control rules, reducing processing waits or cropping region deviations caused by inconsistent configurations between the write and read processes.

[0050] In some embodiments, the method steps shown in S102 can be executed in cooperation between the configuration control module and the cropping parameter dynamic configuration module. Specifically, the configuration control module can form basic configuration data based on the externally input cropping parameter instructions and the display parameters of the display terminal; the cropping parameter dynamic configuration module can determine cropping cache control information based on the basic configuration data and provide the cropping cache control information to the data scheduling module so that the data scheduling module can subsequently perform image frame writing according to the cache write control rules and perform cropping region reading according to the cropping read control rules.

[0051] S103. Based on the cache write control rules, the image frames in the image frame sequence to be processed are alternately written to the first cache area and the second cache area to obtain cache frame data.

[0052] It should be noted that after determining the cache write control rules, the image dynamic cropping and frame buffering device can perform cache write control on the image frames in the image frame sequence to be processed according to the cache write control rules, so that continuously input image frames can be stored alternately between the first buffer area and the second buffer area. The first buffer area and the second buffer area can be two buffer areas in a dual-zone storage structure, which are used to store image frame data at different caching stages, thereby providing a cache data basis for subsequent cropping and reading.

[0053] In some embodiments, buffer write control rules can be used to indicate the write order of image frames, the write unit, and the buffer switching method. The image dynamic cropping and frame buffering device can first write the current image frame in the sequence of image frames to be processed into one of the first and second buffers. After the switching condition is met, subsequent image frames are then written into the other buffer, thereby allowing the first and second buffers to alternately handle image frame writing tasks. In this way, buffered frame data stored in the first and second buffers can be obtained.

[0054] In some embodiments, the method steps shown in S103 can be executed by a data scheduling module and a dual-zone storage module. Specifically, the data scheduling module can configure the write cache channel according to the cache write control rules and send the image frames in the image frame sequence to be processed to the dual-zone storage module in a preset write order. The dual-zone storage module can include a first cache and a second cache, and alternately receive image frame data between the two caches according to the write control of the data scheduling module. By alternately writing image frames to the first cache and the second cache, read-write conflicts caused by consecutive image frames being written to the same cache area can be avoided, providing conditions for subsequently reading the cache frame data corresponding to the target cropping area in the other cache.

[0055] S104. When one of the first and second buffers performs image frame writing, the buffer frame data corresponding to the target cropping region is read from the other buffer that has already written the image frame, based on the cropping read control rules, to obtain the cropping frame data.

[0056] It should be noted that during the process of image frames being alternately written to the first and second buffers, the image dynamic cropping and frame buffering device can perform cropping read processing on the buffers that have already been written to the image frames according to the cropping read control rules. That is, when one of the first and second buffers is receiving the current image frame, the other buffer that has already been written to the image frame can be used as the read target to provide the buffered frame data corresponding to the target cropping area, thereby obtaining the cropped frame data.

[0057] For example, when the first buffer is receiving the current image frame, the second buffer acts as the read target, providing the cached frame data corresponding to the target cropping region. As another example, when the second buffer is receiving the current image frame, the first buffer acts as the read target, providing the cached frame data corresponding to the target cropping region.

[0058] In some embodiments, the cropping read control rules can be used to indicate the read position, read range, and read method of the target cropping region in the cached frame data. The image dynamic cropping and frame caching device can determine the starting read position corresponding to the target cropping region in a buffer area of ​​another image frame already written, based on the cropping read control rules, and read the corresponding image data from the cached frame data according to the read range corresponding to the target cropping region, thereby obtaining the cropped frame data. The cropped frame data can be the target region image data extracted from the image frame to be processed, used for subsequent output adaptation processing.

[0059] In some embodiments, the method steps shown in S104 can be executed in cooperation between the data scheduling module and the dual-zone storage module. Specifically, the data scheduling module can configure the read cropping channel according to the cropping read control rules, and when the write buffer channel writes an image frame to one of the first and second buffers, it controls the read cropping channel to read the cached frame data corresponding to the target cropping region from the other buffer where the image frame has already been written; the dual-zone storage module is used to provide read and write access services for the first and second buffers. In this way, the image frame writing process and the target cropping region reading process can be executed in parallel, reducing buffer read and write waiting and improving the efficiency of dynamic image cropping and frame buffer processing.

[0060] S105. Perform output adaptation processing on the cropped frame data according to the display adaptation information to obtain the display image data.

[0061] It should be noted that after obtaining the cropped frame data, the image dynamic cropping and frame buffering device can perform output adaptation processing on the cropped frame data according to the display adaptation information, so that the cropped frame data can be displayed according to the image size, display timing, and output format required by the display terminal. The display adaptation information can be used to characterize the display output requirements of the external display terminal, such as display resolution, output image size, pixel clock, refresh rate, horizontal synchronization parameters, vertical synchronization parameters, display interface type, and / or output timing parameters. By adapting the cropped frame data using the display adaptation information, the cropped target area image can be matched with the display capabilities and timing requirements of the display terminal.

[0062] In some embodiments, output adaptation processing of the cropped frame data may include at least one of size adaptation, timing synchronization, and output driving processing. Size adaptation may refer to adjusting the cropped frame data to an image size that matches the display area of ​​the display terminal according to the output size parameters in the display adaptation information; timing synchronization may refer to outputting the cropped frame data according to the pixel clock, refresh rate, line synchronization parameters, and field synchronization parameters in the display adaptation information, so that the cropped frame data is output according to the line and field scanning timing required by the display terminal; output driving processing may refer to converting the timing-synchronized image data into a data format suitable for the display terminal to receive, according to the display interface type or display output protocol. Thus, display image data that can be recognized and displayed by the display terminal can be obtained.

[0063] In some embodiments, the method steps shown in S105 can be executed by a video output driver module. Specifically, the video output driver module can acquire the display timing parameters of the external display terminal and generate an output timing sequence adapted to the external display terminal based on the display timing parameters; further, the video output driver module can synchronize the cropped frame data with the output timing sequence and perform driving processing on the synchronized image data to obtain display image data. The display image data can be sent to the external display terminal for display. The external display terminal can be a liquid crystal display screen, an in-vehicle display screen, an industrial display screen, a monitoring display screen, or other terminal devices with image display capabilities, and this application does not limit this.

[0064] In some embodiments, the video output driver module may include a timing acquisition unit, a timing generation unit, and a data synchronization unit. The timing acquisition unit can be used to acquire display timing parameters such as horizontal synchronization parameters, vertical synchronization parameters, pixel clock frequency, display resolution, and / or refresh rate from the external display terminal. The display timing parameters can be fed back from the external display terminal, or they can be provided to the video output driver module by the configuration control module based on the display parameters of the external display terminal.

[0065] In some embodiments, the timing generation unit can be communicatively connected to the timing acquisition unit to generate a display timing signal adapted to the external display terminal based on the display timing parameters acquired by the timing acquisition unit. The display timing signal may include at least one of a pixel clock signal, a horizontal synchronization signal, a vertical synchronization signal, and a data valid signal. Generating the display timing signal through the timing generation unit allows the cropped frame data to be output according to the horizontal and vertical scanning order and refresh rate required by the external display terminal.

[0066] In some embodiments, the data synchronization unit can be communicatively connected to both the timing generation unit and the data scheduling module, and is used to synchronize the cropped frame data output by the data scheduling module with the display timing signal generated by the timing generation unit to obtain display image data. Specifically, the data synchronization unit can determine the effective display area based on the display timing signal and map the pixel data in the cropped frame data to the effective display area. If the cropped frame data does not match the target output size, the data synchronization unit can also cooperate with the video output driver module to perform scaling, centering, boundary filling, or effective area mapping processing. Through the cooperation of the timing acquisition unit, the timing generation unit, and the data synchronization unit, the adaptability between the cropped frame data and the display terminal timing can be improved.

[0067] In some embodiments, the displayed image data may include image pixel data and display control signals corresponding to the image pixel data. The display control signals may include at least one of a horizontal synchronization signal, a vertical synchronization signal, a data valid signal, and a pixel clock signal. The video output driver module can determine the timing relationship of the display control signals according to the display adaptation information and fill the corresponding display valid area with the pixel data from the cropped frame data, so that the displayed image data can be output according to the horizontal and vertical synchronization requirements of the display terminal. This processing method can reduce the risk of display offset, image abnormalities, or output instability caused by the timing inconsistency between the cropped frame data and the display terminal.

[0068] In some embodiments, if the size of the cropped frame data matches the target output size indicated by the display adaptation information, the video output driver module can directly perform timing synchronization and driving processing on the cropped frame data based on the display adaptation information to obtain the display image data. If the size of the cropped frame data does not match the target output size, the video output driver module can scale, center, fill boundaries, or map the effective area of ​​the cropped frame data according to the target output size, and then perform timing synchronization and driving processing to obtain the display image data. Through the above processing, the matching requirements between different cropped area sizes and different display terminal output sizes can be adapted.

[0069] In some embodiments, the output adaptation processing of the cropped frame data based on display adaptation information may further include output format adaptation of the cropped frame data. For example, when the display terminal uses different pixel arrangements, color formats, or data bit widths, the video output driver module can perform pixel format conversion, color channel rearrangement, or data bit width adaptation processing on the cropped frame data according to the display adaptation information, so that the output display image data can meet the data reception requirements of the display terminal. By adapting the output format, the compatibility of the method of this application with different display terminals can be improved.

[0070] This application provides a method for dynamic image cropping and frame caching. By responding to an image display task, it acquires the sequence of image frames to be processed, cropping requirement information, and display adaptation information, enabling the image content, initial cropping target, and display output requirements to be associated within the same processing flow. Furthermore, based on the cropping requirement information and display adaptation information, it determines cropping cache control information, including cache write control rules and cropping read control rules, allowing the image frame cache write process and the cropping region read process to be executed collaboratively based on unified cropping cache control information. On this basis, the image frames to be processed are alternately written to a first cache area and a second cache area. While writing an image frame in one cache area, cache frame data corresponding to the target cropping region is read from another cache area where an image frame has already been written, thereby achieving parallel processing of image frame writing and cropping read, reducing cache read / write waiting time and processing latency. Simultaneously, output adaptation processing is performed on the cropped frame data according to the display adaptation information, ensuring that the obtained display image data matches the requirements of the display terminal. Therefore, the method provided in this application can improve the flexibility of cropping region adjustment, enhance the efficiency of image caching and cropping processing, and improve the adaptability between cropped images and display output.

[0071] In one possible embodiment, the method steps shown in S102 can be implemented by S1021 to S1023. The method steps shown in S1021 to S1023 are described in detail below.

[0072] S1021. Determine the target cropping region description information based on image attribute information and cropping requirement information.

[0073] It should be noted that the cropping requirement information is used to characterize the initial image region that needs to be selected from the image frame to be processed in the image display task. The image dynamic cropping and frame buffering device can identify the cropping requirement information, determine the region description result of the initial image region in the image frame to be processed, and update and constrain the region description result when cropping adjustments and boundary constraints are required, to obtain the target cropping region description information. The target cropping region description information is used to characterize the image region that needs to be read in the subsequent cropping and reading process, so that the subsequent cropping and reading control rules can be configured around the target cropping region.

[0074] In some embodiments, the target cropping region description information can be used to characterize the positional and extent relationships of the target cropping region relative to the image frame to be processed. For example, it may include at least one of region position description, region size description, region scale description, or region offset description. By determining the target cropping region description information, the initial cropping requirements from external input can be transformed into a region control basis that can be used in subsequent buffer reading processes.

[0075] In some embodiments, the method steps shown in S1021 can be executed in conjunction with the configuration control module and the trimming parameter dynamic configuration module. Specifically, the configuration control module can receive externally input trimming parameter instructions and use these instructions as trimming requirement information; the trimming parameter dynamic configuration module can communicate with the configuration control module and receive basic configuration data related to the trimming requirement information sent by the configuration control module. The parameter parsing unit in the trimming parameter dynamic configuration module can parse the basic configuration data and extract information such as the region location, region size, or region offset related to the target trimming region, thereby forming target trimming region description information. Through the above processing, the externally input trimming parameter instructions can be converted into trimming region control basis that can be used by the subsequent data scheduling module.

[0076] S1022. Determine the target output description information based on the display adaptation information.

[0077] It should be noted that the display adaptation information is used to characterize the display terminal's display requirements for the output image. The image dynamic cropping and frame buffering device can determine the target output description information based on the display adaptation information. The target output description information is used to characterize the output requirements that the cropped frame data needs to meet when output to the display terminal, so that the subsequent cropping buffering control information can take into account both cropped area reading and display output adaptation.

[0078] In some embodiments, the target output description information can be used to characterize at least one of the output size, output format, and output timing requirements of the displayed image data. For example, the target output description information can be determined based on the display resolution, refresh rate, pixel clock, or horizontal and vertical synchronization requirements of the display terminal. By determining the target output description information, subsequent clipping buffer control information can not only indicate which region to read from the buffered frame data, but also match the read clipped frame data with the display output requirements.

[0079] In some embodiments, the method steps shown in S1022 can be executed by a configuration control module. Specifically, the configuration control module can communicate with an external display terminal, receive display parameters from the external display terminal, and determine target output description information based on the display parameters. Display parameters may include at least one of display resolution, display refresh rate, pixel clock, horizontal synchronization parameters, vertical synchronization parameters, or display interface parameters. The configuration control module can organize the target output description information and clipping requirement information together into basic configuration data, and send the basic configuration data to the clipping parameter dynamic configuration module, so that the clipping parameter dynamic configuration module considers both clipping area requirements and display output requirements when determining clipping buffer control information.

[0080] S1023. Determine the cropping buffer control information based on the image attribute information, the target cropping region description information, and the target output description information.

[0081] It should be noted that after obtaining the target cropping region description information and the target output description information, the image dynamic cropping and frame buffering device can correlate the two to determine the cropping buffer control information. This cropping buffer control information is used to simultaneously constrain the image frame buffer writing process and the target cropping region reading process, establishing a correspondence between the image frame buffer position, the cropping reading area, and the display output requirements.

[0082] In some embodiments, the image dynamic cropping and frame buffering device can determine the region control basis required for cropping reading based on the target cropping region description information, and determine the adaptation control basis required for display output based on the target output description information. The region control basis and the adaptation control basis are then combined to obtain cropping buffer control information. Therefore, the cropping buffer control information can simultaneously include control content for the buffer writing process and control content for the cropping reading process, so that subsequent image frame buffer writing is performed based on buffer writing control rules, and target cropping region reading is performed based on cropping reading control rules.

[0083] In some embodiments, the method steps shown in S1023 can be executed by the dynamic configuration module for trimming parameters, or by the configuration control module and the dynamic configuration module for trimming parameters working together. Specifically, the configuration control module can provide basic configuration data corresponding to trimming requirement information and display adaptation information; the parameter parsing unit in the dynamic configuration module for trimming parameters can extract parameter content related to the target trimming region description information and the target output description information from the basic configuration data; the parameter real-time adjustment unit can perform adaptation processing on the extracted parameter content according to the target trimming region description information and the target output description information to generate dynamic trimming configuration data representing trimming cache control information; the parameter distribution unit can send the dynamic trimming configuration data to the data scheduling module. The dynamic trimming configuration data can serve as a specific implementation of trimming cache control information, used to enable the data scheduling module to configure the cache writing process and the trimming reading process respectively.

[0084] In some embodiments, the data scheduling module can communicate with the cropping parameter dynamic configuration module and receive cropping cache control information sent by the cropping parameter dynamic configuration module. After receiving the cropping cache control information, the data scheduling module can configure the write cache channel according to the cache write control rules therein, and configure the read cropping channel according to the cropping read control rules therein. Thus, the cropping target represented by the target cropping region description information and the display output requirements represented by the target output description information can be passed to the subsequent cache write and cropping read processes through the cropping cache control information, thereby maintaining the correspondence between image frame cache, target region reading, and display output.

[0085] In one possible embodiment, the method steps shown in S1021 can be implemented by Sa1 to Sa3, and the method steps shown in Sa1 to Sa3 are described in detail below.

[0086] Sa1. Determine the initial cropping area information based on image attribute information and cropping requirements.

[0087] It should be noted that the cropping requirement information can originate from user input, cropping parameter commands issued by the upper-level control device, or preset display strategies. This information characterizes the initial cropping requirements for selecting a region within the image frame to be processed. The image dynamic cropping and frame buffering device can parse the cropping requirement information to determine the initial state of the selected cropping region before adjustment, thus obtaining the initial cropping region information. This initial cropping region information serves as the basis for subsequent cropping adjustments and boundary constraint processing.

[0088] In some embodiments, the initial cropping region information may include a location description and a size description of the initial cropping region. For example, the initial cropping region information may include at least one of the following: an initial cropping start point, an initial cropping width, an initial cropping height, an initial cropping ratio, or an offset relationship of the initial cropping region relative to the image frame to be processed. By determining the initial cropping region information, the cropping requirement information can be converted into region parameters that can be recognized and processed by the subsequent cropping parameter adjustment process.

[0089] In some embodiments, the method steps shown in Sa1 can be executed in conjunction with a configuration control module and a trimming parameter dynamic configuration module. Specifically, the configuration control module can receive externally input trimming parameter instructions and form basic configuration data corresponding to the trimming requirement information based on the trimming parameter instructions; the trimming parameter dynamic configuration module can communicate with the configuration control module and receive the basic configuration data. The parameter parsing unit in the trimming parameter dynamic configuration module can parse the basic configuration data, extract parameter content related to the initial trimming area, and obtain the initial trimming area information.

[0090] Sa2, in response to the cropping adjustment information, updates the initial cropping area information to obtain the updated cropping area information.

[0091] It should be noted that the cropping adjustment information is used to characterize the control requirements for dynamically adjusting the initial cropping region. After acquiring the initial cropping region information, the image dynamic cropping and frame buffering device can update the position, size, or proportional relationship of the initial cropping region in response to the cropping adjustment information, thus obtaining updated cropping region information. The updated cropping region information is used to characterize the state of the cropping region after correction according to the current cropping adjustment requirements.

[0092] In some embodiments, the cropping adjustment information may include at least one of cropping region translation information, cropping region scaling information, and cropping aspect ratio adjustment information. Correspondingly, updating the initial cropping region information may include: adjusting the position of the initial cropping region according to the cropping region translation information; adjusting the size of the initial cropping region according to the cropping region scaling information; or adjusting the width and height of the initial cropping region in association according to the cropping aspect ratio adjustment information. Through the above update process, the cropping region can be dynamically adjusted according to changes in image display tasks or external cropping adjustment requirements.

[0093] In some embodiments, the method steps shown in Sa2 can be executed by the real-time parameter adjustment unit in the cropping parameter dynamic configuration module. Specifically, the real-time parameter adjustment unit can receive cropping adjustment information input from an external online source and update the initial cropping region information obtained by the parameter parsing unit based on the cropping adjustment information to obtain updated cropping region information. Since this update process can be performed during image frame transmission and buffering, it can provide a region parameter basis for the subsequent generation of dynamic cropping buffer control information.

[0094] Sa3. Based on the image boundary information corresponding to the image frame sequence to be processed, perform boundary constraint processing on the updated cropping region information to obtain the target cropping region description information.

[0095] It should be noted that if the cropping is directly performed based on the updated cropping region information after obtaining the updated information, the cropped region may exceed the effective range of the image frame to be processed. Therefore, the image dynamic cropping and frame buffering device can perform boundary constraint processing on the updated cropping region information based on the image boundary information corresponding to the image frame sequence to be processed, thereby obtaining the target cropping region description information. The target cropping region description information is used to characterize the effective cropping region after satisfying the image boundary constraints.

[0096] In some embodiments, image boundary information may include at least one of the image width, image height, effective pixel region range, row boundary information, and column boundary information of the image frame to be processed. Boundary constraint processing may include determining whether the cropping region represented by the updated cropping region information exceeds the effective image range of the image frame to be processed; if the cropping region does not exceed the effective image range, the updated cropping region information may be used as the target cropping region description information; if the cropping region exceeds the effective image range, the position, size, or proportion of the updated cropping region may be constrained and corrected so that the corrected cropping region is within the effective image range of the image frame to be processed.

[0097] In some embodiments, boundary constraint processing for updating the cropping region information may include limiting the starting position of the cropping region, constraining the width and height of the cropping region, or restricting the translation direction and scaling range of the cropping region. Boundary constraint processing can prevent subsequent cropping and reading processes from accessing invalid image regions of the image frame to be processed, thereby improving the stability of the cropping and reading process.

[0098] In some embodiments, the method steps shown in Sa3 can be executed by the cropping parameter dynamic configuration module, or by the cropping parameter dynamic configuration module in conjunction with the image acquisition and processing module. Specifically, the image acquisition and processing module can determine the size information and effective image range of the image frames when forming the sequence of image frames to be processed. The cropping parameter dynamic configuration module can determine the image boundary information based on the size information and the effective image range, and perform boundary constraint processing on the updated cropping region information through the parameter real-time adjustment unit to obtain the target cropping region description information. This allows the subsequently generated cropping read control rules to point to the effective target cropping region, reducing the risk of cropping read exceeding boundaries or cropping region anomalies.

[0099] In one possible embodiment, the method steps shown in S1023 can be implemented by Sc1 to Sc3, and the method steps shown in Sc1 to Sc3 are described in detail below.

[0100] Sc1. Based on image attribute information and target cropping region description information, determine the cropping start position, cropping range, and intra-frame reading span.

[0101] It should be noted that the target cropping region description information is used to characterize the effective cropping region after satisfying image boundary constraints. The image dynamic cropping and frame buffering device can determine the required cropping start position, cropping range, and intra-frame read span when subsequently reading the target cropping region from the buffered frame data based on the target cropping region description information. Specifically, the cropping start position characterizes the starting read position of the target cropping region in the image frame to be processed or the buffered frame data; the cropping range characterizes the read width, read height, or corresponding effective pixel range of the target cropping region; and the intra-frame read span characterizes the jump relationship between adjacent read rows, adjacent read columns, or adjacent data blocks when reading the target cropping region row by row or column by column in the buffered frame data.

[0102] In some embodiments, the cropping start position can be determined based on the region location description in the target cropping region description information; the cropping range can be determined based on the region size description in the target cropping region description information; and the intra-frame read span can be determined based on the image size, pixel data arrangement, and cache storage format of the image frame to be processed. For example, when the image frame to be processed is stored continuously in the cache row by row, the intra-frame read span can be used to indicate the data length that needs to be traversed when jumping from one row of data in the target cropping region to the next row of data. By determining the cropping start position, cropping range, and intra-frame read span, the read address, read size, and read step can be provided as a basis for subsequently generating cropping read control rules.

[0103] In some embodiments, the method steps shown in Sc1 can be executed by the cropping parameter dynamic configuration module, or by the cropping parameter dynamic configuration module in conjunction with the data scheduling module. Specifically, the parameter parsing unit in the cropping parameter dynamic configuration module can extract the positional and range parameters related to the target cropping region based on the target cropping region description information; the data scheduling module can determine the corresponding intra-frame read span based on the storage method of the cached frame data, the image frame size, and the cache address arrangement. Thus, the target cropping region description information can be further transformed into control parameters that enable the data scheduling module to configure the read cropping channel.

[0104] Sc2. Based on the target output description information, determine the output size parameters and output timing parameters.

[0105] It should be noted that the target output description information is used to characterize the display output requirements that the cropped frame data must meet when outputting to the display terminal. The image dynamic cropping and frame buffering device can determine the output size parameters and output timing parameters based on the target output description information. Among them, the output size parameters are used to characterize the output width, output height, or effective display area that the displayed image data needs to meet; the output timing parameters are used to characterize the pixel clock, refresh rate, line synchronization timing, field synchronization timing, or data validity timing required when outputting the displayed image data.

[0106] In some embodiments, the target output description information can be determined by the configuration control module based on the display parameters of the external display terminal. Correspondingly, the output size parameters can be determined based on the display resolution, display area size, or target display window size of the display terminal; the output timing parameters can be determined based on the pixel clock frequency, refresh rate, horizontal synchronization parameters, vertical synchronization parameters, or display interface parameters of the display terminal. By determining the output size parameters and output timing parameters, a display-side control basis can be provided for subsequent output adaptation processing, enabling the cropped frame data to be further converted into display image data that meets the requirements of the display terminal after being read.

[0107] In some embodiments, the method steps shown in Sc2 can be executed by a configuration control module and / or a video output driver module. Specifically, the configuration control module can receive display parameters from an external display terminal and form target output description information based on these parameters; the video output driver module can further determine output timing parameters based on the target output description information and use them to subsequently generate output timing adapted to the external display terminal. In this way, the clipping buffer control information can not only focus on reading the target clipping region, but also take into account the adaptation relationship between the clipped frame data and the display output.

[0108] Sc3 generates buffer write control rules and clipping read control rules based on the clipping start position, clipping range, intra-frame read span, output size parameters, and output timing parameters.

[0109] It should be noted that after determining the cropping start position, cropping range, intra-frame read span, output size parameters, and output timing parameters, the image dynamic cropping and frame buffering device can generate buffer write control rules and cropping read control rules based on the above parameters. The buffer write control rules are used to control the writing process of image frames in the image frame sequence to be processed between the first buffer and the second buffer; the cropping read control rules are used to control the reading of buffer frame data corresponding to the target cropping region from the buffer of the already written image frames.

[0110] In some embodiments, the trimming read control rules can be generated based on the trimming start position, trimming range, and intra-frame read span. Specifically, the trimming start position is used to determine the starting read address or starting read coordinates of the target trimming region; the trimming range is used to determine the effective area size to be read in each trimming read; and the intra-frame read span is used to determine the jump method of the read trimming channel when reading adjacent rows, adjacent columns, or adjacent data blocks. By generating the trimming read control rules using the above parameters, the data scheduling module can accurately locate the target trimming region during the read trimming process and read the corresponding region's data from the cached frame data.

[0111] In some embodiments, cache write control rules can be generated based on output size parameters, output timing parameters, and cache scheduling requirements. Specifically, output size parameters and output timing parameters can be used to determine the requirements of subsequent display output on image frame reading rhythm, valid data area, or cache update frequency; cache scheduling requirements can be used to determine the writing order, writing unit, and switching conditions of image frames between the first and second caches. By generating cache write control rules, the image frame cache write process can be matched with the subsequent cropping, reading, and display output processes.

[0112] In some embodiments, the method steps shown in Sc3 can be executed in conjunction with a cropping parameter dynamic configuration module and a data scheduling module. Specifically, the parameter real-time adjustment unit in the cropping parameter dynamic configuration module can generate dynamic cropping configuration data based on the cropping start position, cropping range, intra-frame read span, output size parameters, and output timing parameters; the parameter distribution unit can send the dynamic cropping configuration data to the data scheduling module. The channel configuration unit in the data scheduling module can configure the write buffer channel and the read cropping channel respectively based on the dynamic cropping configuration data, thereby obtaining the buffer write control rules and the cropping read control rules. Further, the write buffer channel is used to write image frames to the first buffer area and the second buffer area, and the read cropping channel is used to read the buffer frame data corresponding to the target cropping region from the buffer area where the image frames have been written.

[0113] In some embodiments, cache write control rules and crop read control rules together constitute part of the crop cache control information. By converting the crop start position, crop range, and intra-frame read span into crop read control rules, and converting the output size parameters, output timing parameters, and cache scheduling requirements into cache write control rules, the reading process of the target cropping region, the image frame cache write process, and the display output adaptation process can be executed collaboratively under the same crop cache control information, thereby improving the consistency and stability of dynamic image cropping and frame cache processing.

[0114] In one possible embodiment, the cache write control rules include cache write order, image frame write unit, and cache switching conditions.

[0115] The method steps shown in S103 can be implemented through S1031 and S1032. The method steps shown in S1031 and S1032 are described in detail below.

[0116] S1031. According to the writing order of the buffer, write the current image frame in the image frame sequence to be processed into one of the first and second buffers.

[0117] It should be noted that the buffer write order is used to characterize the sequential use of the first and second buffers during the image frame writing process. The image frame write unit is used to characterize the data granularity written to the buffer each time; for example, it can be a frame of image data or a set of valid pixel data corresponding to a frame of image data. The image dynamic cropping and frame buffering device can write the current image frame in the image frame sequence to be processed into one of the first and second buffers according to the buffer write order, making that buffer the currently written buffer carrying the buffered frame data corresponding to the current image frame.

[0118] In some embodiments, the first buffer and the second buffer can be two independent cache regions in a dual-zone storage module. Specifically, the dual-zone storage module can be implemented using Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), and the first and second buffers can correspond to different address spaces or different address mapping regions. By writing the current image frame to one of the buffers, the other buffer can retain the image frame data already written in the previous stage, thus providing a readable data basis for subsequent cropping and reading processes.

[0119] It should be noted that DDR SDRAM is only one optional implementation of the dual-zone storage module. In other embodiments, the dual-zone storage module can also be implemented using other external memory or on-chip storage resources, as long as it can provide a first cache area and a second cache area and support alternating write and read operations.

[0120] In some embodiments, the method steps shown in S1031 can be executed in cooperation between the data scheduling module and the dual-zone storage module. Specifically, the data scheduling module can configure a write cache channel according to the cache write control rules, and write the current image frame to one of the first and second cache areas through the write cache channel. The data scheduling module may include a channel configuration unit, a ping-pong scheduling unit, and a storage access interface unit; wherein, the channel configuration unit is used to determine the current write cache area and its corresponding write address according to the cache write control rules, the ping-pong scheduling unit is used to control the write state of the first and second cache areas according to the cache area write order, and the storage access interface unit is used to establish a data transmission path between the data scheduling module and the dual-zone storage module. The dual-zone storage module can store the current image frame in the corresponding cache area according to the write control of the data scheduling module.

[0121] In some embodiments, before writing an image frame, the data scheduling module can format the data corresponding to the image frame to be processed, so that the current image frame can be written to the first or second buffer according to the storage rules of the buffer. For example, the data scheduling module can convert streaming image data into pixel data corresponding to the row and column positions of the image, or organize the image frame to be processed according to row address, column address, and pixel data bit width before writing it to the buffer. Thus, the buffered frame data can be stored in the buffer in a way that allows it to be addressed by subsequent cropping and reading processes.

[0122] In some embodiments, the data scheduling module may further include a data verification unit and a format conversion unit. The data verification unit can be used to perform data integrity and validity checks on the data corresponding to the standardized image data stream or the image frame to be processed, and filter out invalid data generated during transmission. Data integrity checks may include at least one of frame data length detection, line data continuity detection, synchronization identifier matching detection, or checksum detection; validity checks may include at least one of data validity signal detection, pixel validity range detection, or abnormal frame filtering. Verifying image data through the data verification unit can reduce the probability of invalid data entering the subsequent buffer write process.

[0123] In some embodiments, the format conversion unit can be communicatively connected to the data verification unit to convert the verified standardized image data stream into a two-dimensional pixel matrix corresponding to the row and column positions of the image. The two-dimensional pixel matrix can organize pixel data according to the row and column directions of the image frame to be processed, and may include pixel values, row positions, column positions, and / or data validity identifiers. By converting the streaming image data into a two-dimensional pixel matrix, the data scheduling module can determine the write address, read start position, and intra-frame read span based on the image row and column positions when performing buffer writes and crop reads, thereby improving the accuracy of subsequent buffer addressing and crop reads.

[0124] In some embodiments, the data verification unit and the format conversion unit can be located within the data scheduling module, preceding the write buffer channel and the read cropping channel. Valid image data output by the data verification unit can be converted into a two-dimensional pixel matrix by the format conversion unit. This two-dimensional pixel matrix can serve as the data basis for writing to the first or second buffer via the write buffer channel. Therefore, the validity screening and row / column organization of image data can be completed before buffer writing, making subsequent buffer frame data more suitable for reading according to the target cropping region.

[0125] S1032. When the buffer switching conditions are met, the subsequent image frames in the image frame sequence to be processed are written to another buffer to obtain alternately written buffer frame data.

[0126] It should be noted that the buffer switching condition is used to characterize the triggering condition for switching the image frame writing object from the first buffer to the second buffer, or from the second buffer to the first buffer. After completing the writing of the current image frame or meeting the preset switching requirements, the image dynamic cropping and frame buffering device can write subsequent image frames to another buffer, so that the first buffer and the second buffer alternately undertake the image frame writing task, thereby obtaining alternately written buffered frame data.

[0127] In some embodiments, the buffer switching condition can be related to the frame write completion state, frame synchronization state, buffer writable state, or buffer readable state. For example, after the current write buffer completes the writing of the current image frame, the image dynamic cropping and frame buffering device can determine the current write buffer as the buffer for the written image frame and determine another buffer as the buffer for the next image frame to be written; or, for example, when a new frame synchronization signal is detected and another buffer is in a writable state, subsequent image frames can be written to that other buffer. Through the above switching methods, the first buffer and the second buffer can be alternately updated between different image frames.

[0128] In some embodiments, the method steps shown in S1032 can be executed by the ping-pong scheduling unit in the data scheduling module and the dual-zone storage module. Specifically, the ping-pong scheduling unit can generate buffer switching control information according to the buffer switching conditions, and control the write buffer channel to switch between the first buffer and the second buffer; the dual-zone storage module can switch the write enable state of the first buffer and the second buffer according to the buffer switching control information, so that subsequent image frames are written to another buffer that is different from the currently written buffer. In this way, an alternating write process similar to ping-pong buffering can be realized.

[0129] In some embodiments, the alternately written cached frame data may include image frame data stored in a first cache and a second cache, respectively. The currently written cache is used to receive the image frame input at the current stage, while the other cache, which has already contained image frames, can be read in subsequent cropping and reading processes. Thus, while ensuring that consecutive image frames can be cached, a stable data source can be provided for the cropping and reading process, reducing read / write wait times between image frame writing and target cropping region reading.

[0130] In this embodiment, the image dynamic cropping and frame buffering device can alternately buffer the sequence of image frames to be processed based on the buffer writing order, image frame writing unit, and buffer switching conditions. This allows the first and second buffers to perform the functions of writing or reading basic data at different stages. This processing method provides the conditions for reading the buffered frame data corresponding to the target cropping region from another buffer that has already written an image frame when writing an image frame in one buffer, thereby improving the parallel processing capability of image frame caching and cropping reading.

[0131] In one possible embodiment, the buffer switching condition includes at least one of the following: frame write completion condition, frame synchronization condition, and buffer status condition.

[0132] Specifically, if the buffer in the first buffer and the second buffer where the image frame is currently being written meets the condition for frame writing completion, the buffer where the image frame is currently being written is determined as the buffer where the image frame has been written, and the other buffer in the first buffer and the second buffer is determined as the buffer where the next image frame is to be written.

[0133] It should be noted that the buffer switching condition is used to determine whether the image dynamic cropping and frame buffering device needs to switch the writing target of subsequent image frames from the buffer currently performing image frame writing to another buffer. Since the first buffer and the second buffer are used alternately for image frame writing and cropping reading, by setting the buffer switching condition, the first buffer and the second buffer can be switched in an orderly manner between the writing state and the readable state, avoiding read-write conflicts caused by the image frame writing process and the cropping reading process accessing the same buffer.

[0134] In some embodiments, the frame write completion condition can be used to indicate that the buffer currently performing image frame writing has completed the data writing of the current image frame. For example, when all valid pixel data of the current image frame has been written to the buffer currently performing image frame writing, or when the data scheduling module detects the frame end identifier corresponding to the current image frame, it can be determined that the buffer currently performing image frame writing meets the frame write completion condition. The frame write completion condition ensures that the buffer identified as having written image frames stores complete buffer frame data, thereby providing a valid data foundation for subsequent cropping and reading processes.

[0135] In some embodiments, frame synchronization conditions can be used to characterize the switching time between adjacent image frames in a sequence of image frames to be processed. For example, the image dynamic cropping and frame buffering device can determine whether the frame synchronization condition is met based on the frame synchronization signal, the field synchronization signal, or the frame start identifier. When a new image frame is detected to be input, the buffer state condition can be combined to determine whether to write the new image frame into another buffer in the first and second buffers. By using frame synchronization conditions, the buffer switching process can be kept consistent with the image frame boundary, reducing the possibility of a single frame of image data being split and written to different buffers.

[0136] In some embodiments, buffer state conditions can be used to characterize whether the first and second buffers are currently in a writable, written, or readable state. For example, when a buffer is performing a cropped read, it can be marked as a read-occupied state; when a buffer has completed writing an image frame and has not yet been overwritten, it can be marked as a buffer with an image frame written; when a buffer is not read-occupied and allows new image frames to be written, it can be marked as a writable buffer. Buffer state conditions can prevent subsequent image frames from being written to a buffer that is currently being cropped, improving the reliability of the buffer scheduling process.

[0137] In some embodiments, when the buffer currently performing image frame writing in the first buffer and the second buffer meets the frame writing completion condition, the image dynamic cropping and frame caching device can determine the buffer currently performing image frame writing as the buffer of written image frames, and determine the other buffer among the first and second buffers as the buffer for the next image frame writing. That is, if the first buffer is used as the buffer for the current image frame writing and the current image frame writing is completed, the first buffer can be determined as the buffer of written image frames, and the second buffer can be determined as the buffer for the next image frame writing; correspondingly, if the second buffer is used as the buffer for the current image frame writing and the current image frame writing is completed, the second buffer can be determined as the buffer of written image frames, and the first buffer can be determined as the buffer for the next image frame writing.

[0138] In some embodiments, the buffer switching process can be executed by the ping-pong scheduling unit in the data scheduling module. Specifically, the ping-pong scheduling unit can generate a buffer switching control signal based on at least one of the frame write completion condition, frame synchronization condition, and buffer status condition, and control the write buffer channel to switch between the first buffer and the second buffer based on the buffer switching control signal. The dual-zone storage module can switch the write enable state of the first buffer and the second buffer based on the buffer switching control signal, so that the next image frame is written to the other buffer. At the same time, the buffer determined to have an image frame written can provide buffer frame data to the read cropping channel, so that the read cropping channel can read the data corresponding to the target cropping region based on the cropping read control rules.

[0139] In some embodiments, the first buffer and the second buffer can each be configured with a buffer status flag. The buffer status flag may include at least one of a writing in progress flag, a writing complete flag, a readable flag, a reading in progress flag, or a writable flag. The data scheduling module can determine whether the buffer status conditions are met based on the buffer status flags and update the buffer scheduling relationship when the status flags change. For example, after the current buffer meets the frame writing complete condition, the status flag of the current buffer can be updated from the writing in progress flag to the writing complete flag or the readable flag; after another buffer is determined to be the buffer for the next image frame to be written, the status flag of that other buffer can be updated to the writable flag or the writing in progress flag.

[0140] In some embodiments, through the buffer switching method described above, the first buffer and the second buffer can alternately assume the roles of write buffer and read buffer during continuous image frame processing. Thus, while the current image frame is being written to one buffer, the other buffer, which has already been written to, can be used by the cropping and reading process to read the cached frame data corresponding to the target cropping region. This enables parallel execution of image frame writing and cropping / reading, reduces read / write waiting time, and improves the continuity and stability of dynamic image cropping and frame buffer processing.

[0141] In some embodiments, the dual-zone storage module may include a storage control unit, a first cache, and a second cache. The storage control unit may be communicatively connected to a ping-pong scheduling unit in the data scheduling module, and is used to control the read enable and write enable states of the first and second caches according to the cache switching control signal generated by the ping-pong scheduling unit. Specifically, when the first cache is determined to be the cache for currently performing image frame writing, the storage control unit enables write access to the first cache and puts the second cache in a readable state; after the first cache completes image frame writing, the storage control unit can switch the read and write states of the first and second caches according to the cache switching control signal, making the second cache the cache for the next image frame writing and the first cache the cache for cropping and reading of the written image frame.

[0142] In some embodiments, the first buffer and the second buffer may have the same or compatible storage capacity and be configured with independent address mapping relationships. The address mapping relationship can be used to characterize the correspondence between row addresses, column addresses, pixel addresses, or frame start addresses of image frame data within the buffer. By configuring independent address mapping relationships for the first buffer and the second buffer, the data scheduling module can perform address addressing for different buffers when writing image frames and reading target cropping regions, reducing address conflicts between different buffers.

[0143] In some embodiments, the dual-zone storage module can support down-frequency storage processing. Specifically, when the standardized image data stream output by the image acquisition and processing module is inconsistent with the storage access frequency of the dual-zone storage module, the storage control unit can cooperate with the data scheduling module to perform rate adaptation on the image frame data written to the dual-zone storage module, so that the image frame data is written to the first buffer or the second buffer according to the storage access frequency supported by the dual-zone storage module. By down-frequency storage processing, the difference between the front-end image data input rate and the external storage access rate can be adapted, improving the stability of the image frame buffer writing process.

[0144] In one possible embodiment, the pruning read control rules include the read start position, the pruning read range, and the intra-frame read span.

[0145] The method steps shown in S104 can be implemented through S1041 and S1042. The method steps shown in S1041 and S1042 are described in detail below.

[0146] S1041. Determine the starting read position of the target cropping region in the buffer of another image frame that has been written, based on the read start position.

[0147] It should be noted that the read start position is used to characterize the starting read position of the target cropping region within the buffer of the image frame already written. The image dynamic cropping and frame buffering device can, while performing image frame writing in one of the first and second buffers, use the other buffer containing the already written image frame as the cropping read object, and determine the starting read position of the target cropping region within that cropping read object according to the read start position in the cropping read control rules. The starting read position can serve as the starting point for subsequent reading of the buffered frame data corresponding to the target cropping region.

[0148] In some embodiments, the starting read position can be determined based on the location of the target cropping region within the image frame to be processed. For example, when the target cropping region is described by its top-left corner coordinates, center point coordinates, or offset relative to the boundary of the image frame to be processed, the dynamic image cropping and frame caching device can determine the starting read position of the target cropping region in the cache based on this position description and the storage method of the cached frame data in the cache. In specific implementations, the starting read position can be represented as the starting read address within the cache, or as the starting read coordinates corresponding to the row and column positions of the cached frame data.

[0149] In some embodiments, the method steps shown in S1041 can be executed by the data scheduling module. Specifically, the data scheduling module can configure the read cropping channel according to the cropping read control rules, and determine the buffers in the first and second buffers where image frames have not yet been written and have already been written as the read objects of the read cropping channel. The channel configuration unit in the data scheduling module can configure the starting address or starting coordinates of the read cropping channel according to the read start position, so that the read cropping channel can start reading buffer frame data from the position corresponding to the target cropping area.

[0150] In some embodiments, the dual-zone storage module can be implemented using DDR SDRAM, with the first and second buffers corresponding to different address mapping regions. The data scheduling module can access the dual-zone storage module through the storage access interface unit and determine the starting read address within the corresponding address mapping region based on the read start position. Thus, the region position of the target cropping area in the image frame can be converted into the read position during the storage access process, providing an addressing basis for subsequent reading of cropped frame data.

[0151] S1042. Based on the clipping reading range and the intra-frame reading span, read the buffered frame data corresponding to the target clipping region starting from the starting reading position to obtain the clipping frame data.

[0152] It should be noted that the cropping read range characterizes the size of the target cropping region to be read from the cached frame data, while the intra-frame read span characterizes the row-to-row, column-to-column, or data block jump relationships when reading the cached frame data according to the image row-to-column structure. After determining the starting read position, the image dynamic cropping and frame buffering device can read the cached frame data corresponding to the target cropping region from that starting read position, based on the cropping read range and the intra-frame read span, to obtain the cropped frame data.

[0153] In some embodiments, the cropping read range may include the cropping read width, the cropping read height, or the effective pixel range corresponding to the target cropping region. The intra-frame read span can be determined based on the storage row width of the cached frame data, the pixel data bit width, the image frame resolution, or the cache address arrangement. For example, when the cached frame data is stored in a row-by-row manner, the read cropping channel can start reading the effective pixel data belonging to the target cropping region from the starting read position, and after completing the reading of the effective pixel data of that row, it jumps to the starting position of the target cropping region of the next row according to the intra-frame read span, until all the data defined by the cropping read range is read.

[0154] In some embodiments, the method steps shown in S1042 can be executed by the data scheduling module and the dual-zone storage module in cooperation. Specifically, the channel configuration unit in the data scheduling module can configure the read length, read count, and address jump mode of the read clipping channel according to the clipping read range and intra-frame read span; the read clipping channel can sequentially read the cached frame data corresponding to the target clipping region from the read object cache area in the dual-zone storage module through the storage access interface unit; the dual-zone storage module can respond to the read access of the read clipping channel and output the corresponding cached frame data. After reading is completed, the data scheduling module can organize the read cached frame data corresponding to the target clipping region into clipped frame data.

[0155] In some embodiments, the storage access interface unit in the data scheduling module can be implemented using an Advanced eXtensible Interface 4 (AXI4) Memory Map to establish a data read path between the data scheduling module and the dual-zone storage module. Through this interface, the data scheduling module can read data corresponding to the target cropping region from a buffer area already written to an image frame, according to the starting read position, cropping read range, and intra-frame read span configured in the read cropping channel. It should be noted that the AXI4 Memory Map is only one optional implementation; in other implementations, other storage access interfaces can also be used to implement data reading between the data scheduling module and the dual-zone storage module.

[0156] In some embodiments, the cropped frame data can be image data reorganized according to the row and column structure of the target cropped area. For example, after the read cropping channel reads the valid pixel data corresponding to the target cropped area row by row from the buffer, the data scheduling module can rearrange the read data into cropped image frames corresponding to the target cropped area according to the cropping read range. Thus, the cropped frame data can be directly used for subsequent output adaptation processing, or it can be further processed by format conversion, timing synchronization, or display driver processing to form display image data.

[0157] In this embodiment, the image dynamic cropping and frame buffering device can, based on cropping read control rules, simultaneously perform image frame writing in one buffer and accurately read the buffered frame data corresponding to the target cropping region from another buffer that has already written image frames. By coordinating the read start position, cropping read range, and intra-frame read span, reading irrelevant region data can be avoided, improving the accuracy of reading the target cropping region and further enhancing the parallel processing efficiency of image frame buffer writing and cropping read.

[0158] In one possible embodiment, the method steps for obtaining the image frame sequence to be processed can be implemented by Sd1 to Sd3, which are described in detail below.

[0159] Sd1: Obtain the raw image data stream.

[0160] It should be noted that the raw image data stream can be continuous image data output from a camera, video capture device, image sensor, or other image input source. The image dynamic cropping and frame buffering device can acquire the raw image data stream through the image acquisition and processing module. The raw image data stream may include at least one of the following: continuously input pixel data, synchronization signals, data validity signals, frame start identifiers, frame end identifiers, or transmission control information corresponding to the image acquisition device. By acquiring the raw image data stream, an initial image data source can be provided for the subsequent formation of the image frame sequence to be processed.

[0161] In some embodiments, the image acquisition and processing module may include a serial data receiving submodule and an image preprocessing submodule. The serial data receiving submodule can be used to communicate with a camera or video acquisition device and receive the raw image data stream output from an image input source. This raw image data stream can be a serially transmitted video stream or a parallel transmitted video stream; in specific implementations, the raw image data stream can come from a Mobile Industry Processor Interface (MIPI) camera, a Low Voltage Differential Signaling (LVDS) camera, a parallel image sensor, or other image acquisition interfaces, and this application does not limit this.

[0162] In some embodiments, the serial data receiving submodule can perform receive buffering and input timing identification on the received raw image data stream to determine the valid data intervals and synchronization intervals in the raw image data stream. Specifically, the serial data receiving submodule can identify frame synchronization information, line synchronization information, or data validity information in the raw image data stream, and provide the identification results along with the received image data to subsequent signal parsing and image preprocessing processes. In this way, it can be ensured that the subsequent processing object is valid image data that meets the requirements for image frame formation.

[0163] Sd2. Perform signal parsing and image preprocessing on the original image data stream to obtain a standardized image data stream.

[0164] It should be noted that signal parsing is used to convert the raw image data stream into an image data format that can be recognized by subsequent image processing, while image preprocessing is used to standardize the image data after signal parsing in terms of quality, format, or size. The image dynamic cropping and frame buffering device can sequentially perform signal parsing and image preprocessing on the raw image data stream to obtain a standardized image data stream. The standardized image data stream is used as the data basis for subsequent frame partitioning and buffer writing processes.

[0165] In some embodiments, signal parsing can be performed by a serial data receiving submodule within the image acquisition and processing module. Specifically, the serial data receiving submodule can perform at least one of the following processes on the raw image data stream: differential signal separation, synchronization decoding, and format conversion. Differential signal separation can be used to recover image data from differential transmission signals; synchronization decoding can be used to identify frame synchronization signals, line synchronization signals, or data validity signals; format conversion can be used to convert the received transmission format into an image data format that can be processed by a subsequent image preprocessing submodule. For example, the serial data receiving submodule can convert the raw image data stream into RAW format image data and send the RAW format image data to the image preprocessing submodule.

[0166] In some embodiments, image preprocessing can be performed by an image preprocessing submodule within the image acquisition and processing module. Specifically, the image preprocessing submodule can perform at least one of the following processes on the image data obtained after signal parsing: decompression, denoising, color restoration, resolution normalization, and pixel format conversion. Decompression can be used to restore compressed image data to pixel data usable for subsequent processing; denoising can be used to reduce image noise introduced during acquisition or transmission; color restoration can be used to restore the target color format according to the color arrangement of the image acquisition device; resolution normalization can be used to convert image data with different input resolutions into a size recognizable by subsequent buffering and cropping processes; and pixel format conversion can be used to convert image data into a preset color format or a preset data bit width.

[0167] In some embodiments, a standardized image data stream can be an image data stream with a unified data format, a unified synchronization identifier, and a unified transmission interface. For example, the image preprocessing submodule can convert RAW format image data into Red Green Blue 888 (RGB888) format image data, or into other data formats suitable for subsequent buffer writing and cropping reading.

[0168] In one specific implementation, the standardized image data stream can be an image data stream in AXI4-Stream format.

[0169] It should be noted that the AXI4-Stream format is only one optional implementation. In other implementations, other streaming data interfaces or internal image data buses can also be used to transmit standardized image data streams.

[0170] In some embodiments, after obtaining a standardized image data stream, the image acquisition and processing module can send the standardized image data stream to the data scheduling module. The data scheduling module can receive the standardized image data stream and use it for subsequent buffer writing, cropping and reading, or data format processing. By converting the original image data stream into a standardized image data stream, the impact of differences in format, resolution, and synchronization methods between different image input sources on subsequent dynamic image cropping and frame buffering processing can be reduced.

[0171] Sd3. Perform frame division processing on the standardized image data stream to obtain the image frame sequence to be processed.

[0172] It should be noted that standardized image data streams are typically image data input continuously over time. To facilitate subsequent buffer writing, buffer switching, and cropping / reading on a frame-by-frame basis, the image dynamic cropping and frame buffering device can perform frame division processing on the standardized image data stream to obtain a sequence of image frames to be processed. The sequence of image frames to be processed includes multiple image frames arranged in chronological order, and each image frame to be processed can serve as the basic object for subsequent writing to the first or second buffer.

[0173] In some embodiments, frame partitioning can be performed based on frame synchronization information, field synchronization information, frame start identifier, frame end identifier, line synchronization information, or data validity signals in the standardized image data stream. The image dynamic cropping and frame buffering device can identify the boundaries between adjacent frames and organize valid pixel data within the same frame boundary range into a single image frame to be processed. Through this processing, subsequent buffer writing can be performed in image frame writing units, avoiding the mixing of data from different image frames into the same buffer stage.

[0174] In some embodiments, frame segmentation processing can be performed by the image acquisition and processing module, or by the image acquisition and processing module and the data scheduling module in cooperation. Specifically, the image acquisition and processing module can determine the start and end positions of each frame based on the synchronization identifier in the standardized image data stream, and output the frame identifier corresponding to each image frame; the data scheduling module can form a sequence of image frames to be processed based on the frame identifier and valid pixel data, and use the sequence of image frames to be processed as the input object for subsequent buffer writing rules.

[0175] In some embodiments, each image frame in the sequence of image frames to be processed may include frame pixel data and frame description information. The frame description information may include at least one of the following: frame sequence number, image width, image height, pixel format, data bit width, frame synchronization identifier, line synchronization identifier, or effective pixel region information. By configuring frame description information for each image frame to be processed, basic data can be provided for subsequently determining image boundary information, intra-frame read span, buffer switching conditions, and cropping read control rules.

[0176] In some embodiments, after obtaining the image frame sequence to be processed, the image dynamic cropping and frame buffering device can provide the image frame sequence to be processed to the data scheduling module. The data scheduling module can write the current image frame in the image frame sequence to be processed into the first buffer or the second buffer according to the buffer write control rules, and switch the buffer according to the frame synchronization information or the frame write completion status.

[0177] In some embodiments, the external display terminal can be communicatively connected to the video output driver module and the configuration control module. The external display terminal receives display image data output by the video output driver module and displays the image data according to the corresponding display timing sequence. The external display terminal can also feed back the actual display state to the configuration control module, enabling the configuration control module to adjust the basic configuration data, clipping buffer control information, or dynamically clipping configuration data based on the actual display state.

[0178] In some embodiments, the actual display status fed back by the external display terminal may include the display position, display boundary, synchronization status, refresh status, or display stability status of the displayed image data. The configuration control module can determine whether the current cropping frame data matches the display terminal based on the actual display status fed back by the external display terminal, and trigger subsequent acquisition of display status feedback information and updating of cropping cache control information if there is a display offset, abnormal display boundary, or timing abnormality. By using the external display terminal as both the display output node and the feedback node, a closed-loop processing link can be formed where the display result reverses the adjustment of the cropping cache control information.

[0179] Figure 3 This is a flowchart illustrating another image dynamic cropping and frame buffering method provided in an embodiment of this application. Figure 3 As shown, in one possible embodiment, after the method steps shown in S105, the method further includes S201 to S203, which will be described in detail below.

[0180] S201. Obtain the display status feedback information corresponding to the displayed image data.

[0181] It should be noted that the display status feedback information is used to characterize the actual display status of the displayed image data on the display terminal. After outputting the displayed image data to the external display terminal, the image dynamic cropping and frame buffering device can obtain the display status feedback information from the external display terminal, so as to determine whether the current cropping and output adaptation results meet the display requirements based on the actual display status.

[0182] In some embodiments, the display status feedback information may include at least one of the following: display offset information, display boundary anomaly information, display scaling anomaly information, screen synchronization status information, display refresh status information, or display stability information. For example, when the displayed image data exhibits horizontal or vertical offset on the external display terminal, the display status feedback information may include the corresponding offset direction and offset amount; when the displayed image data exhibits boundary loss, incomplete display area, scaling distortion, or synchronization anomalies, the display status feedback information may include the corresponding anomaly type or anomaly status identifier.

[0183] In some embodiments, the method steps shown in S201 can be executed by an external display terminal and a configuration control module. Specifically, the external display terminal can receive and display the display image data output by the video output driver module, and detect or record the actual display state corresponding to the display image data; the configuration control module can communicate with the external display terminal and receive display state feedback information from the external display terminal. In this way, the actual display result of the display terminal can be fed back to the front-end cropping and buffering control process, so that the subsequent cropping and buffering control information can be adjusted according to the display result.

[0184] In some embodiments, display status feedback information can be obtained through the feedback interface of the display terminal, the status register, the display control signal detection circuit, or feedback instructions input from the host control device. For example, the external display terminal can feed back the actual horizontal synchronization status, vertical synchronization status, or display validity status to the configuration control module through a feedback pin; alternatively, the host control device can send feedback instructions to the configuration control module based on the display screen detection results. The above feedback methods are merely examples and do not constitute a limitation on the method of obtaining display status feedback information.

[0185] S202. Based on the displayed status feedback information, update the clipping cache control information to obtain the updated clipping cache control information.

[0186] It should be noted that after obtaining the display status feedback information, the image dynamic cropping and frame buffering device can update the currently used cropping buffer control information based on the display status feedback information, thus obtaining updated cropping buffer control information. The updated cropping buffer control information is used to control the buffer writing process and cropping reading process of subsequent image frames, so that the subsequent displayed image data can better meet the display requirements of the display terminal.

[0187] In some embodiments, display status feedback information can be used to correct control content related to the cropping area, or to correct control content related to the display output. For example, when the display status feedback information indicates that the displayed image data has a horizontal or vertical offset, the target cropping area position, the reading start position, or the cropping reading range in the cropping buffer control information can be adjusted; when the display status feedback information indicates that the displayed image data has an abnormal display ratio or missing boundaries, the cropping range, output size parameters, or the mapping relationship of the effective display area can be adjusted; when the display status feedback information indicates an abnormal output timing, the output timing parameters or control content related to display timing can be adjusted. Through the above update process, the cropping reading result can be gradually matched with the actual display state of the display terminal.

[0188] In some embodiments, the method steps shown in S202 can be executed in conjunction with the configuration control module and the trimming parameter dynamic configuration module. Specifically, the configuration control module can fine-tune the basic configuration data based on the displayed status feedback information to obtain updated basic configuration data; the trimming parameter dynamic configuration module can parse and adjust the updated basic configuration data to generate updated dynamic trimming configuration data. This updated dynamic trimming configuration data can serve as a specific implementation of updated trimming cache control information and may include updated cache write control rules and / or updated trimming read control rules.

[0189] In some embodiments, the real-time parameter adjustment unit in the cropping parameter dynamic configuration module can update parameters related to the cropping area, read position, output size, or output timing based on display status feedback information; the parameter distribution unit can send the updated cropping cache control information to the data scheduling module. After receiving the updated cropping cache control information, the data scheduling module can update the control parameters of the write cache channel and / or read cropping channel so that subsequent image frames can be cached and cropped according to the updated control criteria.

[0190] S203. Based on the updated cropping cache control information, cropping and frame buffering are performed on subsequent image frames.

[0191] It should be noted that after receiving the updated cropping buffer control information, the image dynamic cropping and frame buffering device can apply the updated cropping buffer control information to the processing of subsequent image frames. Subsequent image frames can be image frames in the sequence of image frames to be processed that have not yet undergone buffer writing and cropping reading, or they can be newly input image frames after the current display state feedback information is generated.

[0192] In some embodiments, the image dynamic cropping and frame caching device can redetermine the cache write control rules and crop read control rules based on the updated cropping cache control information, and alternately write subsequent image frames into the first cache area and the second cache area according to the redetermined cache write control rules; simultaneously, according to the redetermined crop read control rules, it reads the updated cache frame data corresponding to the target cropping region from the cache area where image frames have already been written, to obtain the cropped frame data corresponding to the subsequent image frames. Further, the cropped frame data corresponding to the subsequent image frames can continue to undergo output adaptation processing according to display adaptation information or updated display adaptation requirements to obtain the subsequent display image data.

[0193] In some embodiments, the method steps shown in S203 can be executed by the data scheduling module, the dual-zone storage module, and the video output driver module in cooperation. Specifically, the data scheduling module can receive updated cropping buffer control information and update the configuration of the write buffer channel and the read cropping channel accordingly; the dual-zone storage module can continue to provide the first buffer and the second buffer for subsequent image frames in an alternating buffering manner; the video output driver module can perform output adaptation processing on the cropping frame data corresponding to the subsequent image frames and output the resulting subsequent display image data to an external display terminal.

[0194] In some embodiments, the updated cropping buffer control information can take effect at a preset update time. For example, the updated cropping buffer control information can take effect before subsequent image frames begin writing, after the buffer switching is completed, or after a frame synchronization signal is detected. By applying the updated cropping buffer control information at a preset update time, display jumps or cropping region anomalies caused by directly switching control parameters during the processing of the current image frame can be reduced.

[0195] In this embodiment, the image dynamic cropping and frame buffering device can update the cropping buffer control information according to the actual display state of the displayed image data, and apply the updated cropping buffer control information to subsequent image frame processing. This forms a feedback adjustment link from the display result to the cropping buffer control, enabling the image dynamic cropping and frame buffering method to continuously correct the cropping and output adaptation parameters according to the actual state of the display, thereby improving the matching and display stability between the cropped image and the display output.

[0196] In a specific example, the resolution of the image frame to be processed can be 1920×1080, the target display resolution of the external display terminal can be 800×600, the pixel clock can be 60MHz, and the refresh rate can be 60Hz. The configuration control module can generate basic configuration data based on the externally input cropping parameter instructions and the display parameters of the external display terminal. The cropping parameter dynamic configuration module can generate dynamic cropping configuration data based on the basic configuration data. This dynamic cropping configuration data can include parameters such as write buffer address, read start position, cropping read range, and intra-frame read span.

[0197] In this specific example, the data scheduling module can configure the write buffer channel and the read clipping channel according to the dynamic clipping configuration data. The write buffer channel can write the image frame to be processed into the first buffer or the second buffer. The read clipping channel can read 800×600 clipped frame data from another buffer that has already written image frames, based on the read start position, the clipping read range, and the intra-frame read span. The read process can be executed in parallel with the write process of the other buffer. The video output driver module can generate a display timing signal based on a 60MHz pixel clock and a 60Hz refresh rate, and synchronize the clipped frame data with the display timing signal to obtain the display image data, which is then output to the external display terminal.

[0198] In this specific example, when the external display terminal reports a horizontal offset in the displayed image data, the configuration control module can fine-tune the basic configuration data based on this display status feedback. The dynamic cropping parameter configuration module can update the dynamic cropping configuration data based on the fine-tuned basic configuration data and send the updated dynamic cropping configuration data to the data scheduling module. The data scheduling module can then perform cache writing and cropping reading processing on subsequent image frames based on the updated dynamic cropping configuration data, thereby achieving closed-loop calibration of the cropped display effect. It should be noted that the resolution, pixel clock, refresh rate, and cropping size mentioned above are merely exemplary parameters and do not constitute a limitation on the scope of protection of this application.

[0199] In one specific embodiment, the image dynamic cropping and frame buffering device can be implemented based on a heterogeneous architecture of a Field Programmable Gate Array (FPGA) and a System on Chip (SoC). Specifically, the image acquisition and processing module, data scheduling module, and video output driver module can be deployed in the Programmable Logic (PL) section of the FPGA, while the configuration control module and the dynamic configuration module for cropping parameters can be deployed in the Processing System (PS) section of the SoC. The dual-zone storage module can be implemented using external high-speed memory and can be connected to the FPGA's PL section via an Advanced eXtensible Interface 4 (AXI4) memory map. The external display terminal can be a Liquid Crystal Display (LCD). It should be noted that the above-described FPGA+SoC heterogeneous architecture is only one specific implementation method. In other embodiments, image processing chips, embedded processors, or other electronic devices with image processing capabilities can also be used to implement the methods provided in this application.

[0200] In this specific embodiment, the image acquisition and processing module may include a serial data receiving submodule and an image preprocessing submodule. The serial data receiving submodule can be implemented using a Mobile Industry Processor Interface (MIPI) core within the FPGA. It receives 1920×1080 resolution raw video stream data acquired by the MIPI camera and performs differential signal separation, synchronous decoding, and format conversion on the raw video stream data to obtain RAW10 format image data. The image preprocessing submodule can be implemented based on FPGA logic circuits. It sequentially decompresses, performs Gaussian noise reduction, white balance adjustment, and color restoration on the RAW10 format image data, and converts the processed image data into a 24-bit Red Green Blue 888 (RGB888) format image data stream using the Advanced eXtensible Interface 4-Stream (AXI4-Stream) format before sending it to the data scheduling module.

[0201] In this specific embodiment, the configuration control module can be implemented based on the ARM Cortex-A9 core of the SoC. It can receive cropping parameter commands sent by the host computer and display parameters from the external display terminal via a serial port, generating basic configuration data and data scheduling commands. The basic configuration data provides the parameter source required by the dynamic configuration module for determining the cropping cache control information. The data scheduling commands control the data scheduling module to perform data scheduling operations such as cache writing, cache switching, and cropping reading. The configuration control module can also receive the actual display status feedback from the external display terminal through a general-purpose input / output interface (GPIO) and fine-tune the basic configuration data according to the actual display status. In one example, the initial cropping parameters can be "the center 800×600 area of ​​a 1920×1080 image," and the display parameters can be "800×600 resolution, 60MHz pixel clock, and 60Hz refresh rate."

[0202] In this specific embodiment, the dynamic configuration module for pruning parameters can be implemented based on software programs in the SoC and may include a parameter parsing unit, a real-time parameter adjustment unit, and a parameter distribution unit. The parameter parsing unit can parse the basic configuration data sent by the configuration control module, extracting the initial write cache address, the initial read pruning start address, the pruning read range, the intra-frame read span, and display adaptation parameters. In one example, the initial write cache address can be 0x04000000, the initial read pruning start address can be 0x04025800, the pruning row width can be 800, the pruning column height can be 600, and the data step size can be 1920.

[0203] In this specific embodiment, when the host computer sends an online modification command to "shift the cropping area 100 pixels to the right," the real-time parameter adjustment unit can update the initial cropping start address according to the online modification command. For example, the cropping start address can be updated from 0x04025800 to 0x04027600 to generate dynamic cropping configuration data. The parameter distribution unit can distribute the dynamic cropping configuration data to the channel configuration unit of the data scheduling module in real time through the Advanced eXtensible Interface 4-Lite (AXI4-Lite) interface. Through the above processing, the cropping parameter dynamic configuration module can update the cropping reading-related parameters without interrupting image data transmission and buffer processing, thereby supporting online adjustment of the cropping area.

[0204] In this specific embodiment, the data scheduling module can be implemented based on FPGA logic circuits and may include a data verification unit, a format conversion unit, a channel configuration unit, a ping-pong scheduling unit, and an AXI4-Memory Map interface unit. The data verification unit can use a 32-bit Cyclic Redundancy Check (CRC32) algorithm to perform data integrity and validity checks on the AXI4-Stream format image data stream and filter out invalid data during transmission. The format conversion unit can convert the verified image data stream into a 1920×1080 row-column aligned two-dimensional pixel matrix. The channel configuration unit can configure the address, data step size, and cropping size parameters of the write buffer channel and read cropping channel according to the dynamic cropping configuration data. The ping-pong scheduling unit can generate ping-pong switching instructions with a 20ms cycle to control the buffer switching of the dual-zone storage module. The AXI4-Memory Map interface unit can establish a high-speed data transmission link between the data scheduling module and the dual-zone storage module; in one example, the transmission rate of this data transmission link can reach 1.2Gbps.

[0205] In this specific embodiment, the dual-zone storage module can be implemented using Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM) and may include a storage control unit, a first cache, and a second cache. For ease of description, the first cache may correspond to cache A, and the second cache may correspond to cache B. The capacity of both cache A and cache B can be 256MB. The storage control unit can be implemented based on FPGA logic circuits and can receive switching instructions sent by the ping-pong scheduling unit to control the read / write enable states of cache A and cache B. When the write cache channel writes image data to cache A, the read clipping channel can read the written cache frame data from cache B for clipping; when cache A is finished writing, the storage control unit can control the write cache channel and the read clipping channel to switch to the corresponding cache, so that the write cache channel writes subsequent image frames to cache B, and the read clipping channel reads the cache frame data corresponding to the target clipping area from cache A. Through this processing method, parallel execution of image frame writing and clipping reading can be achieved.

[0206] In this specific embodiment, both buffer A and buffer B can support downclocked storage. For example, the dual-zone storage module can reduce the storage access frequency of the image frame data to be written from 200MHz to 100MHz to adapt to the difference between the front-end image data input rate and the external storage access rate. Buffer A and buffer B can also be configured with independent address mapping tables, so that the data scheduling module can perform address addressing for different buffers when writing image frames and reading target cropped regions, reducing address conflicts between different buffers.

[0207] In this specific embodiment, the video output driver module can be implemented based on FPGA logic circuits and may include a timing acquisition unit, a timing generation unit, and a data synchronization unit. The timing acquisition unit can acquire display parameters such as horizontal and vertical synchronization parameters, a 60MHz pixel clock, and an 800×600 resolution from the external display terminal. The timing generation unit can generate a 60Hz refresh rate display timing signal based on the aforementioned display parameters. The data synchronization unit can synchronize the cropped 800×600 image data with the display timing signal to obtain display image data, and send it to the external display terminal via a Low Voltage Differential Signaling (LVDS) interface.

[0208] In this specific embodiment, the external display terminal can be an 800×600 resolution LCD screen. The external display terminal can receive and display the display image data sent by the video output driver module in real time. At the same time, it can send the actual horizontal and vertical synchronization status of the display to the configuration control module through the feedback pin, so that the configuration control module can adjust the basic configuration data, clipping buffer control information, or dynamic clipping configuration data according to the actual display status, thereby realizing closed-loop calibration of the clipping parameters.

[0209] In one specific embodiment, the image dynamic cropping and frame buffering method can be executed based on the aforementioned device. First, the MIPI camera can acquire raw video stream data at a resolution of 1920×1080. The serial data receiving submodule in the image acquisition and processing module performs differential signal separation and synchronous decoding on the raw video stream data to obtain RAW10 format image data. The image preprocessing submodule performs decompression, Gaussian noise reduction, white balance adjustment, and color restoration on the RAW10 format image data to obtain a 24-bit RGB888 AXI4-Stream format image data stream, which is then sent to the data scheduling module.

[0210] The configuration control module can receive initial cropping parameters and LCD display parameters from the host computer via serial port. The initial cropping parameters can be the center 800×600 area of ​​a 1920×1080 image, and the display parameters can include 800×600 resolution, 60MHz pixel clock, and 60Hz refresh rate. Based on these initial cropping and display parameters, the configuration control module generates basic configuration data and a 20ms periodic ping-pong switching data scheduling command, which is then sent to the cropping parameter dynamic configuration module and the data scheduling module, respectively.

[0211] The parameter parsing unit in the dynamic cropping parameter configuration module can parse the basic configuration data and extract the initial cropping parameters. When it receives an online modification command from the host computer to "shift the cropping area 100 pixels to the right", the real-time parameter adjustment unit can update the cropping start address from 0x04025800 to 0x04027600, generating dynamic cropping configuration data. The parameter distribution unit can then distribute the dynamic cropping configuration data to the channel configuration unit of the data scheduling module in real time via the AXI4-Lite bus. Through this step, dynamic cropping parameter updates can be completed without stopping image data transmission.

[0212] The data verification unit in the data scheduling module can perform CRC32 integrity verification on the AXI4-Stream format image data stream and filter out invalid data; the format conversion unit can convert the verified image data stream into a 1920×1080 row-column aligned two-dimensional pixel matrix. The channel configuration unit in the data scheduling module can configure the write buffer channel according to the dynamic cropping configuration data, and the ping-pong scheduling unit can generate ping-pong switching instructions with a 20ms cycle to control the switching between buffer A and buffer B of the dual-zone storage module; the two-dimensional pixel matrix can be sent to the dual-zone storage module through the AXI4-Memory Map interface unit according to the write buffer address 0x04000000, and the dual-zone storage module can downclock the image frame data from 200MHz to 100MHz for storage.

[0213] While writing image frames to the write buffer channel, the channel configuration unit can also configure the read cropping channel based on dynamic cropping configuration data. The read cropping channel can read data from another buffer in the dual-zone storage module containing already written image frames, based on the read cropping start address 0x04027600, cropping row width 800, cropping column height 600, and data step size 1920, to obtain 800×600 cropped frame data. This read process can be executed in parallel with the write process to the other buffer, thereby reducing data waiting time.

[0214] The timing acquisition unit in the video output driver module can acquire the horizontal and vertical synchronization parameters of the LCD display and the 60MHz pixel clock; the timing generation unit can generate a display timing signal with a 60Hz refresh rate; the data synchronization unit can synchronize the 800×600 cropped frame data with the display timing signal to obtain the display image data, and send it to the LCD display for display through the LVDS interface.

[0215] During the display process, the LCD screen can send the actual horizontal and vertical synchronization status to the configuration control module via feedback pins. When the configuration control module detects a 1-pixel horizontal offset in the cropped image, it can fine-tune the basic configuration data, such as adjusting the cropping start address by 1 pixel. The cropping parameter dynamic configuration module can update the dynamic cropping configuration data based on the fine-tuned basic configuration data and send the updated dynamic cropping configuration data to the data scheduling module. This allows the data scheduling module to perform buffer writing and cropping reading processing on subsequent image frames based on the updated dynamic cropping configuration data, thereby achieving closed-loop calibration of the cropping effect.

[0216] In one example, the processing latency of the above-mentioned dynamic image cropping and frame buffering process can be 25ms. During the online modification of cropping parameters, the displayed image data can maintain smooth and uninterrupted output, and the cropped image can be stably displayed on the LCD screen. It should be noted that the above-mentioned parameters such as resolution, pixel clock, refresh rate, buffer capacity, address, period, transmission rate, and processing latency are all exemplary parameters and do not constitute a limitation on the scope of protection of this application.

[0217] Figure 4 This is a schematic diagram of another image dynamic cropping and frame buffering device provided in an embodiment of this application. Figure 4 As shown, the image dynamic cropping and frame buffering device 400 includes an information acquisition module 401, a control information determination module 402, a buffer writing module 403, a cropping reading module 404, and a display adaptation module 405.

[0218] The information acquisition module 401 is used to acquire the image frame sequence to be processed, cropping requirement information and display adaptation information in response to the image display task.

[0219] The control information determination module 402 is used to determine the clipping cache control information based on the clipping requirement information and display adaptation information. The clipping cache control information includes cache write control rules and clipping read control rules.

[0220] The cache writing module 403 is used to alternately write image frames from the image frame sequence to be processed into the first cache area and the second cache area based on the cache writing control rules, so as to obtain cache frame data.

[0221] The cropping and reading module 404 is used to read the cache frame data corresponding to the target cropping area from the other cache that has already written the image frame, based on the cropping and reading control rules, when one of the first and second caches performs image frame writing, to obtain the cropping frame data.

[0222] The display adaptation module 405 is used to perform output adaptation processing on the cropped frame data according to the display adaptation information to obtain the display image data.

[0223] It should be noted that the specific process of each module in the image dynamic cropping and frame buffering device executing the above method has been described in detail in the above embodiments, and this embodiment does not make specific limitations on it.

[0224] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 provided in this embodiment includes a memory 501 and a processor 502.

[0225] The memory 501 can be a separate physical unit, connected to the processor 502 via a bus 503. Alternatively, the memory 501 and processor 502 can be integrated and implemented in hardware. The memory 501 stores program instructions, which the processor 502 calls to execute the operations performed by the image dynamic cropping and frame buffering device in any of the above method embodiments.

[0226] Optionally, when some or all of the methods in the above embodiments are implemented by software, the electronic device 500 may also include only the processor 502. A memory 501 for storing programs is located outside the electronic device 500, and the processor 502 is connected to the memory via circuits / wires to read and execute the programs stored in the memory. The processor 502 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 502 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0227] The memory 501 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0228] For example, this application provides a chip including: an interface circuit and a logic circuit. The interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips outside the chip. The logic circuit is used to perform the operations performed by the image dynamic cropping and frame buffering device in the above method embodiments.

[0229] For example, this application provides a computer-readable storage medium storing computer program instructions thereon, which are executed by the processor of an electronic device to cause the electronic device to perform the operations performed by the image dynamic cropping and frame buffering device in the above method embodiments.

[0230] For example, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the operations performed by the image dynamic cropping and frame buffering device in the above method embodiments.

[0231] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for dynamic image cropping and frame buffering, characterized in that, The method includes: In response to an image display task, the system acquires the image frame sequence to be processed, cropping requirements, and display adaptation information. Based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information, cropping cache control information is determined, which includes cache write control rules and cropping read control rules. Based on the cache write control rules, the image frames in the image frame sequence to be processed are alternately written into the first cache area and the second cache area to obtain cache frame data; When one of the first and second buffers performs image frame writing, the buffer frame data corresponding to the target cropping area is read from the other buffer that has already written the image frame, based on the cropping read control rule, to obtain the cropping frame data; The cropped frame data is output and adapted based on the display adaptation information to obtain the display image data.

2. The method according to claim 1, characterized in that, The step of determining cropping cache control information based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information includes: Based on the image attribute information and the cropping requirement information, the target cropping region description information is determined; Based on the display adaptation information, determine the target output description information; The cropping buffer control information is determined based on the image attribute information, the target cropping region description information, and the target output description information.

3. The method according to claim 2, characterized in that, The step of determining the target cropping region description information based on the image attribute information and the cropping requirement information includes: Based on the image attribute information and the cropping requirement information, the initial cropping area information is determined; In response to the cropping adjustment information, the initial cropping area information is updated to obtain the updated cropping area information; Based on the image boundary information corresponding to the image frame sequence to be processed, the updated cropping region information is subjected to boundary constraint processing to obtain the target cropping region description information.

4. The method according to claim 2, characterized in that, The step of determining the cropping buffer control information based on the image attribute information, the target cropping region description information, and the target output description information includes: Based on the image attribute information and the target cropping region description information, determine the cropping start position, cropping range, and intra-frame reading span; Based on the target output description information, determine the output size parameters and output timing parameters; The cache write control rule and the clipping read control rule are generated based on the clipping start position, the clipping range, the intra-frame read span, the output size parameter, and the output timing parameter.

5. The method according to claim 1, characterized in that, The cache write control rules include the cache write order, image frame write unit, and cache switching conditions; The step of alternately writing image frames from the image frame sequence to be processed into the first buffer and the second buffer based on the buffer write control rules includes: According to the writing order of the buffers, the current image frame in the sequence of image frames to be processed is written into one of the first buffer and the second buffer; If the buffer switching condition is met, subsequent image frames in the image frame sequence to be processed are written to another buffer, resulting in alternately written buffer frame data.

6. The method according to claim 5, characterized in that, The buffer switching conditions include at least one of the following: frame write completion condition, frame synchronization condition, and buffer status condition; Wherein, if the buffer in the first buffer and the second buffer where image frame writing is currently performed meets the frame writing completion condition, the buffer in the current image frame writing is determined as the buffer in which image frames have been written, and the other buffer in the first buffer and the second buffer is determined as the buffer in the next image frame writing.

7. The method according to claim 1, characterized in that, The cropping and reading control rules include the reading start position, the cropping and reading range, and the intra-frame reading span; The step of reading the cached frame data corresponding to the target cropping region from the cache of another image frame that has already been written, based on the cropping read control rule, to obtain the cropping frame data, includes: Based on the read start position, determine the start read position of the target cropping region in the buffer of the other image frame that has been written; Based on the cropping read range and the intra-frame read span, the cached frame data corresponding to the target cropping region is read starting from the starting read position to obtain the cropped frame data.

8. The method according to claim 1, characterized in that, Obtain the image frame sequence to be processed, including: Obtain the raw image data stream; The original image data stream is subjected to signal parsing and image preprocessing to obtain a standardized image data stream; The standardized image data stream is divided into frames to obtain the image frame sequence to be processed.

9. The method according to claim 1, characterized in that, After performing output adaptation processing on the cropped frame data according to the display adaptation information to obtain display image data, the method further includes: Obtain the display status feedback information corresponding to the displayed image data; Based on the display status feedback information, the clipping cache control information is updated to obtain the updated clipping cache control information; Based on the updated cropping cache control information, subsequent image frames are cropped and cached.

10. An image dynamic cropping and frame buffering device, characterized in that, The device includes: The information acquisition module is used to acquire the image frame sequence to be processed, cropping requirement information and display adaptation information in response to the image display task; The control information determination module is used to determine cropping cache control information based on the image attribute information of the image frames in the image frame sequence to be processed, the cropping requirement information, and the display adaptation information. The cropping cache control information includes cache write control rules and cropping read control rules. The cache writing module is used to alternately write image frames from the image frame sequence to be processed into the first cache area and the second cache area based on the cache writing control rules, so as to obtain cache frame data; The cropping and reading module is used to read the cache frame data corresponding to the target cropping area from the other cache area that has already written the image frame, based on the cropping and reading control rules, when one of the first cache area and the second cache area performs image frame writing, to obtain cropping frame data; The display adaptation module is used to perform output adaptation processing on the cropped frame data according to the display adaptation information to obtain display image data.