Image processing method and image processing chip
By combining the baseline scheduling time and the random number generation random scheduling time in the multimedia chip, delayed access to the memory solves the problem of uneven memory usage caused by multiple image processing modules accessing the memory at the same time, achieves balanced access to the memory bandwidth, and improves the memory bandwidth. Performance of hardware modules.
Patent Information
- Application Number
- CN202410132844.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-01-31
AI Technical Summary
In multimedia chips or systems, multiple image processing modules access memory at the same time, resulting in memory broadband access peaks, resulting in uneven usage and inability to maximize the performance of the hardware acceleration module.
By combining the baseline scheduling time and random numbers to generate global or local random scheduling time, memory access is delayed, thereby preventing modules from accessing the memory at the same time and achieving off-peak scheduling.
This allows each hardware module to delay access to memory after the previous module is processed, read data in a distributed manner, achieve balanced access to memory bandwidth, and improve system performance.
Smart Images

Figure CN117971427B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an image processing method and an image processing chip. Background Art
[0002] In a multimedia chip or system, each loop module on the multimedia service channel processes different image frames in the video stream collected by the image sensor in parallel over time. In the multimedia service channel, for offline mode, when processing an image frame, each module needs to read the image frame data from the memory, that is, get the corresponding image data frame from the previous acceleration module in the memory.
[0003] Therefore, all modules on the multimedia service channel will access the memory at the same time, causing a peak in memory broadband access and alternating peaks and troughs, resulting in uneven memory usage and failure to maximize the performance of multiple hardware acceleration modules. Summary of the invention
[0004] In order to solve the problem that all modules on a multimedia service channel access the memory at the same time, the present application provides an image processing method and an image processing chip.
[0005] In a first aspect, the present application provides an image processing method, comprising:
[0006] Combine the benchmark scheduling time and the random number to generate a global random scheduling time or a local random scheduling time;
[0007] In the offline mode, the first image processing module in the multimedia channel reads the image data frame of the image frame to be processed from the memory at a processing time, performs the first image processing on the image frame to be processed, and generates a first image processing data frame;
[0008] After the first image processing module writes the first image processing data frame into the memory, the second image processing module is notified to perform the second image processing on the image frame to be processed;
[0009] After delaying the global random scheduling time or the local random scheduling time based on a processing time, the second image processing module reads the first image processing data frame from the memory, performs the second image processing on the image frame to be processed, and generates the second image processing data frame.
[0010] In some implementations, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, the method further includes:
[0011] Based on the image frame rate of the image sensor, according to the same image processing module in the multimedia channel, a local reference scheduling time is configured according to the image frame interval time, and the reference scheduling time is less than the image frame interval time.
[0012] In some implementations, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, the method further includes:
[0013] Based on the image frame rate of the image sensor and in accordance with the same multimedia channel, a global reference scheduling time is configured according to the image frame interval time, and the reference scheduling time is less than the image frame interval time.
[0014] In some implementations, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, the method further includes:
[0015] According to the same multimedia channel, a global random number is generated by using a random function, and the random number is greater than or equal to 0 and less than 1; the global random number in each multimedia channel is different.
[0016] In some implementations, before combining the reference scheduling time and the random number to generate the global random scheduling time or the local random scheduling time, the method further includes:
[0017] According to the same image processing module in the multimedia channel, a local random number is generated by using a random function, and the random number is greater than or equal to 0 and less than 1; the local random number of each image processing module is different.
[0018] In some implementations, combining the reference scheduling time and the random number to generate a global random scheduling time or a local random scheduling time includes:
[0019] Combine the global benchmark scheduling time in the benchmark scheduling time and the global random number in the random number to generate a global random scheduling time;
[0020] The local benchmark scheduling time in the benchmark scheduling time and the global random number / local random number in the random number are combined to generate a local random scheduling time.
[0021] In a second aspect, the present application provides an image processing chip, comprising:
[0022] A time generation module, used to generate a global random scheduling time or a local random scheduling time by combining a benchmark scheduling time and a random number;
[0023] A first image processing module is used to read an image data frame of an image frame to be processed from a memory at a processing time in an offline mode, and generate a first image processing data frame after performing a first image processing on the image frame to be processed;
[0024] A notification module, configured to notify the second image processing module to perform second image processing on the image frame to be processed after the first image processing module writes the first image processing data frame into the memory;
[0025] The second image processing module is used to read the first image processing data frame from the memory after delaying the global random scheduling time or the local random scheduling time based on a processing time, and generate a second image processing data frame after performing the second image processing on the image frame to be processed.
[0026] In some embodiments, the image processing chip further includes:
[0027] A configuration module, configured to configure a local reference scheduling time according to an image frame interval time based on an image frame rate of an image sensor and a same image processing module in a multimedia path;
[0028] The configuration module is also used to configure a global reference scheduling time according to the image frame rate of the image sensor and the image frame interval according to the same multimedia channel, and the reference scheduling time is less than the image frame interval.
[0029] In some embodiments, the image processing chip further includes:
[0030] A random number generation module, used for generating a global random number using a random function according to the same multimedia channel, wherein the global random number in each multimedia channel is different;
[0031] The random number generating module is also used to generate a local random number using a random function according to the same image processing module in the multimedia channel, and the local random number of each image processing module is different; the global random number and the local random number are greater than or equal to 0 and less than 1.
[0032] In some embodiments, the time generation module is used to generate a global random scheduling time by combining the global reference scheduling time in the reference scheduling time and the global random number in the random number;
[0033] The time generation module is also used to generate a local random scheduling time by combining the local benchmark scheduling time in the benchmark scheduling time and the global random number / local random number in the random number.
[0034] Compared with the prior art, the present invention has at least one of the following beneficial effects:
[0035] The present application allows each subsequent hardware module (image processing module) to access the memory (DDR) after a global random scheduling time or a local random scheduling time is delayed after the previous hardware module has completed processing, so that each hardware module reads data from the memory in a dispersed manner, making the access of the system multimedia service to the memory bandwidth as balanced as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The following is a brief introduction to the drawings used in describing the embodiments of this application:
[0037] Figure 1 is a schematic diagram of an image processing chip processing an image frame provided by an embodiment of the present application;
[0038] Figure 2 is a structural block diagram of an image processing chip provided in an embodiment of the present application;
[0039] Figure 3 is a flow chart of an image processing method provided by an embodiment of the present application;
[0040] Figure 4 It is a partial flow chart of an image processing method provided in an embodiment of the present application;
[0041] Figure 5 This is another partial flow chart of an image processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the specific implementation methods of the present application will be described below with reference to the accompanying drawings. The accompanying drawings and implementation methods described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings and implementation methods can be obtained based on these accompanying drawings and implementation methods without paying creative work. Adjustments and improvements made without departing from the concept of the present application are all within the scope of protection of the present application.
[0043] In order to simplify the drawings, only the parts related to the present application are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only parts with the same structure or function are schematically shown, and there may be more or fewer parts with the same structure or function in reality.
[0044] In this application, unless otherwise expressly specified and limited, ordinal numbers, such as "first", "second", etc., are only used to distinguish and describe related objects, and cannot be understood as indicating or implying the relative importance or order between related objects; in addition, they do not represent the number of related objects. The terms "install" and "connect" should be understood in a broad sense. For example, "install" can be installed directly or through other components; "connect" can be connected directly or through other components.
[0045] In a multimedia chip or system, the multimedia chip or system is connected to an image sensor. One multimedia chip or system can be connected to multiple image sensors. Each image sensor is connected to a multimedia chip or system to form a multimedia service channel (also called a service channel or a full service channel or a multimedia channel). Each looped image processing module on the multimedia service channel processes different image frames in the video stream collected by the image sensor in parallel over time.
[0046] However, in the multimedia channel, for offline mode, each image processing module needs to read the image frame data from the memory when processing the image frame; therefore, all image processing modules on the service channel will access the memory at the same time, resulting in a peak in the memory broadband access, alternating peaks and troughs, resulting in uneven memory usage and failure to maximize the performance of multiple hardware acceleration modules.
[0047] In order to solve the above problems, the present application provides an image processing chip, which randomly schedules time delays for all image processing modules on the entire service channel in a multimedia chip or system, thereby achieving staggered scheduling and preventing each image processing module from accessing the memory at the same time.
[0048] Now, the memory access of all image processing modules on the service channel or the image processing chip when processing the image frame is described. The image sensor (or the camera) transmits the collected video stream to the image processing chip, and the image processing chip writes the video stream into the memory.
[0049] Please refer to the attached picture Figure 2 , Figure 2 It is a structural block diagram of an image processing chip provided by an embodiment of the present application. This implementation provides an image processing chip, including: a first image processing module and a second image processing module. The first image processing module, in offline mode, reads an image data frame of an image frame to be processed from a memory at a processing time, performs a first image processing on the image frame to be processed (i.e., the first image algorithm processing corresponding to the first image processing module), and generates a first image processing data frame after the first image algorithm processing. After the first image processing module writes the first image processing data frame into the memory, the notification module notifies the second image processing module to perform a second image processing on the image frame to be processed (i.e., the second image algorithm processing corresponding to the second image processing module). The second image processing module, after delaying a global random scheduling time or a local random scheduling time based on a processing time, reads the first image processing data frame from the memory again, performs a second image processing on the image frame to be processed, and generates a second image processing data frame after the second image algorithm processing.
[0050] In one embodiment, the first image processing module is any one of an image signal processor ISP, a video preprocessor VPP, a digital signal processor DSP, a neural network processor NPU, an application central processor ACPU, and a video encoder VENC that processes image frames in sequence. The image signal processor ISP, the video preprocessor VPP, the digital signal processor DSP, the neural network processor NPU, the application central processor ACPU, and the video encoder VENC form a graph pipelined process, and each image processing module in the graph pipeline process processes each image frame in the video stream in sequence. The second image processing module is an image processing module that is located after the first image processing module in the graph pipeline process. A processing time is any one of the first time, the second time, the third time, the fourth time, the fifth time, the sixth time, etc. The image frame to be processed is any one of the first image frame Frame1, the second image frame Frame2, the third image frame Frame3, the fourth image frame Frame4, the fifth image frame Frame5, and the sixth image frame Frame6 that need to be processed. The first image processing is any one of ISP processing, VPP processing, DSP processing, NPU processing, ACPU processing, and VENC processing. The first / second image processing data frame is an image processing data frame corresponding to the first / second image processing module among all image ISP data frames, all image VPP data frames, all image DSP data frames, all image NPU data frames, all image ACPU data frames, and all image VENC data frames. The following is an explanation with reference to the accompanying drawings:
[0051] Please refer to the attached picture Figure 1 , each column of each image processing module (image signal processor ISP, video pre-processor VPP, digital signal processor DSP, neural network processor NPU, application central processing unit ACPU, video encoder VENC) represents a time, and each box in each column represents the image frame Frame processed by each image processing module at that time.
[0052] For example, the image signal processor ISP, at the first time, reads the first image data frame of the first image frame Frame1 to be processed from the memory, performs ISP processing on the first image frame Frame1, and generates a first image ISP data frame. At the second time, reads the second image data frame of the second image frame Frame2 to be processed from the memory, performs ISP processing on the second image frame Frame2, and generates a second image ISP data frame. At the third time, reads the third image data frame of the third image frame Frame3 to be processed from the memory, performs ISP processing on the third image data frame Frame3, and generates a third image ISP data frame. At the fourth time, reads the fourth image data frame of the fourth image frame Frame4 to be processed from the memory, performs ISP processing on the fourth image frame Frame4, and generates a fourth image ISP data frame; the fifth image frame to be processed in the video stream needs to be processed sequentially over time by analogy. After the image signal processor ISP writes the image ISP data frame of the image frame after ISP processing into the memory each time, it notifies the video pre-processor VPP to perform VPP processing. The main function of ISP processing is to perform post-processing on the signal output by the front-end image sensor. Its main functions include linear correction, noise removal, bad pixel removal, interpolation, white balance, automatic exposure control, etc.; it processes the raw image data into a format that can be displayed or further processed.
[0053] The video preprocessor VPP, after randomly scheduling the time based on the first time delay, reads the first image ISP data frame after ISP processing by the image signal processor from the memory, performs VPP processing on the first image frame Frame1 after ISP processing, and generates the first image VPP data frame. After randomly scheduling the time based on the second time delay, reads the second image ISP data frame after ISP processing by the image signal processor from the memory, performs VPP processing on the second image frame Frame2 after ISP processing, and generates the second image VPP data frame. After randomly scheduling the time based on the third time delay, reads the third image ISP data frame after ISP processing by the image signal processor from the memory, performs VPP processing on the third image frame Frame3 after ISP processing, and generates the third image VPP data frame; the image frames to be processed in the video stream need to be processed sequentially over time, and so on. After the video preprocessor VPP writes the image VPP data frame of the image frame processed by VPP into the memory each time, it notifies the digital signal processor DSP to perform DSP processing. VPP processing is used to support video preprocessor functions such as cropping, rotation, pixel format conversion, and aspect ratio.
[0054] The digital signal processor DSP, after delaying two random scheduling times based on the first time (or delaying one random scheduling time based on the processing time of the first image frame Frame1 processed by the video preprocessor VPP), reads the first image VPP data frame processed by the video preprocessor from the memory, performs DSP processing on the first image frame Frame1 processed by VPP, and generates a first image DSP data frame. After delaying two random scheduling times based on the second time, reads the second image VPP data frame processed by the video preprocessor from the memory, performs DSP processing on the second image frame Frame2 processed by VPP, and generates a second image DSP data frame; the image frames to be processed in the video stream need to be processed sequentially over time, and so on. After the digital signal processor DSP writes the image DSP data frame of the image frame processed by DSP into the memory each time, it notifies the neural network processor NPU to perform NPU processing. DSP processing performs a large number of fast and repetitive mathematical operations on a series of sampled data.
[0055] The neural network processor NPU, after delaying three random scheduling times based on the first time (or delaying one random scheduling time based on the processing time of the first image frame Frame1 processed by the digital signal processor DSP), reads the first image DSP data frame processed by the digital signal processor from the memory, and performs NPU processing on the first image frame Frame1 processed by the DSP to generate the first image NPU data frame. After delaying three random scheduling times based on the second time, reads the second image DSP data frame processed by the digital signal processor from the memory, and performs NPU processing on the second image frame Frame2 processed by the DSP to generate the second image NPU data frame; the image frames to be processed in the video stream need to be processed sequentially over time, and so on. After the neural network processor NPU writes the image NPU data frame of the image frame processed by the NPU into the memory each time, it notifies the application central processing unit ACPU to perform ACPU processing. NPU processing is used to accelerate the operation of neural networks and solve the problem of low efficiency of traditional chips in neural network operations. The NPU processor includes modules such as multiplication and addition, activation function, two-dimensional data operation, and decompression.
[0056] The application central processing unit ACPU, after delaying four random scheduling times based on the first time (or delaying one random scheduling time based on the processing time of the first image frame Frame1 processed by the neural network processor NPU), reads the first image NPU data frame processed by the neural network processor from the memory, and performs ACPU processing on the first image frame Frame1 processed by the NPU, thereby generating a first image ACPU data frame. After delaying four random scheduling times based on the second time, reads the second image NPU data frame processed by the neural network processor from the memory, and performs ACPU processing on the second image frame Frame2 processed by the NPU, thereby generating a second image ACPU data frame; the image frames to be processed in the video stream need to be processed sequentially over time, and so on. After the application central processing unit writes the image ACPU data frame of the image frame processed by the ACPU into the memory each time, it notifies the video encoder VENC to perform VENC processing. ACPU is the central processing unit in the multimedia SOC chip. ACPU processing plays the role of computing and calling other functional components in smart devices.
[0057] The video encoder VENC, after delaying five random scheduling times based on the first time (or delaying one random scheduling time based on the processing time of the application central processor ACPU to process the first image frame Frame1), reads the first image ACPU data frame processed by the application central processor from the memory, performs VENC processing on the first image frame Frame1 processed by the ACPU, and generates the first image VENC data frame; the image frames to be processed in the video stream need to be processed sequentially over time, and so on. Each time the video encoder writes the image VENC data frame of the image frame processed by VENC into the memory, if the image processing also includes other image processing modules that require subsequent image processing, the video encoder VENC can continue to be notified to perform image processing. VENC processing is to encode the image.
[0058] Therefore, the image signal processor ISP reads the first image data frame to be processed from the memory at the first time; reads the second image data frame to be processed from the memory at the second time; reads the third image data frame to be processed from the memory at the third time; reads the fourth image data frame to be processed from the memory at the fourth time; reads the fifth image data frame to be processed from the memory at the fifth time; and reads the sixth image data frame to be processed from the memory at the sixth time.
[0059] The video pre-processor VPP reads the first image ISP data frame from the memory after randomly scheduling the time based on the first time delay; and reads the second image ISP data frame from the memory after randomly scheduling the time based on the second time delay.
[0060] The digital signal processor DSP reads a first image VPP data frame from a memory after delaying two random scheduling times based on a first time; reads a second image VPP data frame from a memory after delaying two random scheduling times based on a second time; and reads a third image VPP data frame from a memory after delaying two random scheduling times based on a third time.
[0061] The neural network processor NPU reads the first image DSP data frame from the memory after delaying three random scheduling times based on the first time; reads the second image DSP data frame from the memory after delaying three random scheduling times based on the second time; reads the third image DSP data frame from the memory after delaying three random scheduling times based on the third time; and reads the fourth image DSP data frame from the memory after delaying three random scheduling times based on the fourth time.
[0062] The application central processing unit ACPU reads a first image NPU data frame from the memory after delaying four random scheduling times based on the first time; reads a second image NPU data frame from the memory after delaying four random scheduling times based on the second time; reads a third image NPU data frame from the memory after delaying four random scheduling times based on the third time; reads a fourth image NPU data frame from the memory after delaying four random scheduling times based on the fourth time; and reads a fifth image NPU data frame from the memory after delaying four random scheduling times based on the fifth time.
[0063] The video encoder VENC reads a first image ACPU data frame from a memory after delaying five random scheduling times based on a first time; reads a second image ACPU data frame from a memory after delaying five random scheduling times based on a second time; reads a third image ACPU data frame from a memory after delaying five random scheduling times based on a third time; reads a fourth image ACPU data frame from a memory after delaying five random scheduling times based on a fourth time; reads a fifth image ACPU data frame from a memory after delaying five random scheduling times based on a fifth time; and reads a sixth image ACPU data frame from a memory after delaying six random scheduling times based on the fifth time.
[0064] After all image processing modules are randomly scheduled with a time delay, it can be avoided that the image signal processor ISP, video pre-processor VPP, digital signal processor DSP, neural network processor NPU, application central processing unit ACPU, and video encoder VENC read different image frames from the memory at the same time and perform different processing. Figure 1As shown, the situation of accessing the memory at the same time: at the second time, the image signal processor ISP reads Frame2 from the memory, and the video pre-processor VPP reads the first image ISP data frame from the memory. At the third time, the image signal processor ISP reads the third image data frame from the memory, the video pre-processor VPP reads the second image ISP data frame from the memory, and the digital signal processor DSP reads the first image VPP data frame from the memory; and so on.
[0065] In one implementation, the image processing chip further includes a configuration module, which is used to configure a local benchmark scheduling time according to the image frame rate of the image sensor and the image frame interval according to the same image processing module in the multimedia channel. The configuration module is also used to configure a global benchmark scheduling time according to the image frame interval according to the same multimedia channel based on the image frame rate of the image sensor, and the benchmark scheduling time is less than the image frame interval. The configuration method of the local benchmark scheduling time and the global benchmark scheduling time is described in the subsequent method.
[0066] In one implementation, the image processing chip further includes a random number generation module, which is used to generate a global random number using a random function according to the same multimedia path, and the global random number in each multimedia path is different. The random number generation module is also used to generate a local random number using a random function according to the same image processing module in the multimedia path, and the local random number of each image processing module is different; the global random number and the local random number are greater than or equal to 0 and less than 1. The generation of the global random number and the local random number is described in the subsequent method.
[0067] In one implementation, the image processing chip further includes a time generation module, which is used to generate a global random scheduling time or a local random scheduling time in combination with the benchmark scheduling time and the random number. The time generation module is used to generate a global random scheduling time in combination with the global benchmark scheduling time in the benchmark scheduling time and the global random number in the random number. The time generation module is also used to generate a local random scheduling time in combination with the local benchmark scheduling time in the benchmark scheduling time and the global random number / local random number in the random number. The generation of the global random scheduling time and the local random scheduling time is described in the subsequent method.
[0068] Please refer to Figure 3 , Figure 3 This is a flow chart of an image processing method provided by an embodiment of the present application. The following is a further description of the image processing process of the image processing chip in combination with the flow chart of the image processing chip: An image processing method includes:
[0069] S10. Generate a global random scheduling time or a local random scheduling time by combining the benchmark scheduling time and the random number; the benchmark scheduling time includes the global benchmark scheduling time and the local benchmark scheduling time.
[0070] In one implementation, the benchmark scheduling time can be configured based on the frame rate of the camera according to the frame interval time. The benchmark scheduling time can also be set directly, but it cannot be greater than the frame interval time. When the benchmark scheduling time is used to generate the delay of all image processing modules on the service channel, the benchmark scheduling time is the global benchmark scheduling time, and the generated delay is the global random scheduling time. When the benchmark scheduling time is used to generate the delay of an image processing module on a multimedia channel or a service channel, the benchmark scheduling time is the local benchmark scheduling time or the module benchmark scheduling time, and the generated delay is the local random scheduling time or the module benchmark scheduling time.
[0071] S20. In an offline mode, a first image processing module in a multimedia channel reads an image data frame of an image frame to be processed from a memory at a processing time, performs a first image processing on the image frame to be processed, and generates a first image processing data frame.
[0072] In one implementation, the image frame to be processed is any image frame in the video stream that requires image processing (including the first image processing and the subsequent image processing), that is, the image frame to be processed is the first image frame, the second image frame, the third image frame, etc. The image data frames include original image data frames of image frames that have never been processed, and also include image processed data frames of image frames that have been processed.
[0073] In the multimedia channel, there are multiple image processing modules, such as image signal processor ISP, video preprocessor VPP, digital signal processor DSP, neural network processor NPU, application central processing unit ACPU, video encoder VENC. The first image processing module is any one of the multiple image processing modules in the multimedia channel. The first image processing is the processing method corresponding to the first image processing module, for example: when the first image processing module is an image signal processor ISP, the first image processing is ISP processing; when the first image processing module is a video preprocessor VPP, the first image processing is VPP processing.
[0074] In offline mode, each image processing module needs to read the image data frame to be processed from the memory before processing the image frame. For example, when the image signal processor ISP processes the image frame, it first reads the corresponding image data frame from the memory; then, after performing ISP processing on the image frame to be processed, a first image ISP data frame is generated. Other image processing modules similarly read the corresponding image data frame from the memory first, which will not be explained here one by one.
[0075] S30: After writing the first image processing data frame into the memory, the first image processing module notifies the second image processing module to perform the second image processing on the image frame to be processed.
[0076] In one implementation, for each frame of image in the video stream, the image processing modules in the multimedia path will process the image frame in sequence according to a set order, such as: the image signal processor ISP, the video pre-processor VPP, the digital signal processor DSP, the neural network processor NPU, the application central processing unit ACPU, and the video encoder VENC perform ISP / VPP / DSP / NPU / ACPU / VENC processing on the same image frame in sequence.
[0077] After each image processing module processes the image frame, it writes the generated image data frame into the memory and notifies the second image processing module to process it. The second image processing module is the image processing module that needs to perform subsequent processing on the image frame after the first image processing module has processed it according to the set order, such as: when the first image processing module is the image signal processor ISP, the second image processing module is the video preprocessor VPP; when the first image processing module is the video preprocessor VPP, the second image processing module is the digital signal processor DSP. The second image processing is the processing method corresponding to the second image processing module, for example: when the second image processing module is the video preprocessor VPP, the second image processing is the VPP processing. After the image signal processor ISP processes the read image data frame pair, it generates an image ISP data frame, writes the image ISP data frame into the memory, and then notifies the video preprocessor VPP. After the video preprocessor VPP processes the read image ISP data frame pair, it generates an image VPP data frame, writes the image VPP data frame into the memory, and then notifies the digital signal processor DSP; and so on.
[0078] S40: After delaying the global random scheduling time or the local random scheduling time based on a processing time, the second image processing module reads the first image processing data frame from the memory, performs the second image processing on the image frame to be processed, and generates the second image processing data frame.
[0079] In one implementation, when the second image processing module needs to perform subsequent processing on the image frame processed by the first image processing module in step 320, it needs to first complete the global random scheduling time or the local random scheduling time delay, and then read the image processing data frame processed by the first image from the memory. For example: after the image signal processor ISP performs ISP processing on the image frame, it stores the image ISP data frame into the memory, and then notifies the video pre-processor VPP; after completing the global random scheduling time or the local random scheduling time delay, the video pre-processor VPP reads the image ISP data frame from the memory, performs VPP processing on the image frame, and generates an image VPP data frame; and so on.
[0080] Please refer to Figure 5 , Figure 5 This is another partial flow chart of an image processing method provided by an embodiment of the present application. In one embodiment, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, it also includes:
[0081] S01. Based on the image frame rate of the image sensor and in accordance with the same image processing module in the multimedia channel, a local reference scheduling time is configured according to the image frame interval time, and the reference scheduling time is less than the image frame interval time.
[0082] In one implementation, each image processing module configures a local base scheduling time, i.e., coefficient * frame interval, based on the frame rate coming from the image sensor or camera and the frame interval time (e.g., 4k@60FPS, with a frame interval of 16.667 milliseconds) (the coefficient can be configured arbitrarily, but cannot exceed one frame interval). For example: take 1 / 2 or 1 / 3 of the frame interval, and configure (1 / 3)*16.667=5.556 milliseconds as the base scheduling time (base scheduler time, abbreviated as BST). The base scheduling time is the local base scheduling time or module base scheduling time of a single image processing module in a multimedia channel. The base scheduling time of each image processing module in a multimedia channel is different. For example: the image signal processor ISP takes 1 / 3 of the frame interval, the video pre-processor VPP takes 1 / 2 of the frame interval, and the digital signal processor DSP takes 1 / 4 of the frame interval.
[0083] Please refer to Figure 4 , Figure 4 This is a partial flow chart of an image processing method provided by an embodiment of the present application. In one embodiment, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, it also includes:
[0084] S02. Based on the image frame rate of the image sensor and in accordance with the same multimedia channel, a global reference scheduling time is configured according to the image frame interval time, and the reference scheduling time is less than the image frame interval time.
[0085] In one implementation, a multimedia channel configures a global benchmark scheduling time based on the frame rate coming from the camera and the frame interval time (for example, 4k@60FPS, the frame interval is 16.667 milliseconds) as the benchmark, that is, coefficient * frame interval (the coefficient can be configured arbitrarily, but cannot exceed one frame interval). For example: take 1 / 2 of the frame interval, configure a global benchmark scheduling time, and the global benchmark scheduling time is the benchmark scheduling time for all image processing modules in a multimedia channel. Another example: take 1 / 3 of the frame interval, configure (1 / 3)*16.667=5.556 milliseconds as another global benchmark scheduling time, and the global benchmark scheduling time is the benchmark scheduling time for all image processing modules in another multimedia channel. The global benchmark scheduling time of each multimedia channel is different.
[0086] Please continue to refer to Figure 4 , 5 In one embodiment, before combining the reference scheduling time and the random number to generate the global random scheduling time or the local random scheduling time, it also includes:
[0087] S03. According to the same multimedia channel, a global random number is generated by using a random function. The random number is greater than or equal to 0 and less than 1. The global random number in each multimedia channel is different.
[0088] In one implementation, a random function RAND() in C language is used to generate a random number, which is greater than or equal to 0 and less than 1. The random number is used to generate a global random scheduling time for a multimedia channel; the global random scheduling time for each multimedia channel is different.
[0089] Please continue to refer to Figure 5 In one embodiment, before generating a global random scheduling time or a local random scheduling time by combining the reference scheduling time and the random number, the method further includes:
[0090] S04. According to the same image processing module in the multimedia channel, a local random number is generated by using a random function. The random number is greater than or equal to 0 and less than 1. The local random number of each image processing module is different.
[0091] In one implementation, a random number is generated using the random function RAND() of C language. The random number is greater than or equal to 0 and less than 1. The random number is used to generate a local / local random scheduling time for a single image processing module. The local / local random scheduling time of each image processing module in a multimedia channel is different.
[0092] Please continue to refer to Figure 4 , 5 In one embodiment, combining the reference scheduling time and the random number to generate the global random scheduling time or the local random scheduling time includes:
[0093] S11. Generate a global random scheduling time by combining the global benchmark scheduling time and the global random number.
[0094] In one implementation, in a multimedia path, as long as a global random scheduling time is generated, the global random scheduling time is the global base scheduling time multiplied by the global random number, that is, the random function RAND()*BST, and the resulting time is called the random scheduling time (RST). This random scheduling time (RST) is the scheduling time delay that all subsequent image processing modules except the first image processing module in a multimedia path need to make before accessing the memory.
[0095] S12. Generate a local random scheduling time by combining the local benchmark scheduling time and the global random number / local random number.
[0096] In one implementation, there are multiple image processing modules in a multimedia channel, and each image processing module will generate a local random scheduling time separately. The local random scheduling time can be the local benchmark scheduling time multiplied by the global random number, that is, the local random scheduling time is generated by the random function RAND()*BST. As mentioned above, the local benchmark scheduling time of each image processing module is different. The local random scheduling time can also be the local benchmark scheduling time multiplied by the local random number, that is, the local random scheduling time is generated by the random function RAND()*BST. As mentioned above, the local benchmark scheduling time and local random number of each image processing module are different. The local random scheduling time is the scheduling time delay that must be made before a subsequent single image processing module other than the first image processing module in a multimedia channel accesses the memory.
[0097] In the above implementation, steps S01, S02, S03, and S04 are executed in any order, and steps S11 and S12 are executed in any order.
[0098] It should be noted that the above embodiments can be freely combined as needed. The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application, and these improvements and modifications should also be regarded as the protection scope of the present application.
Claims
1. An image processing method, characterized in that: include: Based on the image frame rate of the image sensor, a local benchmark scheduling time is configured according to the image frame interval time in the same image processing module in the multimedia path; Based on the image frame rate of the image sensor, a global benchmark scheduling time is configured according to the image frame interval time in the same multimedia channel; Generate a global random scheduling time or a local random scheduling time by combining a benchmark scheduling time and a random number, wherein the benchmark scheduling time includes the global benchmark scheduling time and the local benchmark scheduling time; In the offline mode, the first image processing module in the multimedia channel reads an image data frame of an image frame to be processed from the memory at a processing time, performs a first image processing on the image frame to be processed, and generates a first image processing data frame; After the first image processing module writes the first image processing data frame into the memory, the second image processing module is notified to perform a second image processing on the image frame to be processed; After delaying the global random scheduling time or the local random scheduling time based on the first processing time, the second image processing module reads the first image processing data frame from the memory, performs second image processing on the image frame to be processed, and generates a second image processing data frame.
2. The image processing method according to claim 1, characterized in that: Before the step of combining the benchmark scheduling time and the random number to generate the global random scheduling time or the local random scheduling time, the step further includes: According to the same multimedia channel, a global random number is generated by using a random function, wherein the global random number is greater than or equal to 0 and less than 1; and the global random number in each multimedia channel is different.
3. The image processing method according to claim 1, characterized in that: Before the step of combining the benchmark scheduling time and the random number to generate the global random scheduling time or the local random scheduling time, the step further includes: According to the same image processing module in the multimedia channel, a local random number is generated by using a random function, and the local random number is greater than or equal to 0 and less than 1; the local random number of each image processing module is different.
4. The image processing method according to any one of claims 1 to 3, characterized in that: The combining of the benchmark scheduling time and the random number to generate the global random scheduling time or the local random scheduling time includes: Combining the global benchmark scheduling time in the benchmark scheduling time and the global random number in the random number, generating a global random scheduling time; The local reference scheduling time in the reference scheduling time and the global random number / local random number in the random number are combined to generate a local random scheduling time.
5. An image processing chip, characterized in that: include: A time generation module, used to generate a global random scheduling time or a local random scheduling time by combining a benchmark scheduling time and a random number; A first image processing module is used to read an image data frame of an image frame to be processed from a memory at a processing time in an offline mode, and generate a first image processing data frame after performing a first image processing on the image frame to be processed; a notification module, configured to notify the second image processing module to perform a second image processing on the image frame to be processed after the first image processing module writes the first image processing data frame into a memory; The second image processing module is used to read the first image processing data frame from the memory after delaying the global random scheduling time or the local random scheduling time based on the first processing time, and generate a second image processing data frame after performing a second image processing on the image frame to be processed; A configuration module, configured to configure a local reference scheduling time according to an image frame interval time based on an image frame rate of an image sensor and a same image processing module in a multimedia path; The configuration module is further used to configure a global reference scheduling time according to the image frame interval time based on the image frame rate of the image sensor and the same multimedia channel, wherein the reference scheduling time is less than the image frame interval time.
6. The image processing chip according to claim 5, characterized in that: Also includes: A random number generation module, used for generating a global random number using a random function according to the same multimedia channel, wherein the global random number in each multimedia channel is different; The random number generating module is further used to generate a local random number using a random function according to the same image processing module in the multimedia channel, and the local random number of each image processing module is different; the global random number and the local random number are greater than or equal to 0 and less than 1.
7. The image processing chip according to claim 5 or 6, characterized in that: The time generation module is used to combine the global reference scheduling time in the reference scheduling time and the global random number in the random number to generate a global random scheduling time; The time generation module is further used to generate a local random scheduling time by combining the local reference scheduling time in the reference scheduling time and the global random number / local random number in the random number.
Citation Information
Patent Citations
Image processing device and image processing method
CN107710274A
Control method, data transmission device, shooting device, control system, cradle head, movable platform and computer readable storage medium
CN112335223A
