Image data processing device, method, equipment and storage medium
By using the intermediate cache module to store and process images in blocks in image processing, the problem of YUV cache occupying a large amount of memory is solved, memory saving and data processing delay reduction are achieved, and image processing efficiency is improved.
Patent Information
- Application Number
- CN202410977347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In existing image processing technology, the YUV cache occupies a large amount of memory, resulting in insufficient system memory, especially when processing high-resolution images, especially when the YUV image output by the ISP has a resolution of 3840x2160, one YUV cache takes up 9.4% of system memory.
Using the intermediate cache module, by storing and processing images in blocks, only two intermediate cache blocks are cached instead of the entire frame of the image, thereby reducing the memory occupied by the cache and reducing the data processing delay.
It effectively reduces the memory resources occupied by the cache, saves memory resources, reduces data processing delay, and improves image processing efficiency.
Smart Images

Figure CN118505489B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image data processing apparatus, method, device and storage medium. Background Art
[0002] As users' requirements for image quality increase, image processing technology is also constantly improving. From the initial simple beautification to the current detailed processing, users' requirements for image quality have promoted the development of image processing technology.
[0003] In order to meet the user's requirements for image quality as much as possible, in the relevant technology, the camera captures video information and transmits it to the ISP (Image Signal Processor) hardware. The ISP hardware processes RAW (a raw image format) data and YUV (a color encoding method) data. The processed YUV data is processed by the offline image processing engine for secondary processing, such as rotation, occlusion, OSD (On-Screen Display) overlay and other operations. Finally, the processed YUV data is sent to the post-encoding module or other offline image processing engines for other processing.
[0004] However, the memory size of some image processing products is very limited, and the memory usage of the YUV cache directly determines the memory usage of the system. For example, when the resolution of the YUV image output by the ISP is 3840x2160, if the size of a frame is 3840x2160x1.5 = 12MB (NV21 format), but the total system memory may be only 128MB or even lower than 64MB, a YUV cache occupies 9.4% of the system memory (128MB), which is very memory-consuming. Summary of the invention
[0005] The embodiments of the present application provide an image data processing device, method, equipment and storage medium, which can reduce the YUV buffer and save memory. The technical solution is as follows:
[0006] According to a first aspect of an embodiment of the present application, there is provided an image data processing device, the device comprising:
[0007] A first processing module, a second processing module and an intermediate cache module, wherein the intermediate cache module is electrically connected to the first processing module and the second processing module respectively;
[0008] The first processing module is used to obtain the t-th intermediate image block, store the t-th intermediate image block in the first cache address block of the intermediate cache module; obtain the t+1-th intermediate image block, and after storing the t-th intermediate image block in the first cache address block, store the t+1-th intermediate image block in the second cache address block of the intermediate cache module; t is an integer greater than or equal to 1;
[0009] The second processing module is used to obtain the tth intermediate image block from the first cache address block and process the tth intermediate image block after the first processing module stores the tth intermediate image block to the first cache address block; after processing the tth intermediate image block, obtain the t+1th intermediate image block from the second cache address block and process the t+1th intermediate image block.
[0010] In some possible implementations, the intermediate cache module is provided with at least two cache address blocks.
[0011] In some possible implementations, the size of the intermediate buffer module is smaller than the size of a frame of image to be processed.
[0012] In some possible implementations, the first processing module is further configured to:
[0013] A first cache address block is determined, where the first cache address block is a cache address block having a first tag value, and the cache address block is part of the intermediate cache module; the first tag value indicates that the corresponding cache address block is free.
[0014] In some possible implementations, the first processing module is further configured to:
[0015] After determining the first cache address block, the first tag value corresponding to the first cache address block is updated to a second tag value, and the second tag value indicates that the corresponding first cache address block is occupied.
[0016] In some possible implementations, the first processing module is further configured to:
[0017] After the t-th intermediate image block is stored in the first cache address block, a t-th notification instruction is generated and sent to the second processing module, where the t-th notification instruction indicates the corresponding first cache address block.
[0018] In some possible implementations, the first processing module is further used to obtain a t-th image block to be processed; process the t-th image block to be processed to obtain a t-th intermediate image block, where the image block to be processed is a part of the image to be processed;
[0019] The tth intermediate image block is stored in the corresponding first cache address block.
[0020] In some possible implementations, the device further includes an input cache module, which is electrically connected to the first processing module;
[0021] The first processing module is further used for:
[0022] Get the preset block;
[0023] The image block to be processed is read from the input buffer module; the size of the image block to be processed is the size of the preset block.
[0024] In some possible implementations, the second processing module is further configured to:
[0025] Receive the tth notification instruction; obtain the tth intermediate image block from the corresponding first cache address block based on the tth notification instruction; process the tth intermediate image block to obtain the tth target image block; the tth target image block is a part of the target image.
[0026] In some possible implementations, the second processing module is further configured to:
[0027] After acquiring the tth intermediate image block, the second mark value of the corresponding first cache address block is updated to the first mark value.
[0028] In some possible implementations, the device further includes an output cache module, which is electrically connected to the second processing module;
[0029] The second processing module is further used to store the t-th target image block into the t-th output address block; the t-th output address block is a part of the output buffer module;
[0030] Get the end address of the tth output address block;
[0031] The end address is used as the starting address of the t+1th output address block, and the t+1th output address block is used to store the t+1th target image block.
[0032] In some possible implementations, the device further includes a third processing module 700, and the third processing module is electrically connected to the output buffer module;
[0033] The second processing module is further used to generate an interrupt signal after obtaining a frame of the target image;
[0034] The third processing module is used to obtain a frame of the target image from the output buffer module based on the interrupt signal and process the target image.
[0035] According to a second aspect of an embodiment of the present application, there is provided an image data processing method, which is applied to the above-mentioned image data processing device, and the method includes:
[0036] Obtain the tth intermediate image block, and store the tth intermediate image block in a first cache address block of an intermediate cache module; obtain the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, store the t+1th intermediate image block in a second cache address block of the intermediate cache module; t is an integer greater than or equal to 1;
[0037] After the first processing module stores the tth intermediate image block to the first cache address block, the tth intermediate image block is obtained from the first cache address block and the tth intermediate image block is processed; after processing the tth intermediate image block, the t+1th intermediate image block is obtained from the second cache address block and the t+1th intermediate image block is processed.
[0038] According to a third aspect of an embodiment of the present application, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one program, and the at least one program is loaded by the processor and executes the image data processing method as described above.
[0039] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the above-mentioned image data processing method.
[0040] In an embodiment of the present application, an image data processing device is provided, wherein a first processing module obtains the tth intermediate image block, stores the tth intermediate image block in the first cache address block of the intermediate cache module; obtains the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, stores the t+1th intermediate image block in the second cache address block of the intermediate cache module. After the first processing module stores the tth intermediate image block in the first cache address block of the intermediate cache module, the second processing module obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the second processing module obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block. It can be seen from the above technical solution that in the embodiment of the present application, the intermediate cache module only needs to cache two intermediate cache blocks, and does not need to cache the entire frame image, thereby greatly reducing the memory occupied by the cache, thereby greatly saving memory resources. In addition, since the first processing module will write an intermediate image block into the intermediate cache module after generating it, the second processing module can obtain the intermediate image block from the intermediate cache module, thereby reducing the delay of the second processing module in obtaining data to the processing and writing time of obtaining an intermediate image block, rather than the processing and writing time of the entire frame of the image, thereby reducing the data processing delay of the entire device. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 is a schematic diagram of an implementation environment provided according to an embodiment of the present application;
[0043] Figure 2 is a structural schematic diagram of an image data processing device provided according to an embodiment of the present application;
[0044] Figure 3 is a schematic diagram of the principle of processing image data by an image data processing device provided in an embodiment of the present application;
[0045] Figure 4 This is a first principle schematic diagram of processing image data by the first processing module and the second processing module provided in an embodiment of the present application;
[0046] Figure 5 is a second principle schematic diagram of processing image data by the first processing module and the second processing module provided in an embodiment of the present application;
[0047] Figure 6 is a schematic diagram of a structure in which a first processing module is electrically connected to an input buffer module according to an embodiment of the present application;
[0048] Figure 7 It is a structural schematic diagram of an electrical connection between a second processing module and an output buffer module provided in an embodiment of the present application;
[0049] Figure 8 is a flowchart of an image data processing method provided according to an embodiment of the present application;
[0050] Fig. 9 is a schematic diagram of the structure of a terminal provided according to an embodiment of the present application;
[0051] Fig.10 It is a structural diagram of a server provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0053] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0054] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms.
[0055] These terms are only used to distinguish one element from another element. For example, without departing from the scope of various examples, a first action can be referred to as a second action, and similarly, a second action can also be referred to as a first action. Both the first action and the second action can be actions, and in some cases, can be separate and different actions.
[0056] Here, at least one means one or more than one, for example, at least one action can be one action, two actions, three actions, or any other action that is an integer greater than or equal to one. And multiple means two or more than two, for example, multiple actions can be two actions, three actions, or any other action that is an integer greater than or equal to two.
[0057] Figure 1 It is a schematic diagram of an implementation environment provided according to an embodiment of the present application, and the implementation environment may include a terminal 101 and a server 102.
[0058] In the terminal 101, an image data processing device is provided. For example, the image data processing device may include but is not limited to an ISP RAW image processing engine, an ISP YUV image processing engine and an offline processing module etc. which are provided on a computer.
[0059] The terminal 101 may be a smart phone with an image data processing device, a wearable device, a personal computer, a laptop computer, a tablet computer, a smart TV, a car terminal, etc.
[0060] The server 102 may be a single server, a server cluster consisting of multiple servers, or a cloud processing center.
[0061] The terminal 101 is connected to the server 102 via a wired or wireless network.
[0062] In some embodiments, the wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, private network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above data communication technology.
[0063] Figure 2is a structural diagram of an image data processing device 200 provided according to an embodiment of the present application. Figure 2 The image data processing device 200 includes a first processing module 201 , a second processing module 203 and an intermediate buffer module 202 .
[0064] The first processing module 201 and the second processing module 203 may be one physical module or two different modules.
[0065] In some embodiments, in order to improve the image data processing efficiency, the image data processing device may run multiple pipelines simultaneously, and each pipeline may involve a first processing module 201 , a second processing module 203 , and an intermediate buffer module 202 .
[0066] That is, the image data processing device may include at least one first processing module 201 , at least one second processing module 203 , and at least one intermediate buffer module 202 .
[0067] In some embodiments, the first processing module 201 and the second processing module 203 may each be provided with at least one register, and the first processing module 201 and the second processing module 203 may each be electrically connected to a CPU (Central Processing Unit).
[0068] Exemplarily, the first processing module 201 is used as an example for explanation. The CPU configures the relevant parameters of the first processing module 201 through the register. That is, the CPU writes the relevant parameters of the first processing module 201 into the register corresponding to the first processing module.
[0069] The CPU sends a command signal to the first processing module 201. The first processing module 201 parses the received command signal to obtain the command. The first processing module 201 acquires image data based on the command and calls related parameters in the register to process the image data.
[0070] The relevant parameters may represent the way in which the first processing module 201 reads image data, the way in which the image data is processed, the address of the corresponding register, and the like.
[0071] For example, the image data may be read in blocks, that is, the first processing module 201 reads one image data block each time, and the image data block is a part of a frame of image. In addition, the image data may be read in frames, that is, the first processing module 201 reads one frame of image each time.
[0072] The image data may be processed by image data format conversion, rotation, OSD overlay, etc.
[0073] In the embodiment of the present application, the image data format conversion may be interpreted as converting RAW image data into YUV image data or the like.
[0074] In some embodiments, the first processing module 201 may be electrically connected to the image processing engine, and then the first processing module 201 may obtain the image to be processed from the image processing engine.
[0075] Furthermore, the image processing engine may be electrically connected to the image sensor and the memory, and the image processing engine may obtain raw image data from the image sensor, process the raw image data, and then store the processed raw image data in the memory.
[0076] For example, the image processing engine may be an ISP RAW image processing engine, and the memory may be a RAW Buffer, which may store image data to be processed or processed.
[0077] In some embodiments, the intermediate buffer module 202 may be used to buffer image data to be processed or processed.
[0078] Therefore, in order to cache the image data blocks processed by the first processing module 201 , in an embodiment of the present application, the intermediate cache module 202 is electrically connected to the first processing module 201 .
[0079] In addition, in order to enable the second processing module 203 to obtain the image data block processed by the first processing module 201 , the embodiment of the present application further electrically connects the intermediate buffer module 202 to the second processing module 203 .
[0080] For example, the intermediate buffer module 202 may be a YUV Buffer.
[0081] In some embodiments, a pipeline is used as an example for explanation. When the first processing module 201 processes an image data block, the image data block is stored in the intermediate cache module 202, and the first processing module 201 generates an interrupt signal. The CPU obtains the interrupt signal, generates a notification instruction based on the interrupt signal, and sends the notification instruction to the second processing module 203. The second processing module 203 receives the notification instruction, parses the notification instruction, and obtains the target address; the target address is also the address of the intermediate cache module 202. The second processing module 203 reads the image data processed by the first processing module 201 from the target address, and then processes the image data processed by the first processing module 201.
[0082] In some embodiments, since the first processing module 201 and the second processing module 203 may process image data at different rates, the second processing module 203 may need to wait for the processing result of the first processing module 201, and the processing result is also the processing result of the first processing module 201, thereby wasting the computing power of the second processing module 203. In order to solve the above technical problems, in an embodiment of the present application, when the second processing module 203 needs to wait for the processing result of the first processing module 201, the electrical connection mode between the first processing module 201, the intermediate buffer module 202 and the second processing module 203 is changed.
[0083] The electrical connection between the first processing module 201, the intermediate buffer module 202 and the second processing module 203 is exemplarily described below with reference to several examples.
[0084] For the convenience of description, the first rate may be used to represent the rate at which the first processing module 201 processes the image data. Similarly, the second rate may be used to represent the rate at which the second processing module 203 processes the image data.
[0085] In the first example, when the first rate is greater than the second rate, after receiving the notification instruction from the CPU, the second processing module 203 may not be able to process the notification instruction in time because it needs to continue processing the previous image data block. After the second processing module 203 processes the previous image data block, it parses the notification instruction to obtain the target address, and then obtains new image data from the intermediate cache module 202 based on the target address.
[0086] Therefore, in this case, the second processing module 203 does not need to wait for the processing result of the first processing module 201, and the computing power of the second processing module 203 is not wasted. Therefore, a first processing module 201, an intermediate buffer module 202 and a second processing module 203 are connected in sequence.
[0087] In the second example, when the first rate is equal to the second rate, after receiving the notification instruction from the CPU, the second processing module 203 directly parses the notification instruction to obtain the target address, and then obtains a new image data block from the intermediate cache module 202 based on the target address.
[0088] Therefore, in this case, the second processing module 203 does not need to wait for the processing result of the first processing module 201, and the computing power of the second processing module 203 is not wasted. Therefore, a first processing module 201, an intermediate buffer module 202 and a second processing module 203 are connected in sequence.
[0089] In the third example, when the first rate is less than the second rate, after the second processing module 203 has processed the current image data block, the first processing module 201 has not yet processed the next image data block. Therefore, the second processing module 203 needs to wait for a period of time until receiving the next notification instruction sent by the CPU.
[0090] Therefore, in this case, the second processing module 203 also needs to wait for the processing result of the first processing module 201, which wastes the computing power of the second processing module 203. In the embodiment of the present application, in order to fully utilize the computing power of the second processing module 203, the second processing module 203 is electrically connected to the plurality of intermediate cache modules 202, thereby avoiding the second processing module 203 waiting for the processing result of the first processing module 201.
[0091] That is, the second processing module 203 is electrically connected to a plurality of intermediate cache modules 202 , and each intermediate cache module 202 is electrically connected to one first processing module 201 .
[0092] It is understandable that, under this electrical connection mode, the second processing module 203 can participate in multiple pipelines to fully utilize the computing power of the second processing module 203.
[0093] Figure 3 It is a schematic diagram of the principle of processing image data by an image data processing device provided in an embodiment of the present application.
[0094] Combine the following Figure 3 , the process of processing image data by the first processing module 201 and the second processing module 203 is exemplarily described.
[0095] In some embodiments, the first processing module 201 is used to determine a first cache address block 2021, which is a cache address block with a first tag value, and the cache address block is part of the intermediate cache module 202; the first tag value indicates that the corresponding cache address block is free.
[0096] The first processing module 201 may be an image processing engine.
[0097] For example, the first processing module 201 may be an ISP YUV image processing engine.
[0098] In one example, in order to store and read the image data block partitions processed by the first processing module 201, the embodiment of the present application divides the intermediate cache module 202 into multiple cache address blocks. Each cache address can be used to store a processed image data block.
[0099] In an example, the intermediate cache module 202 is provided with at least two cache address blocks.
[0100] In one example, since the related art processes image data in units of frames, the entire frame of the image needs to be cached, which greatly consumes memory resources. However, the embodiment of the present application processes images in units of blocks, thus requiring less memory resources than the prior art.
[0101] Furthermore, the size of the intermediate buffer module 202 is smaller than the size of a frame of image to be processed, thus saving the space occupied by hardware resources.
[0102] In one example, in order to facilitate the first processing module 201 to identify whether any cache address block can be used, an embodiment of the present application configures a tag for each cache address block.
[0103] The tag includes a first tag value and a second tag value, the first tag value indicates that the corresponding cache address block is free, and the second tag value indicates that the corresponding cache address block is occupied.
[0104] In one example, the tag may be stored in a block of memory or in a register.
[0105] For example, the explanation is given by taking the example that the tag is stored in a register, and the register corresponds to the corresponding cache address block one by one.
[0106] That is, when the first processing module 201 needs to determine whether a certain cache address block is idle, the first processing module 201 obtains the address of the register corresponding to the cache address block, and then reads the corresponding tag from the address of the register.
[0107] It can be understood that the first tag value and the second tag value indicate different states of the cache address block. Therefore, the first tag value and the second tag value need to be different to facilitate identification by the first processing module 201.
[0108] For example, the first flag value may be "1" and the second flag value may be "0".
[0109] It should be noted that the first tag value and the second tag value may also be represented in other forms that are easy to identify.
[0110] In one example, the first processing module 201 obtains a tag of one of the cache address blocks and identifies that the tag corresponds to a first tag value. The first processing module 201 determines that the cache address block is idle, uses the cache address block as the first cache address block 2021, and then obtains the address corresponding to the first cache address block 2021.
[0111] The method for determining the second cache address block 2022 is the same as the method for determining the second cache address block 2022 .
[0112] For example, the address corresponding to the first cache address block 2021 may include a start address and an end address corresponding to the first cache address block 2021 .
[0113] In some embodiments, the first processing module 201 is further used to:
[0114] After determining the first cache address block 2021 , the first tag value corresponding to the first cache address block 2021 is updated to a second tag value, and the second tag value indicates that the corresponding first cache address block 2021 is occupied.
[0115] In one example, the first processing module 201 generates a determination signal after determining the first cache address block 2021. The determination signal is used to control the hardware driver to write the second tag value into the register corresponding to the first cache address, and the second tag value overwrites the original first tag value in the register, thereby updating the first tag value corresponding to the first cache address block 2021 to the second tag value to indicate that the first cache address block 2021 is occupied.
[0116] It should be noted that the hardware driver mentioned above can be directly obtained from relevant technologies and is not specifically limited in the embodiments of the present application.
[0117] In some other embodiments, after the first processing module 201 stores the t-th intermediate image block to the first cache address block 2021 , the first mark value corresponding to the first cache address block 2021 is updated to a second mark value.
[0118] In some embodiments, the first processing module 201 is also used to obtain the tth image block to be processed; process the tth image block to be processed to obtain the tth intermediate image block, which is a part of the image to be processed; and store the tth intermediate image block to the corresponding first cache address block 2021.
[0119] In an example, the first processing module 201 obtains the tth image block to be processed from the ISP RAW image processing engine; converts the tth image block to be processed in RAW format into YUV format to obtain the tth intermediate image block.
[0120] In some embodiments, the first processing module 201 is also used to obtain the tth intermediate image block, store the tth intermediate image block in the first cache address block 2021 of the intermediate cache module 202; obtain the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block 2021, store the t+1th intermediate image block in the second cache address block 2022 of the intermediate cache module 202; t is an integer greater than or equal to 1.
[0121] It is understandable that it takes a certain amount of time for the first processing module 201 to store an intermediate image block and obtain an intermediate image block. In different situations, the timing of the process of the first processing module 201 storing the tth intermediate image block and obtaining the t+1th intermediate image block may be different.
[0122] The following is a description of the timing of the process of the first processing module 201 storing the tth intermediate image block and the process of obtaining the t+1th intermediate image block with reference to several examples.
[0123] In the first example, the first processing module 201 obtains the tth intermediate image block. The t+1th intermediate image block is obtained. After the tth intermediate image block is stored in the first cache address block 2021, the t+1th intermediate image block is stored in the second cache address block 2022. That is, after the first processing module 201 obtains the tth intermediate image block, the t+1th intermediate image block is directly obtained, and the process of obtaining the intermediate image block does not need to wait for the process of storing the intermediate image block.
[0124] In the second example, the first processing module 201 obtains the tth intermediate image block. After storing the tth intermediate image block in the first cache address block 2021, the t+1th intermediate image block is obtained. The t+1th intermediate image block is stored in the second cache address block 2022 of the intermediate cache module 202. That is, the process of the first processing module 201 obtaining the intermediate image block needs to wait for the process of storing the intermediate image block.
[0125] In the third example, the first processing module 201 obtains the tth intermediate image block. While storing the tth intermediate image block in the first cache address block 2021, the first processing module 201 obtains the t+1th intermediate image block and stores the t+1th intermediate image block in the second cache address block 2022. That is, the process of a processing module obtaining an intermediate image block is parallel to the process of storing an intermediate image block.
[0126] In some embodiments, the first processing module 201 is further used to:
[0127] After the t-th intermediate image block is stored in the first cache address block 2021 , a t-th notification instruction is generated and sent to the second processing module 203 , where the t-th notification instruction indicates the corresponding first cache address block 2021 .
[0128] In one example, the first processing module 201 generates an interrupt signal after storing the tth intermediate image block in the first cache address block 2021. The CPU receives the tth interrupt signal and generates a tth notification instruction based on the interrupt signal. The CPU sends the tth notification instruction to the second processing module 203.
[0129] The tth notification instruction may include a start address and an end address in the first cache address block 2021 corresponding to the tth intermediate image block.
[0130] In some embodiments, the second processing module 203 is used to obtain the tth intermediate image block from the first cache address block 2021 and process the tth intermediate image block after the first processing module stores the tth intermediate image block to the first cache address block 2021 of the intermediate cache module 202; after processing the tth intermediate image block, obtain the t+1th intermediate image block from the intermediate cache module 202 and process the t+1th intermediate image block.
[0131] The second processing module 203 may be an offline image processing engine, which is used to perform rotation processing and OSD overlay processing on the tth intermediate image block.
[0132] Figure 4 It is a first principle schematic diagram of processing image data by the first processing module 201 and the second processing module 203 provided in an embodiment of the present application.
[0133] Combine the following Figure 4 , a first principle of processing image data by the first processing module 201 and the second processing module 203 is exemplarily described.
[0134] In one example, when the first rate is greater than the second rate, after the first processing module stores the t+1th intermediate image block in the second cache address block 2022 of the intermediate cache module 202, the second processing module 203 obtains the tth intermediate image block from the first cache address block 2021 and processes the tth intermediate image block. After processing the tth intermediate image block, the t+1th intermediate image block is obtained from the second cache address block 2022 and the t+1th intermediate image block is processed.
[0135] In this case, after the first processing module 201 stores the t+1th intermediate image block to the first cache address block 2021, the second processing module 203 reads the tth intermediate image block from the second cache address block 2022. That is, the first processing module 201 and the second processing module 203 are asynchronous, and the intermediate cache module 202 needs to cache two intermediate cache blocks, and the memory occupied is less than the memory occupied by one frame of the image to be processed.
[0136] Figure 5 It is a second principle schematic diagram of processing image data by the first processing module 201 and the second processing module 203 provided in an embodiment of the present application.
[0137] Combine the following Figure 5 , a second principle of processing image data by the first processing module 201 and the second processing module 203 is exemplarily described.
[0138] In one example, when the first rate is less than or equal to the second rate, after the first processing module stores the t-th intermediate image block in the first cache address block 2021 of the intermediate cache module 202, the second processing module 203 directly obtains the t-th intermediate image block from the first cache address block 2021 and processes the t-th intermediate image block. After processing the t-th intermediate image block, the t+1-th intermediate image block is obtained from the second cache address block 2022 and the t+1-th intermediate image block is processed.
[0139] In this case, while the first processing module 201 stores the tth intermediate image block to the first cache address block 2021, the second processing module 203 reads the tth intermediate image block from the first cache address block 2021. That is, the first processing module 201 and the second processing module 203 are synchronized, and the intermediate cache module 202 needs to cache two intermediate cache blocks, and the memory occupied is less than the memory occupied by one frame of the image to be processed.
[0140] In some embodiments, the second processing module 203 is further used to:
[0141] Receive the tth notification instruction; obtain the tth intermediate image block from the corresponding first cache address block 2021 based on the tth notification instruction; process the tth intermediate image block to obtain the tth target image block; the tth target image block is a part of the target image.
[0142] In one example, the second processing module 203 receives the tth notification instruction; parses the tth notification instruction, obtains the starting address and the ending address of the first cache address block 2021 corresponding to the tth intermediate image block, reads the tth intermediate image block from the first cache address block 2021, processes the tth intermediate image block, and obtains the tth target image block.
[0143] In some embodiments, the second processing module 203 is further used to:
[0144] After acquiring the tth intermediate image block, the second mark value of the corresponding first cache address block 2021 is updated to the first mark value.
[0145] In an example, after the second processing module 203 obtains the tth intermediate image block from the first cache address block 2021 , the first cache address block 2021 becomes idle again.
[0146] Therefore, in order to enable the first processing module 201 to recognize that the first cache module can continue to be used, the second processing module 203 generates a determination signal after acquiring the tth intermediate image block, and the determination signal is used to control the hardware driver to update the second mark value of the first cache address block 2021 to the first mark value.
[0147] For example, the hardware driver writes the first tag value into the corresponding register, and overwrites the second tag value based on the written first tag value.
[0148] In some other embodiments, after outputting the t-th target image block, the second processing module 203 updates the second mark value of the corresponding first cache address block 2021 to the first mark value.
[0149] Figure 6 It is a structural diagram of an electrical connection between a first processing module 201 and an input buffer module 300 provided according to an embodiment of the present application.
[0150] Combine the following Figure 6 , an exemplary description is given of the data interaction between the first processing module 201 and the input cache module 300.
[0151] In some embodiments, the device further includes an input cache module 300 , and the input cache module 300 is electrically connected to the first processing module 201 .
[0152] For example, the input buffer module 300 may be a RAW Buffer.
[0153] In one example, the input buffer module 300 may be electrically connected to the ISP RAW image processing engine 400. The ISP RAW image processing engine 400 may be electrically connected to the image sensor 500. The ISP RAW image processing engine 400 obtains the original image from the image sensor 500. The format of the original image is converted into the RAW format to obtain the image to be processed, and the image to be processed is stored in the input buffer module 300. The first processing module 201 obtains a block of the image to be processed from the input buffer module 300.
[0154] In some embodiments, the first processing module 201 is further used to:
[0155] Get a preset block.
[0156] The image block to be processed is read from the input buffer module 300; the size of the image block to be processed is the size of the preset block.
[0157] In one example, the size of the preset block may be stored in a register corresponding to the first processing module 201. The size of the preset block may be configured by a CPU.
[0158] In one example, the first processing module 201 reads the image block to be processed of a preset block size from the input buffer module 300 each time, thereby obtaining image data from the input buffer module 300 in blocks. In addition, since the image block to be processed is a part of the image to be processed, after the first processing module 201 processes an image block to be processed, the size of the intermediate image block obtained is also smaller than the size of a frame of image. Therefore, compared with the need to cache the entire frame of image in the related art, the memory resources required for caching the intermediate image blocks in the embodiment of the present application are greatly reduced, thereby saving memory resources.
[0159] For example, taking 4K (3840x2160) resolution as an example, a frame of YUV image occupies approximately 3840x2160×1.5=12MB of memory. In an embodiment of the present application, if the intermediate cache module 202 includes two cache address blocks. The resolution of each image block to be processed is 512x2160, that is, 512x2160×1.5 is the size of the preset block, then the memory occupied by the two cache address blocks is 2x512x2160x1.5=3.2MB, saving 8.8MB of memory, accounting for 73.3%.
[0160] For another example, still taking 4K (3840x2160) resolution as an example, if the resolution of each image block to be processed is 1024x2160, the two cache address blocks occupy 6.4MB of memory, saving 5.6MB of memory, accounting for 46.7%.
[0161] Figure 7 It is a structural diagram of an electrical connection between a second processing module 203 and an output buffer module 600 provided in an embodiment of the present application.
[0162] Combine the following Figure 7 , the data interaction between the second processing module 203 and the output buffer module 600 is exemplarily described.
[0163] In some embodiments, the device further includes an output buffer module 600 , and the output buffer module 600 is electrically connected to the second processing module 203 .
[0164] The second processing module 203 is further configured to store the tth target image block into the tth output address block; the tth output address block is a part of the output buffer module 600. The end address of the tth output address block is obtained.
[0165] The end address is used as the starting address of the t+1th output address block, and the t+1th output address block is used to store the t+1th target image block.
[0166] For example, the output buffer module 600 may be a YUV Buffer.
[0167] In some embodiments, the device further includes a third processing module 700 , and the third processing module 700 is electrically connected to the output buffer module 600 .
[0168] The second processing module 203 is further configured to generate an interrupt signal after obtaining a frame of the target image.
[0169] The third processing module 700 is used to obtain a frame of the target image from the output buffer module 600 based on the interrupt signal and process the target image.
[0170] In one example, the second processing module 203 generates an interrupt signal each time it obtains a target image block, the CPU receives the interrupt signal, counts the interrupt signal, obtains a count value, and when the count value is equal to the number of image blocks to be processed included in an image to be processed, generates a read instruction, and sends the read instruction to the third processing module 700. The read instruction indicates the start address and the end address of the target image in the output buffer module 600 corresponding to the target image.
[0171] For example, the third processing module 700 may be an encoding module, configured to perform encoding processing on the acquired target image.
[0172] In an embodiment of the present application, the first processing module obtains the tth intermediate image block, stores the tth intermediate image block in the first cache address block of the intermediate cache module; obtains the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, stores the t+1th intermediate image block in the second cache address block of the intermediate cache module. After the first processing module stores the tth intermediate image block in the first cache address block of the intermediate cache module, the second processing module obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the second processing module obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block. It can be seen from the above technical solution that in an embodiment of the present application, the intermediate cache module only needs to cache two intermediate cache blocks, and does not need to cache the entire frame image, thereby greatly reducing the memory occupied by the cache, and thus greatly saving memory resources. In addition, since the first processing module will write an intermediate image block into the intermediate cache module after generating it, the second processing module can obtain the intermediate image block from the intermediate cache module, thereby reducing the delay of the second processing module in obtaining data to the processing and writing time of obtaining an intermediate image block, rather than the processing and writing time of the entire frame of the image, thereby reducing the data processing delay of the entire device.
[0173] Figure 8 is a flow chart of an image data processing method provided according to an embodiment of the present application, such as Figure 8 As shown, in the embodiment of the present application, the application is described by taking the application on a terminal having an image processing device as an example. The method comprises the following steps:
[0174] In step 801, the terminal obtains the tth intermediate image block, stores the tth intermediate image block in the first cache address block of the intermediate cache module; obtains the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, stores the t+1th intermediate image block in the second cache address block of the intermediate cache module; t is an integer greater than or equal to 1.
[0175] In step 802, after the terminal stores the tth intermediate image block to the first cache address block in the first processing module, the terminal obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the terminal obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block.
[0176] In some embodiments, the intermediate cache module is provided with at least two cache address blocks.
[0177] In some embodiments, the size of the intermediate buffer module is smaller than the size of a frame of image to be processed.
[0178] In some embodiments, the method further comprises:
[0179] A first cache address block is determined, where the first cache address block is a cache address block having a first tag value, and the cache address block is part of the intermediate cache module; the first tag value indicates that the corresponding cache address block is free.
[0180] In some embodiments, the method further comprises:
[0181] After determining the first cache address block, the first tag value corresponding to the first cache address block is updated to a second tag value, and the second tag value indicates that the corresponding first cache address block is occupied.
[0182] In some embodiments, the method further comprises:
[0183] After the t-th intermediate image block is stored in the first cache address block, a t-th notification instruction is generated and sent to the second processing module, where the t-th notification instruction indicates the corresponding first cache address block.
[0184] In some embodiments, the method further includes: obtaining a tth image block to be processed; processing the tth image block to be processed to obtain a tth intermediate image block, wherein the image block to be processed is a part of the image to be processed;
[0185] The tth intermediate image block is stored in the corresponding first cache address block.
[0186] In some embodiments, the method further comprises:
[0187] Get the preset block;
[0188] The image block to be processed is read; the size of the image block to be processed is the size of the preset block.
[0189] In some embodiments, the method further comprises:
[0190] Receive the tth notification instruction; obtain the tth intermediate image block from the corresponding first cache address block based on the tth notification instruction; process the tth intermediate image block to obtain the tth target image block; the tth target image block is a part of the target image.
[0191] In some embodiments, the method further includes: after acquiring the tth intermediate image block, updating the second mark value of the corresponding first cache address block to the first mark value.
[0192] In some embodiments, the method further includes: storing the tth target image block to the tth output address block; the tth output address block is part of the output buffer module;
[0193] Get the end address of the tth output address block;
[0194] The end address is used as the starting address of the t+1th output address block, and the t+1th output address block is used to store the t+1th image block.
[0195] In some embodiments, the method further includes: generating an interrupt signal after obtaining a frame of the target image;
[0196] Based on the interrupt signal, a frame of the target image is obtained from the output buffer module, and the target image is processed.
[0197] It should be noted that the image data processing device and the image data processing method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the device embodiment, which will not be repeated here.
[0198] An embodiment of the present application further provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the above method when executing the computer program.
[0199] In an embodiment of the present application, the first processing module obtains the tth intermediate image block, stores the tth intermediate image block in the first cache address block of the intermediate cache module; obtains the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, stores the t+1th intermediate image block in the second cache address block of the intermediate cache module. After the first processing module stores the tth intermediate image block in the first cache address block of the intermediate cache module, the second processing module obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the second processing module obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block. It can be seen from the above technical solution that in an embodiment of the present application, the intermediate cache module only needs to cache two intermediate cache blocks, and does not need to cache the entire frame image, thereby greatly reducing the memory occupied by the cache, and thus greatly saving memory resources. In addition, since the first processing module will write an intermediate image block into the intermediate cache module after generating it, the second processing module can obtain the intermediate image block from the intermediate cache module, thereby reducing the delay of the second processing module in obtaining data to the processing and writing time of obtaining an intermediate image block, rather than the processing and writing time of the entire frame of the image, thereby reducing the data processing delay of the entire device.
[0200] Taking computer equipment as the terminal as an example, Fig. 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application, see Fig. 9 The terminal 900 may be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The terminal 900 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.
[0201] Typically, the terminal 900 includes a processor 901 and a memory 902 .
[0202] The processor 901 may include one or more processing cores, such as a 4-core processor, a 9-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0203] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one program code, which is used to be executed by the processor 901 to implement the process of terminal execution in the method for mixed-precision floating-point multiplication and accumulation operations provided in the method embodiment of the present application.
[0204] In some embodiments, the terminal 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902 and the peripheral device interface 903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a display screen 904, a camera assembly 905, an audio circuit 906 and a power supply 907.
[0205] The peripheral device interface 903 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 can be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.
[0206] The display screen 904 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 904 is a touch display screen, the display screen 904 also has the ability to collect touch signals on the surface or above the surface of the display screen 904. The touch signal can be input as a control signal to the processor 901 for processing. At this time, the display screen 904 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 904 can be one, which is set on the front panel of the terminal 900; in other embodiments, the display screen 904 can be at least two, which are respectively set on different surfaces of the terminal 900 or are folded; in other embodiments, the display screen 904 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 900. Even, the display screen 904 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 904 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0207] The camera assembly 905 is used to capture images or videos. In some embodiments, the camera assembly 905 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 905 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0208] The audio circuit 906 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 906 may also include a headphone jack.
[0209] The power supply 907 is used to power various components in the terminal 900. The power supply 907 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 907 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0210] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0211] Take the computer device as a server as an example. Fig.10 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1001 and one or more memories 1002, wherein the one or more memories 1002 store at least one computer program, and the at least one computer program is loaded and executed by the one or more processors 1001 to implement the above-mentioned image data processing method. Of course, the server 1000 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 1000 may also include other components for implementing device functions, which will not be described in detail here.
[0212] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned method for generating an image processing model. Optionally, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0213] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0214] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An image data processing device, characterized in that: include: A first processing module, a second processing module and an intermediate cache module, wherein the intermediate cache module is electrically connected to the first processing module and the second processing module respectively; The first processing module is used to obtain the t-th intermediate image block, store the t-th intermediate image block in the first cache address block of the intermediate cache module; obtain the t+1-th intermediate image block, and after storing the t-th intermediate image block in the first cache address block, store the t+1-th intermediate image block in the second cache address block of the intermediate cache module; t is an integer greater than or equal to 1; The second processing module is configured to obtain the tth intermediate image block from the first cache address block and process the tth intermediate image block after the first processing module stores the tth intermediate image block in the first cache address block; and obtain the t+1th intermediate image block from the second cache address block and process the t+1th intermediate image block after processing the tth intermediate image block; The first processing module is further configured to generate and send a tth notification instruction to the second processing module after storing the tth intermediate image block in the first cache address block, wherein the tth notification instruction indicates the corresponding first cache address block; The second processing module is further configured to receive the tth notification instruction; obtain the tth intermediate image block from the corresponding first cache address block based on the tth notification instruction; process the tth intermediate image block to obtain the tth target image block; the tth target image block is a part of the target image; When the first rate is greater than the second rate, after the first processing module stores the t+1th intermediate image block to the second cache address block of the intermediate cache module, the second processing module obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the second processing module obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block; the first rate represents the rate at which the first processing module processes image data; the second rate represents the rate at which the second processing module processes image data; When the first rate is less than the second rate, after the first processing module stores the tth intermediate image block to the first cache address block of the intermediate cache module, the second processing module directly obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block; wherein the second processing module is electrically connected to a plurality of the intermediate cache modules.
2. The device according to claim 1, characterized in that The intermediate cache module is provided with at least two cache address blocks.
3. The device according to claim 1, characterized in that The size of the intermediate buffer module is smaller than the size of a frame of image to be processed.
4. The device according to claim 1, characterized in that The first processing module is further used for: The first cache address block is determined, where the first cache address block is a cache address block having a first tag value, and the cache address block is part of the intermediate cache module; the first tag value indicates that the corresponding cache address block is free.
5. The device according to claim 4, characterized in that The first processing module is further used for: After determining the first cache address block, the first tag value corresponding to the first cache address block is updated to a second tag value, where the second tag value indicates that the corresponding first cache address block is occupied.
6. The device according to claim 5, characterized in that The first processing module is further used to obtain a t-th image block to be processed; process the t-th image block to be processed to obtain a t-th intermediate image block, wherein the image block to be processed is a part of the image to be processed; The tth intermediate image block is stored in the corresponding first cache address block.
7. The device according to claim 6, characterized in that The device further includes an input cache module, wherein the input cache module is electrically connected to the first processing module; The first processing module is further used for: Get the preset block; The image block to be processed is read from the input buffer module; the size of the image block to be processed is the size of the preset block.
8. The device according to claim 7, characterized in that The second processing module is further used for: After acquiring the tth intermediate image block, the second mark value of the corresponding first cache address block is updated to the first mark value.
9. The device according to claim 8, characterized in that The device further includes an output buffer module, wherein the output buffer module is electrically connected to the second processing module; The second processing module is further used to store the t-th target image block into the t-th output address block; the t-th output address block is a part of the output buffer module; Obtaining the end address of the tth output address block; The end address is used as the starting address of the t+1th output address block, and the t+1th output address block is used to store the t+1th target image block.
10. The device according to claim 9, characterized in that The device further includes a third processing module, wherein the third processing module is electrically connected to the output buffer module; The second processing module is further configured to generate an interrupt signal after obtaining a frame of the target image; The third processing module is used to obtain a frame of the target image from the output buffer module based on the interrupt signal, and process the target image.
11. An image data processing method, applied to the image data processing device according to any one of claims 1 to 10, characterized in that: include: Obtaining a t-th intermediate image block, and storing the t-th intermediate image block in a first cache address block of an intermediate cache module; Obtain the t+1th intermediate image block, and after storing the tth intermediate image block in the first cache address block, store the t+1th intermediate image block in the second cache address block of the intermediate cache module; t is an integer greater than or equal to 1; After the first processing module stores the t-th intermediate image block in the first cache address block, the t-th intermediate image block is obtained from the first cache address block, and the t-th intermediate image block is processed; after processing the t-th intermediate image block, the t+1-th intermediate image block is obtained from the second cache address block, and the t+1-th intermediate image block is processed; the first processing module is further used to generate and send a t-th notification instruction to the second processing module after storing the t-th intermediate image block in the first cache address block, and the t-th notification instruction indicates the corresponding first cache address block; The second processing module is further configured to receive the tth notification instruction; obtain the tth intermediate image block from the corresponding first cache address block based on the tth notification instruction; process the tth intermediate image block to obtain the tth target image block; the tth target image block is a part of the target image; When the first rate is greater than the second rate, after the first processing module stores the t+1th intermediate image block to the second cache address block of the intermediate cache module, the second processing module obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, the second processing module obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block; the first rate represents the rate at which the first processing module processes image data; the second rate represents the rate at which the second processing module processes image data; Or the first rate is less than or equal to the second rate, after the first processing module stores the tth intermediate image block to the first cache address block of the intermediate cache module, the second processing module directly obtains the tth intermediate image block from the first cache address block and processes the tth intermediate image block; after processing the tth intermediate image block, obtains the t+1th intermediate image block from the second cache address block and processes the t+1th intermediate image block; wherein the second processing module is electrically connected to a plurality of the intermediate cache modules.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory is used to store at least one program, and the at least one program is loaded by the processor and executes the image data processing method according to claim 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the image data processing method according to claim 11.
Citation Information
Patent Citations
Target detection method, device and system for deep learning
CN118247627A
