Data processing method, system and apparatus

By obtaining the noise reduction coefficients from block data of adjacent frame image data within the chip, and then performing noise reduction processing on the current frame image, the problem of high energy consumption and high computational load in video image noise reduction is solved, achieving low power consumption and high efficiency noise reduction effect, which is suitable for miniaturized application scenarios.

CN116309169BActive Publication Date: 2026-11-27CHONGQING ZHONGXING MICRO ARTIFICIAL INTELLIGENCE CHIP TECH CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310289439.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2026-11-27
Estimated Expiration
2043-03-22

AI Technical Summary

Technical Problem

Existing technologies suffer from high energy consumption and high computational complexity in video image denoising, especially in miniaturized application scenarios. Temporal denoising algorithms require access to external memory, resulting in high power consumption and computational complexity, which affects chip design and cost.

Method used

By acquiring block data from adjacent frame image data, processing the data to obtain noise reduction coefficients, and using the noise reduction coefficients to perform noise reduction processing on the current frame image data, the computational load is reduced and external memory access is avoided. Block data is used as the processing unit, combined with lossy compression algorithms and block-to-line calculation.

Benefits of technology

It reduces the computational load and power consumption of noise reduction processing, improves the efficiency of noise reduction processing, is suitable for miniaturized application scenarios, meets the requirements of low cost and low power consumption, and simplifies chip design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116309169B_ABST
    Figure CN116309169B_ABST
Patent Text Reader

Abstract

The application provides a data processing method, system and device, which are applied to a chip. The method comprises the following steps: acquiring first block data of first image data and second block data of second image data, wherein the second image data is a denoised image of a previous frame of the first image data, and the second block data is block data at the same position as the first block data; performing data processing on the second block data and the first block data to obtain a denoising coefficient, wherein the denoising coefficient is used for denoising the first block data; performing denoising processing on the first block data by using the denoising coefficient to obtain third block data, wherein the third block data is denoised first block data; and performing block-to-row calculation on the third block data to generate denoised first image data. The technical scheme of the application reduces the storage capacity, calculation amount and power consumption required for denoising processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to a data processing method, system, and apparatus. Background Technology

[0002] Videos and images attract user attention due to their strong visual appeal; however, the quality of video and images directly impacts the user experience. Therefore, video and image noise reduction plays a crucial role. Currently, temporal noise reduction technology is commonly used for video and image noise reduction. However, when using temporal noise reduction, the image data required for noise reduction is usually stored in Dynamic Random Access Memory (DRAM) external to the chip, resulting in high power consumption when the chip accesses the DRAM to obtain the image data needed for noise reduction. Furthermore, the 3D block matching and 3D collaborative filtering (BM3D) algorithm commonly used in temporal noise reduction also leads to a large computational load and high resource consumption.

[0003] Therefore, how to reduce the computational load of noise reduction processing while achieving low-energy noise reduction has become an urgent technical problem to be solved. Summary of the Invention

[0004] In view of this, embodiments of this application provide a data processing method, system, and apparatus that reduce the storage capacity, computational load, and power consumption required for noise reduction processing.

[0005] In a first aspect, embodiments of this application provide a data processing method applied to a chip. The method includes: acquiring a first block of data of a first image and a second block of data of a second image, wherein the second image data is a denoised image of the previous frame of the first image data, and the second block of data is block data at the same position as the first block of data; performing data processing on the second block of data and the first block of data to obtain a denoising coefficient, wherein the denoising coefficient is used to denoise the first block of data; using the denoising coefficient to denoise the first block of data to obtain a third block of data, wherein the third block of data is the denoised first data; and performing block-to-line calculation on the third data to generate the denoised first image data.

[0006] In some embodiments of this application, the chip includes a noise reduction calculation module, wherein processing the second block of data and the first block of data to obtain a noise reduction coefficient includes: inputting the second block of data and the first block of data into the noise reduction calculation module for data processing to obtain a noise reduction coefficient.

[0007] In some embodiments of this application, the second block of data and the first block of data are input into the noise reduction calculation module for data processing to obtain the noise reduction coefficient, including: performing deviation calculation on the first block of data and the second block of data to obtain the first pixel deviation of the first block of data; adjusting the first pixel deviation to obtain the second pixel deviation when the first block of data does not meet the preset conditions; and obtaining the noise reduction coefficient based on the second pixel deviation and a preset linear function.

[0008] In some embodiments of this application, the first data block includes first chroma block data and first luminance block data, the first luminance block data includes sub-luminance block data, and the second data block includes second chroma block data and second luminance block data. The method of calculating the deviation between the first data block and the second data to obtain a first pixel deviation of the first data block includes: obtaining a chroma deviation based on the first chroma mean of the first chroma block data and the second chroma mean of the second chroma block data; calculating the deviation between the first luminance block data and the second luminance block data to obtain a first luminance deviation corresponding to the sub-luminance block data; obtaining an edge deviation based on the grayscale value of the first luminance block data and the sub-luminance average value of the sub-luminance block data; and weighting the chroma deviation, the first luminance deviation, and the edge deviation to obtain a first pixel deviation.

[0009] In some embodiments of this application, the deviation calculation of the first brightness block data and the second brightness block data to obtain the first brightness deviation corresponding to the sub-brightness block data includes: subtracting the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation; calculating the mean of the second brightness deviation to obtain the mean brightness deviation; smoothing the mean brightness deviation based on the first block data and adjacent block data to obtain the smoothed mean brightness deviation, wherein the adjacent block data are the block data adjacent to the position of the first block data; and weighting the smoothed mean brightness deviation with the third brightness deviation located in the sub-brightness block data to obtain the first brightness deviation, wherein the second brightness deviation includes the third brightness deviation.

[0010] In some embodiments of this application, when the first block of data does not meet preset conditions, the first pixel deviation is adjusted to obtain a second pixel deviation, including: when the average value of the smoothed brightness deviation is less than the motion detection threshold, multiplying the first pixel deviation by a preset multiple to obtain a third pixel deviation; when the average value of the brightness deviation is greater than the overexposure threshold, adding a preset value to the third pixel deviation to obtain a fourth pixel deviation; when the motion state of the first block of data meets preset conditions, determining the number of moving third pixels by traversing each third pixel in the first block of data, wherein the motion state is determined based on adjacent blocks of data and the second block of data; when the number of moving third pixels located within the sub-brightness block data is greater than a quantity threshold, adjusting the fourth pixel deviation to the second pixel deviation.

[0011] In some embodiments of this application, the adjacent block data includes first adjacent block data and second adjacent block data. When the motion state of the first block data meets preset conditions, the number of moving third pixels is determined by traversing each third pixel in the first block data. This includes: acquiring a pre-stored first motion indication value of the first adjacent block data, a second motion indication value of the second adjacent block data, and a third motion indication value of the second block data; if the sum of the first motion indication value, the second motion indication value, and twice the third motion indication value is greater than a first motion threshold, traversing the fourth pixel deviation of the third pixels in the first block data; and if the fourth pixel deviation of the third pixel is greater than the second motion threshold, using the third pixel as the moving third pixel.

[0012] In some embodiments of this application, the chip includes a line-to-block module, a memory, a loop controller, and a decompression module. The memory is used to store data required for noise reduction processing. Acquiring a first block of data from a first image and a second block of data from a second image includes: inputting multiple image line data from the first image to the line-to-block module, storing each line of data from the multiple image line data, and acquiring the first block of data when the number of multiple image line data meets a preset threshold; acquiring the compressed second block of data from the memory using the loop controller based on the first block of data; and inputting the compressed second block of data into the decompression module for decompression using a lossy decompression algorithm to obtain the second block of data.

[0013] In some embodiments of this application, storing each row of data in multiple image rows includes: obtaining the storage address of each row of data, the storage address being determined based on the previous storage address and the interval address, wherein the previous storage address is the interval address if the number of changes in the storage address and the number of pixels in the horizontal direction of the first image data meet preset conditions; and storing each row of data according to the storage address.

[0014] In some embodiments of this application, the chip further includes a compression module, wherein, after denoising the first block of data using a noise reduction coefficient to obtain the third block of data, the chip further includes: inputting the third block of data into the compression module for compression using a lossy compression algorithm to obtain the compressed third block of data; inputting the compressed third block of data into a loop controller, the loop controller inputting the compressed third block of data into a memory for storage, and using the compressed third block of data as the compressed second block of data used for denoising the next frame of the image.

[0015] In some embodiments of this application, the chip includes a block-to-line conversion module and a memory. The block-to-line conversion calculation of the third block of data to generate the first image data after noise reduction includes: inputting the third block of data into the block-to-line conversion module and storing the third block of data into the memory to obtain the noise-reduced image line data including the third block of data from the memory; and obtaining the first image data after noise reduction based on multiple noise-reduced image line data.

[0016] Secondly, embodiments of this application provide a data processing system applied to a chip. The system includes a line-to-block conversion module, a noise reduction calculation module, a block-to-line conversion module, a decompression module, a compression module, a memory, and a loop controller. The line-to-block conversion module is used to acquire a first block of data from a first image. The decompression module is used to decompress a compressed second block of data to acquire a second block of data from a second image, wherein the second image data is the noise-reduced image of the previous frame of the first image data, and the second block of data is the block data at the same position as the first block of data. The noise reduction calculation module is used to process the second block of data and the first data. The system comprises the following modules: a noise reduction coefficient, which is used to reduce noise in the first block of data; a third block of data, which is the first block of data after noise reduction, is obtained by applying the noise reduction coefficient to the first block of data; a block-to-line conversion module is used to perform block-to-line conversion calculation on the third block of data to generate the first image data after noise reduction; a compression module is used to compress the third block of data using a lossy compression algorithm to obtain the compressed third block of data; and a loop controller is used to store the compressed third block of data in a memory, and to retrieve the compressed third block of data from the memory and use it as the compressed second block of data for noise reduction in the next frame of the image.

[0017] Thirdly, embodiments of this application provide a data processing apparatus, comprising: a first acquisition module, configured to acquire a first block of data of a first image data and a second block of data of a second image data, wherein the second image data is a denoised image of the previous frame of the first image data, and the second block of data is block data at the same position as the first block of data; a second acquisition module, configured to perform data processing on the second block of data and the first block of data to acquire a denoising coefficient, wherein the denoising coefficient is used to denoise the first block of data; a denoising processing module, configured to perform denoising processing on the first block of data using the denoising coefficient to acquire a third block of data, wherein the third block of data is the denoised first block of data; and a third acquisition module, configured to perform block-to-line calculation on the third block of data to generate denoised first image data.

[0018] This application provides a data processing method, system, and apparatus. It acquires a first block of data and a second block of data from two adjacent frames of image data, processes the first and second blocks of data to obtain noise reduction coefficients, and then uses these coefficients to denoise the first block of data to obtain the denoised first block of data (i.e., the third block of data). This allows the noise reduction calculation to be performed on a block-by-block basis, reducing the computational load and improving efficiency. Furthermore, this application is applied to a chip, eliminating the need to access external memory during the noise reduction calculation, thus avoiding the high power consumption issues associated with accessing external memory. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the structure of a data processing system provided in an exemplary embodiment of this application.

[0020] Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application.

[0021] Figure 3 This is a schematic diagram of a macro coding unit provided in an exemplary embodiment of this application.

[0022] Figure 4 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.

[0023] Figure 5 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.

[0024] Figure 6 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.

[0025] Figure 7 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.

[0026] Figure 8 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application.

[0027] Figure 9 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application. Detailed Implementation

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

[0029] Application Overview

[0030] Image data denoising is a crucial step in computer vision preprocessing, typically achieved using temporal denoising techniques. However, temporal denoising usually employs off-chip DRAM to store reference image data for denoising (e.g., image data from adjacent frames). But for miniaturized applications, such as webcams above laptop screens, the distance from the bottom Central Processing Unit (CPU) prevents them from accessing gigabytes of RAM like the CPU. Instead, a dedicated memory space is configured within the webcam module. Therefore, excessive memory means a larger chip area and may increase heat generation, impacting the laptop's slim design and cost control.

[0031] Current temporal denoising algorithms typically have high complexity, requiring tasks such as motion search, gradient calculation, and multi-scale filtering. While they can achieve good image quality, they also place high demands on the chip's computing power and have complex hardware logic, which hinders the pipeline design of various functional modules within the chip, increasing the difficulty and cost of chip development.

[0032] To address the aforementioned problems, this application provides a data processing method. Various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0033] Exemplary System

[0034] Figure 1 This is a schematic diagram of the structure of a data processing system provided in an exemplary embodiment of this application. For example... Figure 1As shown, the system may include a line-to-block module 110, a noise reduction calculation module 120, a decompression module 130, a compression module 140, a loop controller 150, a block-to-line module 160, and an on-chip buffer (i.e., memory) 170.

[0035] The line-to-block module 110 is connected to the image buffer 171 and the noise reduction calculation module 120. The line-to-block module 110 is used to store each line of data in the first image data and to obtain the first block of data from the first image data using a line-to-block algorithm; that is, the output of the line-to-block module 110 is the first block of data. The first block of data can be a minimum coding unit (MCU), which can be data from an 8*16 pixel region in the first image data.

[0036] The decompression module 130 is connected to the noise reduction calculation module 120 and the loop controller 150. The decompression module 130 can use JPEG (Joint Photographic Experts Group) compression to decompress the compressed second block of data using a lossy compression algorithm based on Discrete Cosine Transform (DCT) to obtain the second block of the second image data. The second image data is the noise-reduced image data of the previous frame of the first image data. The second block of data is the block of data located at the same position as the first block of data.

[0037] It should be noted that the main cause of JPEG compression distortion comes from the quantization of DCT coefficients, which is to divide the coefficients at each position by a certain non-zero constant. The larger the constant is, the smaller the quotient is, and the fewer bits are required for encoding, thus achieving a higher compression ratio. However, the remainder is usually also larger, so the loss of image quality is also greater.

[0038] The noise reduction calculation module 120 is connected to the line-to-block module 110, the block-to-line module 160, the decompression module 130, the compression module 140, and the MCU motion flag buffer 172. The noise reduction calculation module 120 is used to perform temporal noise reduction processing on the first block of the first image data. That is, the noise reduction calculation module 120 can be a temporal noise reduction calculation module. The noise reduction calculation module 120 adopts a serial pipelined design. First, it calculates the pixel deviation 122 of each pixel point (i.e., the third pixel point described in the following embodiment) in the first block of data (i.e., MCU1) 121 and the second block of data (i.e., MCU0) 123 based on the serially input first block of data (i.e., MCU1) 121 and the second block of data (i.e., MCU0) 123. At the same time, the pixel deviation 122, the first block of data 121 and the second block of data 123 are cached in a first-in-first-out data buffer, such as FIFO (First In First Out). After the last data of the V macroblock of the two blocks of data is input, the FIFO data is read, and then the noise reduction coefficient (e.g., superposition weight) of each pixel data in the first block of data is calculated and pixel weighted average calculation is performed. At the same time, the third block of data (i.e., MCU2) after time-domain noise reduction is serially output.

[0039] It should be noted that temporal denoising refers to estimating the true pixel value of the current frame by combining the pixel values ​​of the current frame and several adjacent previous and subsequent frames in a noisy video shooting environment, thereby obtaining a cleaner and quieter image. In other words, temporal denoising is a 3D noise reduction method, and its main idea is to use the temporal correlation of multiple frames to achieve noise reduction.

[0040] The block-to-line conversion module 160 is connected to the image buffer 171 and the noise reduction calculation module 120. The block-to-line conversion module 160 is used to convert the third block of data into image line data of the noise-reduced first image data using a block-to-line conversion algorithm.

[0041] Compression module 140 is connected to noise reduction calculation module 120 and loop controller 150. Compression module 140 is used to compress the third block of data using a lossy compression algorithm based on discrete cosine transform to obtain the compressed third block of data.

[0042] The loop controller 150 is connected to the compression module 140, the decompression module 130, and the loop buffer 173. The loop controller 150 is used to write the third block of compressed data from the current frame into memory, and to read the third block of compressed data from the previous frame from memory as the second block of data. In other words, the loop controller 150 can store the compressed third block of data or read the compressed third block of data from the previous frame according to the write request from the compression module 140 or the read request from the decompression module 130.

[0043] The on-chip buffer 170 can be an on-chip single-port memory (Random Access Memory, RAM) storage resource. The on-chip buffer 170 may include an image buffer 171, an MCU motion flag buffer 172, and a circular buffer 173, all of which can be on-chip single-port RAM storage resources. The image buffer 171 is used to store the input image line data. The MCU motion flag buffer 172 can be used to store the block data motion flag bits (e.g., the third motion indication value) of the previous frame (i.e., the second image data). The circular buffer 173 can be used to store the denoised compressed image data of the previous frame. It should be noted that, when the image resolution is Hpixel*Wpixel, the storage space of the MCU motion flag buffer 172 can be W / 8*H / 15, and the data width of the circular buffer 173 can be 2*pixel, with a data depth of W*H / 15.

[0044] Exemplary methods

[0045] Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application. Figure 2 The method is applied to the chip, for example, executed by a data processing system running on the chip. Figure 2 As shown, the data processing method includes the following:

[0046] S210: Obtain the first block of data of the first image data and the second block of data of the second image data.

[0047] In one embodiment, the second image data is the denoised image of the previous frame of the first image data, and the second block data is the block data at the same position as the first block data.

[0048] Specifically, the first image data is the image data of the current frame of the video data, and the second image data is the denoised image data of the previous frame of the video data. The first image data may include multiple first blocks of data, which may be data from an 8*16 pixel region within the first image data. The second image data may also include multiple second blocks of data, which may be data from an 8*16 pixel region within the second image data. Furthermore, the second blocks of data may be block data located at the same position as the first blocks of data.

[0049] It should be noted that the first and second image data can be YUV422 image data (16 bits / cycle), where YUV is a color encoding method, where Y represents luminance (Luma), and U and V represent chroma (Chroma). YUV422 image data can be understood as data in YUV4:2:2 format, which means that the chroma component is downsampled by 1 / 2 in the horizontal direction, while remaining unchanged in the vertical direction.

[0050] In one embodiment, see Figure 3 The first piece of data can be the macro-coding unit MCU. Figure 3 Each small square in the diagram represents an 8x8 pixel macroblock. The first data block 300 may include a U macroblock 320 and a V macroblock 330, as well as two corresponding Y macroblocks, namely Y1 macroblock 311 and Y2 macroblock 312. In other words, the first data block may include first chroma block data (i.e., a U macroblock or a V macroblock) and first luma block data (i.e., two Y macroblocks), wherein the first luma block data includes sub-luma block data (e.g., see...). Figure 3 The sub-luminance block data can be either Y1 macroblock 311 or Y2 macroblock 312, meaning the sub-luminance block data is an 8*8 pixel Y macroblock. It should be noted that the second data block is identical to the first data block; the second data block includes the second chroma block data and the second luminance block data. For details, please refer to the description of the first data block.

[0051] S220: Process the second and first data blocks to obtain the noise reduction coefficient.

[0052] In one embodiment, the noise reduction coefficient is used to reduce noise in the first block of data.

[0053] Specifically, the chip may include a noise reduction calculation module. Data processing may include processes such as calculating the first pixel deviation between the first block of data and the second block of data, and weighted calculation.

[0054] In one embodiment, the second block of data and the first block of data are processed to obtain a noise reduction coefficient, including: inputting the second block of data and the first block of data into a noise reduction calculation module for data processing to obtain a noise reduction coefficient.

[0055] Specifically, the noise reduction calculation module can calculate the deviation based on the first chroma block data and the first luminance block data of the first data block, and the second chroma block data and the second luminance block data of the second data block, to obtain the first pixel deviation of the first data block. Furthermore, if the first data block does not meet preset conditions, the first pixel deviation is adjusted (e.g., increased) to obtain the second pixel deviation. Finally, the second pixel deviation is curve-fitted using a preset linear function to obtain the noise reduction coefficient, thus laying the foundation for subsequent noise reduction of the first data block through the noise reduction coefficient.

[0056] S230: Use the noise reduction coefficient to perform noise reduction processing on the first block of data to obtain the third block of data.

[0057] In one embodiment, the third data block is the first data block after noise reduction.

[0058] Specifically, the noise reduction calculation module can obtain the noise-reduced third block of data by performing a weighted average calculation on each third pixel in the first block of data using noise reduction coefficients. It should be noted that the noise reduction method in this embodiment can be understood as estimating the motion intensity between the two blocks of data by calculating the brightness difference of pixels in the first block of the first image data and the second block of the noise-reduced second image data from the previous frame, thereby obtaining the superposition weight of each pixel between the first and second blocks of data. The third block of data output after temporal noise reduction can be obtained by weighted averaging of each pixel in the first and second blocks of data.

[0059] S240: Perform block-to-line calculation on the third block of data to generate the first image data after noise reduction.

[0060] Specifically, the chip may further include a block-to-line conversion module. The input of the block-to-line conversion module is the denoised third block of data output by the denoising calculation module. The block-to-line conversion module uses a block-to-line conversion algorithm to perform block-to-line conversion calculations on the third block of data to obtain denoised image line data. This denoised image line data is the line data of the denoised first image data; that is, the denoised first image data includes multiple denoised image line data. Furthermore, the block-to-line conversion module can generate the denoised first image data based on the acquired multiple denoised image line data.

[0061] Therefore, this embodiment of the application obtains the first and second blocks of data from two adjacent frames of image data, processes the first and second blocks of data to obtain noise reduction coefficients, and then uses the noise reduction coefficients to perform noise reduction processing on the first block of data to obtain the noise-reduced first block of data (i.e., the third block of data). This allows the noise reduction calculation process to be performed on a block-by-block basis, reducing the computational load and improving the efficiency of the noise reduction process. Furthermore, this embodiment of the application is applied to a chip, thus eliminating the need to access external memory during the noise reduction calculation process, avoiding the high power consumption problem caused by accessing external memory.

[0062] Figure 4 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 4 The embodiments are further limitations on the above embodiments, such as... Figure 4 As shown, the data processing method further includes the following:

[0063] S410: Calculate the deviation between the first block of data and the second block of data to obtain the first pixel deviation of the first block of data.

[0064] Specifically, the deviation calculation includes the process of calculating the chromaticity deviation, the first luminance deviation, and the edge deviation of the first and second data blocks.

[0065] In one embodiment, the noise reduction calculation module can first calculate the first chromaticity mean of the first chromaticity block data and the second chromaticity mean of the second chromaticity block data. Taking the calculation of the first chromaticity mean as an example, the first chromaticity mean can be obtained by summing the chromaticity values ​​of each pixel in the first chromaticity block data and then dividing by the number of pixels in the first chromaticity block data. Then, based on the first chromaticity mean and the second chromaticity mean, the chromaticity deviation is obtained.

[0066] Furthermore, the noise reduction calculation module can calculate the deviation between the first luminance block data and the second luminance block data to obtain the first luminance deviation corresponding to the sub-luminance block data. Based on the grayscale value of the first luminance block data and the average luminance value of the sub-luminance block data, the edge deviation is obtained. Finally, the chromaticity deviation, the first luminance deviation, and the edge deviation are weighted and averaged to obtain the first pixel deviation of the first block data.

[0067] It should be noted that for a detailed description of this step, please refer to [link / reference needed]. Figure 5 Description of the embodiments.

[0068] S420: If the first block of data does not meet the preset conditions, adjust the first pixel deviation to obtain the second pixel deviation.

[0069] Specifically, the preset condition can be determined by setting a preset judgment threshold. For example, the judgment threshold can be an overexposure threshold for judging the average brightness deviation of the first brightness block data; or, the judgment threshold can be a number threshold for judging the number of moving third pixels, etc. The embodiments of this application do not specifically limit the judgment threshold.

[0070] The second pixel deviation can be obtained by multiplying the first pixel deviation by a factor, increasing or decreasing a preset value, etc. The embodiments of this application do not specifically limit the method of obtaining the second pixel deviation.

[0071] In one embodiment, if the average brightness deviation after smoothing is less than a motion detection threshold, the first pixel deviation is multiplied by a preset factor to obtain the third pixel deviation. Then, if the average brightness deviation is greater than an overexposure threshold, the third pixel deviation is added to a preset value to obtain the fourth pixel deviation. Next, if the motion state of the first data block meets a preset condition, the number of moving third pixels is determined by traversing each third pixel in the first data block. If the number of moving third pixels located within a sub-brightness block is greater than a quantity threshold, the fourth pixel deviation is adjusted to the second pixel deviation.

[0072] It should be noted that for a detailed description of this step, please refer to [link / reference needed]. Figure 7 Description of the embodiments.

[0073] S430: Obtain the noise reduction coefficient based on the second pixel deviation and a preset linear function.

[0074] Specifically, a rectangular coordinate system is established, where the horizontal axis can be the second pixel deviation of the third pixel point, and the vertical axis is the weight value. The noise reduction calculation module can use the second pixel deviation of each third pixel point as multiple curve control points and fit it with a linear function, where the linear function can be a piecewise linear function. This application embodiment does not specifically limit the linear function.

[0075] Furthermore, based on the second pixel deviations of multiple third pixel points, multiple weight values ​​corresponding to the ordinate are determined, and these weight values ​​are used as denoising coefficients. It should be noted that the denoising coefficients can be understood as the superimposed weights of each pixel point between the first and second data blocks. In addition, by performing a weighted average calculation on each pixel point in the first and second data blocks, the denoised (or temporally denoised) third data block can be obtained.

[0076] Therefore, it can be seen that the embodiments of this application reduce the amount of computation required for noise reduction by using block data for time-domain noise reduction, thereby facilitating the implementation of low-latency high-speed pipeline design, reducing the difficulty of chip development to a certain extent, and meeting the requirements of low cost and low power consumption in miniaturized application scenarios / high-speed motion scenarios.

[0077] Figure 5 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 5 The example is Figure 4 Further limitations on step S410 in the embodiments. For example... Figure 5 As shown, step S410 further includes the following:

[0078] In one embodiment, the first data block includes first chroma block data and first luminance block data, the first luminance block data includes sub-luminance block data, and the second data block includes second chroma block data and second luminance block data.

[0079] S510: Based on the first chromaticity mean of the first chromaticity block data and the second chromaticity mean of the second chromaticity block data, the chromaticity deviation is obtained.

[0080] Specifically, the first chroma block data can be a U-block or a V-block of the first data block, meaning the first chroma block data is an 8*8 pixel U / V macroblock in the first data block. Similarly, the second chroma block data can also be an 8*8 pixel U / V macroblock in the second data block.

[0081] The first chromaticity mean is obtained by adding the chromaticity values ​​of each pixel in the first chromaticity block data and then dividing by the number of pixels. The second chromaticity mean is obtained by adding the chromaticity values ​​of each pixel in the second chromaticity block data and then dividing by the number of pixels.

[0082] In one embodiment, the chromaticity deviation is obtained by adding a first chromaticity deviation and a second chromaticity deviation. The first chromaticity deviation is obtained by subtracting the first chromaticity mean from the second chromaticity mean when the first and second chromaticity block data are U-macroblocks (i.e., the first chromaticity deviation is a U-component deviation). The second chromaticity deviation is obtained by subtracting the first chromaticity mean from the second chromaticity mean when the first and second chromaticity block data are V-macroblocks (i.e., the second chromaticity deviation is a V-component deviation). In other words, the chromaticity deviation includes both U-component and V-component deviations, and is the sum of the two, thereby increasing the sensitivity for motion detection in brightly colored areas.

[0083] It should be noted that the U component deviation can be understood as the result of subtracting the mean values ​​of the 8x8 U macroblocks in the two consecutive frames. The V component deviation is similar, and the chroma deviation is a macroblock-level value.

[0084] S520: Calculate the deviation between the first luminance block data and the second luminance block data to obtain the first luminance deviation corresponding to the sub-luminance block data.

[0085] Specifically, the first luminance block data can be a Y macroblock of the first data block, that is, the first luminance block data is an 8*16 pixel Y macroblock in the first data block, for example... Figure 3 As shown, the first data block can be Y1 macroblock 311 and Y2 macroblock 312, and the sub-luminance block data is either Y1 macroblock 311 or Y2 macroblock 312 in the Y macroblock. It should be noted that the description of the second luminance block data is basically the same as that of the first luminance block data, that is, the second luminance block data is an 8*16 pixel Y macroblock in the second data block.

[0086] In one embodiment, the first brightness value of each first pixel in the first brightness block data is subtracted from the second brightness value of each second pixel in the second brightness block data to obtain a second brightness deviation. The second brightness deviation is then averaged to obtain a mean brightness deviation, which can be understood as the mean deviation of the entire block data.

[0087] Furthermore, the mean brightness deviation is smoothed based on the first block of data and adjacent blocks of data to obtain the smoothed mean brightness deviation, where adjacent blocks of data are those adjacent to the first block of data. The smoothed mean brightness deviation is then weighted and averaged with the third brightness deviation located in the sub-brightness block data to obtain the first brightness deviation at the sub-block level, where the third brightness deviation can be understood as a portion of the brightness deviation corresponding to the sub-brightness block data within the second brightness deviation corresponding to the first block of data.

[0088] It should be noted that for a detailed description of this step, please refer to [link / reference needed]. Figure 6 Description of the embodiments.

[0089] S530: Obtain the edge deviation based on the grayscale value of the first brightness block data and the average brightness value of the sub-brightness block data.

[0090] It's important to note that since edges often imply higher contrast, they are the most noticeable features when an object is in motion. In other words, for a denoised frame (i.e., image data), if the object moves in the next moment, the position of its edges will change. Continuing to retain the pixel values ​​of the previous edge positions is meaningless and would instead lead to edge blurring. In this case, pixel values ​​from the new input frame (e.g., the first image data) should be used instead. Therefore, to reduce blurring caused by temporal denoising, the edge texture information of the denoised frame itself needs to be considered, i.e., edge deviation needs to be calculated. The reason for considering the information from the denoised frame is that the noise in the new input frame is relatively strong, making edge detection on the input frame prone to errors. The noise in the denoised frame itself has been greatly suppressed, ensuring better accuracy.

[0091] Specifically, the average sub-brightness (e.g., see...) Figure 3 The average value corresponding to macroblock 311 of Y1 can be the average value obtained by adding the brightness values ​​of each pixel in the sub-luminance block data and then dividing by the number of pixels.

[0092] In one embodiment, the grayscale value of each first pixel in the first brightness block data is subtracted from the average value of the sub-brightness block data to obtain the difference. The absolute value of this difference is then used as the edge deviation of each first pixel. In other words, the edge deviation is pixel-level data.

[0093] S540: The first pixel deviation is obtained by weighting the chromaticity deviation, the first luminance deviation, and the edge deviation.

[0094] Specifically, a first weight value corresponding to the color deviation, a second weight value corresponding to the first brightness deviation, and a third weight value corresponding to the edge deviation are preset. The specific data corresponding to the first weight value, the second weight value, and the third weight value can be flexibly set according to the actual situation. The weight values ​​in this embodiment are not specifically limited.

[0095] In one embodiment, the first pixel deviation of each third pixel in the first block of data is obtained by multiplying the chromaticity deviation, the first luminance deviation, and the edge deviation by their respective weight values ​​and then summing them. It should be noted that the first pixel deviation is pixel-level data.

[0096] For example, when the first weight value is 0.3, the second weight value is 0.4, and the third weight value is 0.3, the first pixel deviation is the sum of the chromaticity deviation multiplied by 0.3, the first luminance deviation multiplied by 0.4, and the edge deviation multiplied by 0.3.

[0097] Therefore, it can be seen that the embodiments of this application calculate the values ​​corresponding to each pixel in the first block of data to obtain the pixel deviation corresponding to each pixel in the first block of data, which provides a guarantee for obtaining a more accurate noise reduction coefficient in the future.

[0098] Figure 6 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 6 The example is Figure 5 Further limitations on step S520 in the embodiments. For example... Figure 6 As shown, step S520 further includes the following:

[0099] S610: Subtract the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation.

[0100] Specifically, the first brightness value corresponding to each first pixel in the first brightness block data is subtracted from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation of each pixel (e.g., the first pixel).

[0101] It should be noted that the second brightness deviation can be understood as the result of subtracting the individual pixels in the 8*16 brightness block data of the two frames. The second brightness deviation includes two sub-brightness block data, one on the left and one on the right (for example, see...). Figure 3 The brightness deviation of macroblocks Y1 (311) and Y2 (312).

[0102] S620: Calculate the average value of the second brightness deviation to obtain the average brightness deviation.

[0103] It should be noted that since the brightness deviation of a single pixel is easily affected by noise, it is also necessary to calculate the average brightness deviation to increase the sensitivity to local motion differences.

[0104] Specifically, the brightness deviation of two sub-brightness block data is obtained from the second brightness deviation, and the mean value of the sub-brightness deviation of the two sub-brightness block data is calculated respectively. Then, the average value of the two sub-brightness deviation means is calculated (for example, the two sub-brightness deviation means are added together and then divided by 2), and the calculated average value is used as the mean value of brightness deviation.

[0105] It should be noted that, taking the calculation method of the average sub-brightness deviation as an example, the average value can be calculated by adding the brightness deviations corresponding to each pixel in the sub-brightness block data and then dividing by the number of pixels to obtain the average sub-brightness deviation.

[0106] S630: Smooth the average brightness deviation based on the first block of data and adjacent blocks of data to obtain the smoothed average brightness deviation.

[0107] It should be noted that because the size of the block data (e.g., the first block data) is relatively large, directly using the calculated average brightness deviation can easily lead to block effects. Therefore, it is necessary to smooth the data with adjacent blocks.

[0108] In one embodiment, the adjacent block data is the block data that is adjacent to the position of the first block data. For example, the adjacent block data can be the block data above the first block data, or the block data to the left of the first block data, etc., and this application embodiment does not specifically limit this.

[0109] Specifically, if the first data block is the first data block in a row, this first data block is not smoothed. The first data block of each subsequent row is smoothed with the first data block of the previous row. The second and subsequent data blocks of each row are smoothed with the adjacent data block to its left.

[0110] In one embodiment, the noise reduction calculation module can determine the adjacent data blocks corresponding to the first data block based on the position of the first data block. If the difference between the average brightness deviation and the average brightness deviation of the adjacent data blocks is within a certain range, then the two data blocks are considered to have similar motion intensities. Therefore, smoothing operations such as addition and subtraction can be used to increase the smoothing degree. Conversely, if the difference is large, then the two are considered to have different motion forms, and smoothing operations are not required. The smoothing operation can be flexibly set according to the actual situation, and this embodiment does not specifically limit it. In other words, the smoothing operation process in this embodiment can be understood as only needing to maintain two values ​​for smoothing.

[0111] S640: Take the weighted average of the smoothed brightness deviation and the third brightness deviation in the sub-brightness block data to obtain the first brightness deviation.

[0112] In one embodiment, the second brightness deviation includes a third brightness deviation. Specifically, the third brightness deviation can be understood as the brightness deviation of the sub-brightness block data region in the second brightness deviation.

[0113] Specifically, the smoothed mean brightness deviation is weighted and calculated together with the third brightness deviation (i.e., character brightness deviation) of the sub-brightness block data. The fourth weight value of the smoothed mean brightness deviation relative to the third brightness deviation can be flexibly set according to the actual situation, and this fourth weight value can be a value less than 1. Furthermore, the fifth weight value corresponding to the third brightness deviation can be the value obtained by subtracting the fourth weight value from 1. For example, the fourth weight value is 0.3, and the fifth weight value is 0.7.

[0114] It should be noted that when the noise level is relatively low, the fourth weight value can be smaller to increase sensitivity to local motion differences and avoid excessive block effects. Conversely, when the noise level is relatively high, the fourth weight value can be larger to suppress the impact of noise on motion estimation.

[0115] In one embodiment, the first brightness deviation can be obtained by first adding the product of the fourth weight value and the smoothed average brightness deviation to the product of the third brightness deviation and the fifth weight value to obtain the sum value, and then using the sum value as the first brightness deviation.

[0116] Therefore, it can be seen that the embodiments of this application adjust the brightness deviation to obtain a more accurate brightness deviation, thus ensuring the acquisition of accurate pixel deviation.

[0117] Figure 7 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 7 The example is Figure 4 Further limitations on step S420 in the embodiments. For example... Figure 7 As shown, step S420 further includes the following:

[0118] S710: If the average brightness deviation after smoothing is less than the motion detection threshold, multiply the first pixel deviation by a preset factor to obtain the third pixel deviation.

[0119] Specifically, when the local contrast of an image is low and the brightness is dim, even if the pixel value difference between two consecutive video frames is small, the content of that local area has actually changed significantly. If the motion detection threshold is applied to the bright area, it is easy to produce motion blur. Therefore, the motion detection threshold can be set according to the actual situation.

[0120] In one embodiment, when the noise reduction calculation module detects that the average value of the smoothed brightness deviation is less than the motion detection threshold, it multiplies the first pixel deviation by a preset factor to obtain the enlarged third pixel deviation. The preset factor can be 2, 3 or 4. This application embodiment does not specifically limit the preset factor.

[0121] S720: When the average brightness deviation is greater than the overexposure threshold, the third pixel deviation is added to a preset value to obtain the fourth pixel deviation.

[0122] Specifically, in order to avoid edge ghosting caused by motion estimation failure, the noise reduction calculation module can add a preset value to the third pixel deviation when the average brightness deviation of the first brightness block data is detected to be greater than the overexposure threshold, so as to obtain the expanded fourth pixel deviation. The preset value can be 1, 2 or 3, and the overexposure threshold can be a fixed value of 230. This application embodiment does not specifically limit the setting of the preset value and the overexposure threshold.

[0123] It should be noted that when the first brightness block data (i.e., the Y macroblock) is underexposed or overexposed as a whole, motion estimation is often very difficult because the brightness change that can be produced at this time is very small, and details are usually difficult to capture. The first brightness block data itself is relatively weakly affected by noise, or in other words, the impact of noise on subjective perception is almost negligible. Therefore, it is necessary to increase the third pixel deviation.

[0124] S730: When the motion state of the first block of data meets the preset conditions, the number of moving third pixels is determined by traversing each third pixel in the first block of data.

[0125] In one embodiment, the motion state is determined based on adjacent block data and a second block of data.

[0126] Specifically, the motion state can be represented by a motion indicator value. For example, if the motion state is "moving", the marked motion indicator value is 1, otherwise it is 0. The motion state of the first block of data can be determined based on the motion state of the second block of data (i.e., the third motion indicator value) and the motion states of adjacent blocks of data (i.e., the first motion indicator value and the second motion indicator value).

[0127] It should be noted that when the first data block comes from a large area of ​​solid color object, motion can be detected relatively easily for pixels at the object's edge. However, pixels inside the edge are often easily judged as stationary, which can lead to edge artifacts. Therefore, the motion detection results of the second data block need to be considered.

[0128] In one embodiment, the noise reduction calculation module can acquire pre-stored motion indicator values ​​of adjacent data blocks and third motion indicator values ​​of the second data block. If the sum of the motion indicator values ​​of the adjacent data blocks and the third motion indicator values ​​is greater than a first motion threshold, the module iterates through the fourth pixel deviation of the third pixel in the first data block. Where the fourth pixel deviation of the third pixel is greater than the second motion threshold, the third pixel is considered a moving third pixel, thereby determining the number of moving third pixels.

[0129] S740: If the number of moving third pixels within the sub-luminance block data is greater than the quantity threshold, adjust the fourth pixel deviation to the second pixel deviation.

[0130] Specifically, the noise reduction calculation module can count the number of moving third pixels, and if the cumulative number of moving third pixels located in the sub-brightness block data is greater than the number threshold, the fourth pixel deviation is adjusted to the second pixel deviation, where the number threshold can be set according to the actual situation.

[0131] In one embodiment, the method further includes: if the number of moving third pixels located within the sub-luminance block data is greater than a quantity threshold, determining that the motion indication value of the first block data is 1, and then updating and recording the motion state of the first block data.

[0132] It should be noted that due to noise and image texture, even if the first block of data is found to be moving after judgment, it does not mean that all pixels in the block of data will be moving. Especially in flat areas, pixels are often easily judged as stationary. Therefore, it is necessary to count the number of pixels judged as moving in a certain area (e.g., sub-brightness block data).

[0133] Therefore, it can be seen that the embodiments of this application improve the accuracy and precision of pixel deviation by adjusting the pixel deviation according to different image data.

[0134] In one embodiment of this application, the adjacent block data includes first adjacent block data and second adjacent block data. When the motion state of the first block data meets a preset condition, the number of moving third pixels is determined by traversing each third pixel in the first block data. This includes: acquiring a pre-stored first motion indicator value of the first adjacent block data, a second motion indicator value of the second adjacent block data, and a third motion indicator value of the second block data; if the sum of the first motion indicator value, the second motion indicator value, and twice the third motion indicator value is greater than a first motion threshold, traversing the fourth pixel deviation of the third pixels in the first block data; and if the fourth pixel deviation of the third pixel is greater than the second motion threshold, designating the third pixel as a moving third pixel.

[0135] Specifically, the first adjacent block data and the second adjacent block data can be any two blocks of data adjacent to the first block data. This application embodiment does not specifically limit the adjacent block data. For example, the first adjacent block data is the block data to the left of the first block data, and the second adjacent block data is the block data above the first block data.

[0136] The first motion indication value, the second motion indication value, and the third motion indication value can be stored on the chip in advance in the form of a cache. In order to save the required cache, this application embodiment can only retain the motion indication values ​​of each block of data in the previous frame of the first image data after noise reduction (i.e., the second image data).

[0137] In one embodiment, the noise reduction calculation module can first calculate the sum of the first motion indication value, the second motion indication value, and twice the third motion indication value. If the calculated sum is greater than the first motion threshold, it can traverse the fourth pixel deviation of each third pixel point, determine the relationship between the fourth pixel deviation and the second motion threshold, and if the fourth pixel deviation is greater than the second motion threshold, determine that the third pixel point corresponding to the fourth pixel deviation is the moving third pixel point, that is, mark the motion indication value of the third pixel point as 1.

[0138] It should be noted that the values ​​of the first motion threshold and the second motion threshold can be set according to the actual situation. Since the first data block has already undergone overexposure compensation and other operations, only one value needs to be set for the first motion threshold.

[0139] Therefore, the embodiments of this application determine the motion state of a pixel by using adjacent block data, a first motion threshold, and a second motion threshold, thereby improving the efficiency of motion state determination while quickly determining the motion state of a pixel.

[0140] Figure 8 This is a flowchart illustrating a data processing method provided in another exemplary embodiment of this application. Figure 8 The example is Figure 2 Further limitations on step S210 in the embodiments. For example... Figure 2 As shown, step S210 further includes the following:

[0141] S810: Input multiple image row data of the first image data into the row-to-block module, store each row of data in the multiple image row data, and obtain the first block of data when the number of multiple image row data meets the preset threshold.

[0142] Specifically, the preset threshold can be 8, 9, etc., and this application embodiment does not specifically limit it. For example, after the image row data of the first image data is sequentially input into the row-to-block module, starting from the input of the 9th row of image row data, the storage address where the current image row data needs to be stored is first obtained, where the storage address is determined based on the previous storage address and the interval address. Then, a block of the first image data is read according to the obtained storage address, and the read block data is converted into the first block data, and then the current image row data is stored.

[0143] In one embodiment, the line-to-block module can also output the first block of data to the noise reduction calculation module, thereby reducing the noise of the first block of data.

[0144] S820: Based on the first block of data, retrieve the compressed second block of data from the memory through the loop controller.

[0145] Specifically, the loop controller can retrieve the second block of data, which is the noise-reduced and compressed data from the previous frame corresponding to the first block of data, from the loop buffer in the memory.

[0146] S830: Input the compressed second block of data into the decompression module and decompress it using a lossy decompression algorithm to obtain the second block of data.

[0147] Specifically, the loop controller inputs the obtained compressed second block of data into the decompression module for decompression to obtain the second block of data. The decompression method can be a lossy decompression algorithm based on Discrete Cosine Transform (DCT). This application embodiment does not specifically limit the decompression method.

[0148] For example, the second block of data after JPEG compression is processed by Huffman decoding, inverse data quantization, and inverse discrete cosine transform, and then output as the second block of data after JPEG decompression.

[0149] It should be noted that the compression method used in this application embodiment can reduce the required cache capacity to less than 1 / 15 of the current capacity.

[0150] Therefore, it can be seen that the embodiments of this application reduce the storage space required for noise reduction and the occupation of storage resources by using a lossy compression algorithm to compress the data required for noise reduction (i.e., the second block of data).

[0151] In one embodiment of this application, storing each row of data in a plurality of image rows includes: obtaining the storage address of each row of data, wherein the storage address is determined based on the previous storage address and the interval address, wherein the previous storage address is the interval address when the number of changes in the storage address and the number of pixels in the horizontal direction of the first image data meet preset conditions; and storing each row of data according to the storage address.

[0152] Specifically, the storage address can also be called the RAM address. The storage address of the image row data (i.e., the current storage address) can be obtained by adding the previous storage address and the interval address. That is, the next storage address can be obtained by adding the current storage address and the interval address, where the interval address refers to the distance between adjacent addresses when reading RAM.

[0153] In one embodiment, the method for obtaining the interval address includes: if the number of changes in the storage address is equal to the number of pixels in the horizontal direction of the first image data divided by 16 and then added by 1, then the current storage address is taken as the next interval address. The number of changes in the storage address can be once when storing a preset number of image rows of data, for example, changing the storage address once every 8 rows of image data. This embodiment does not specifically limit this.

[0154] It should be noted that the process of storing image row data can be understood as first reading the storage address of the image row data, and then writing the image row data to that storage address.

[0155] Therefore, it can be seen that the present application embodiment determines the current storage address by using the previous storage address and the interval address, which simplifies the calculation method of the interval address and makes the calculation process of the interval address free from complex operations (e.g., power operations), thus reducing the amount of calculation for the interval address.

[0156] In one embodiment of this application, the chip further includes a compression module. After denoising the first block of data using a noise reduction coefficient to obtain the third block of data, the chip further includes: inputting the third block of data into the compression module and compressing it using a lossy compression algorithm to obtain the compressed third block of data; inputting the compressed third block of data into a loop controller, the loop controller inputting the compressed third block of data into a memory for storage, and using the compressed third block of data as the compressed second block of data used for denoising the next frame of the image.

[0157] Specifically, the third data block is the first data block after noise reduction. After the noise reduction calculation module outputs the third data block, it inputs the third data block into the compression module for compression to obtain the compressed third data block. The compression module can use a lossy compression algorithm based on discrete cosine transform. The algorithm mainly includes steps such as discrete cosine transform, DCT quantization, and Huffman coding. The embodiments of this application do not specifically limit the compression steps.

[0158] For example, after the third data block is input into the compression module and processed by discrete cosine transform, data quantization and Huffman coding, the output is the third data block compressed by JPEG.

[0159] Furthermore, the compressed third block of data is sent to the loop controller, which then sends the compressed third block of data to the loop buffer for storage. The compressed third block of data is used as the compressed second block of data required for the next frame noise reduction, so that the loop controller can determine the compressed second block of data corresponding to the first block of data based on the first block of data.

[0160] Therefore, it can be seen that the embodiment of this application uses a lossy compression algorithm to compress the third block of data, which reduces the file size of the compressed third block of data, reduces the occupation of storage resources, saves storage costs, and solves the problem that current time-domain noise reduction requires a large amount of storage resources.

[0161] In one embodiment of this application, the chip includes a block-to-line conversion module and a memory. The block-to-line conversion calculation of the third block of data to generate the first image data after noise reduction includes: inputting the third block of data into the block-to-line conversion module and storing the third block of data into the memory to obtain the noise-reduced image line data including the third block of data from the memory; and obtaining the first image data after noise reduction based on the multiple noise-reduced image line data.

[0162] Specifically, the denoising calculation module outputs the denoised third block of data, and then inputs this third block of data into the block-to-line conversion module for block-to-line conversion to obtain the denoised image line data. Then, based on the multiple denoised image line data of the denoised first image data, the denoised first image data is constructed.

[0163] In one embodiment, when performing block-to-line conversion on the third block of data, the third block of data needs to be stored. The storage address of the third block of data can be determined by adding the previous storage address and the interval address. The storage address can change once when storing a preset number (e.g., 8) of image line data. Each time the storage address changes, the storage address change count is incremented by 1. When the storage address change count is equal to 8 plus 1, the current storage address is used as the interval address for the next preset number (e.g., 8) of line data.

[0164] The following section of this application uses the resolution of the first image data as H pixels * W pixels, the size of the first block of data as 8 pixels * 16 pixels, and 1 pixel = 16 bits as an example to provide a detailed explanation of the image line-to-block algorithm and the block-to-line algorithm.

[0165] Image row-to-block conversion refers to inputting and writing the image into RAM sequentially according to the order of image row data (W pixels), and reading the image block data (8 pixels * 16 pixels) sequentially and outputting it to obtain the first block of data.

[0166] Image block transpilation refers to inputting image data into RAM in the order of image block data (8 pixels * 16 pixels) and writing it sequentially. When reading RAM, the image data is read and output sequentially in the order of image row data (W pixels).

[0167] It should be noted that the image buffer (also known as the "image line buffer") has the following space size: RAM bit width: 16 * 1 pixel, RAM depth: 8 * (W / 16).

[0168] For each RAM address (i.e., storage address), first read the data in the RAM address, and then write the new data to the address. The RAM address change rule can be found in formula (1).

[0169] Nxt_addr = cur_addr + inter_blk (1)

[0170] Where Nxt_addr represents the next RAM address, cur_addr represents the current RAM address, and inter_blk represents the interval address.

[0171] It should be noted that at the beginning of an image frame, if the current RAM address is 0, then based on formula (1), if the result of Nxt_addr is greater than or equal to 8*(W / 16), then 8*(W / 16) needs to be subtracted and then 1 added.

[0172] Specifically, at the beginning of an image frame, the interval address is 1, and the interval address changes once every 8*(W / 16) address data (i.e., 8 rows of image data). The steps for obtaining the interval address are as follows, where n = 0, 1, 2... represents the (n+1)th 8-row of an image frame.

[0173] When using the row-to-block algorithm, at the beginning of the nth 8-row data, the count of memory address changes (i.e., cnt) is set to 0, and the count of memory address changes is incremented by 1 for each RAM address change. When the count of memory address changes equals W / 16 + 1, the current RAM address is used as the interval address for the next 8 rows of data, and so on.

[0174] When using the block-to-line algorithm, at the beginning of the nth 8-line data, the number of changes in the storage address is set to 0. Every time the RAM address changes once, the count of changes in the storage address is incremented by 1. When the number of changes in the storage address is 8+1, the current RAM address is used as the interval address for the next 8 lines of data, and so on.

[0175] Therefore, this embodiment of the application utilizes a block-to-line module to obtain denoised image line data, and then obtains denoised first image data based on multiple denoised image line data, thereby realizing the method of denoising by using block data and reducing the computational load of denoising calculation.

[0176] Exemplary device

[0177] Figure 9 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application. For example... Figure 9 As shown, the data processing device 900 includes: a first acquisition module 901, a second acquisition module 902, a noise reduction processing module 903, and a third acquisition module 904.

[0178] The first acquisition module 901 is used to acquire a first block of data from the first image data and a second block of data from the second image data, wherein the second image data is the denoised image of the previous frame of the first image data, and the second block of data is the block of data at the same position as the first block of data; the second acquisition module 902 is used to process the second block of data and the first block of data to obtain a denoising coefficient, wherein the denoising coefficient is used to denoise the first block of data; the denoising processing module 903 is used to denoise the first block of data using the denoising coefficient to obtain a third block of data, wherein the third block of data is the denoised first data; the third acquisition module 904 is used to perform block-to-line calculation on the third block of data to generate the denoised first image data.

[0179] This application provides a data processing apparatus that acquires a first block of data and a second block of data from two adjacent frames of image data, processes the first and second blocks of data to obtain noise reduction coefficients, and then uses the noise reduction coefficients to perform noise reduction processing on the first block of data to obtain the noise-reduced first block of data (i.e., the third block of data). This allows the noise reduction calculation process to be performed on a block-by-block basis, reducing the computational load and improving the efficiency of the noise reduction process. Furthermore, this application is applied to a chip, eliminating the need to access external memory during the noise reduction calculation process, thus avoiding the high power consumption problem caused by accessing external memory.

[0180] According to one embodiment of this application, the chip includes a noise reduction calculation module, and a second acquisition module 902 is used to input a second block of data and a first block of data into the noise reduction calculation module for data processing to obtain a noise reduction coefficient.

[0181] According to one embodiment of this application, the second acquisition module 902 is used to calculate the deviation between the first block of data and the second block of data to obtain the first pixel deviation of the first block of data; if the first block of data does not meet the preset conditions, the first pixel deviation is adjusted to obtain the second pixel deviation; and the noise reduction coefficient is obtained based on the second pixel deviation and the preset linear function.

[0182] According to an embodiment of this application, the first data block includes first chroma block data and first luminance block data, the first luminance block data includes sub-luminance block data, and the second data block includes second chroma block data and second luminance block data. The second acquisition module 902 is used to obtain a chroma deviation based on the first chroma mean of the first chroma block data and the second chroma mean of the second chroma block data; to calculate the deviation between the first luminance block data and the second luminance block data to obtain a first luminance deviation corresponding to the sub-luminance block data; to obtain an edge deviation based on the grayscale value of the first luminance block data and the sub-luminance average value of the sub-luminance block data; and to obtain a first pixel deviation by weighting the chroma deviation, the first luminance deviation, and the edge deviation.

[0183] According to one embodiment of this application, the second acquisition module 902 is used to subtract the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain a second brightness deviation; calculate the mean of the second brightness deviation to obtain a mean brightness deviation; smooth the mean brightness deviation based on the first block data and adjacent block data to obtain a smoothed mean brightness deviation, wherein the adjacent block data are the block data adjacent to the position of the first block data; and perform a weighted average of the smoothed mean brightness deviation and the third brightness deviation located in the sub-brightness block data to obtain a first brightness deviation, wherein the second brightness deviation includes the third brightness deviation.

[0184] According to one embodiment of this application, the second acquisition module 902 is used to multiply the first pixel deviation by a preset multiple to obtain the third pixel deviation when the average brightness deviation after smoothing is less than the motion detection threshold; to add a preset value to the third pixel deviation to obtain the fourth pixel deviation when the average brightness deviation is greater than the overexposure threshold; to determine the number of moving third pixels by traversing each third pixel in the first block of data when the motion state of the first block of data meets the preset conditions, wherein the motion state is determined based on the adjacent blocks of data and the second block of data; and to adjust the fourth pixel deviation to the second pixel deviation when the number of moving third pixels located in the sub-brightness block of data is greater than the quantity threshold.

[0185] According to one embodiment of this application, the adjacent block data includes first adjacent block data and second adjacent block data. The second acquisition module 902 is used to acquire the first motion indication value of the first adjacent block data, the second motion indication value of the second adjacent block data, and the third motion indication value of the second block data that are stored in advance. If the sum of the first motion indication value, the second motion indication value, and twice the third motion indication value is greater than the first motion threshold, the fourth pixel deviation of the third pixel in the first block data is traversed. If the fourth pixel deviation of the third pixel is greater than the second motion threshold, the third pixel is taken as the moving third pixel.

[0186] According to one embodiment of this application, the chip includes a line-to-block module, a memory, a loop controller, and a decompression module. The memory is used to store data required for noise reduction processing. The first acquisition module 901 is used to input multiple image line data of the first image data into the line-to-block module, store each line data in the multiple image line data, and acquire the first block of data when the number of multiple image line data meets a preset threshold. Based on the first block of data, the loop controller acquires the compressed second block of data from the memory. The compressed second block of data is input into the decompression module and decompressed by a lossy decompression algorithm to obtain the second block of data.

[0187] According to one embodiment of this application, the first acquisition module 901 is used to acquire the storage address of each row of data. The storage address is determined based on the previous storage address and the interval address. The previous storage address is the interval address when the number of changes in the storage address and the number of pixels in the horizontal direction of the first image data meet preset conditions. Each row of data is stored according to the storage address.

[0188] According to one embodiment of this application, the chip further includes a compression module. The noise reduction processing module 903 is used to input the third block of data into the compression module and compress it through a lossy compression algorithm to obtain the compressed third block of data; input the compressed third block of data into the loop controller; the loop controller inputs the compressed third block of data into the memory for storage; and uses the compressed third block of data as the compressed second block of data used for noise reduction of the next frame image.

[0189] According to one embodiment of this application, the chip includes a block-to-line conversion module and a memory. The third acquisition module 904 is used to input a third block of data into the block-to-line conversion module and to input the third block of data into the memory for storage, so as to acquire the denoised image line data including the third block of data from the memory; and to acquire the denoised first image data based on the multiple denoised image line data.

[0190] It should be understood that the specific working process and functions of the first acquisition module 901, the second acquisition module 902, the noise reduction processing module 903, and the third acquisition module 904 in the above embodiments can be referred to the above. Figures 2 to 8 The description of the data processing method provided in the embodiments will not be repeated here to avoid repetition.

[0191] It should be noted that in the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0192] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications or equivalent substitutions made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data processing method, characterized in that, Applied to a chip, the method includes: Acquire a first block of data from the first image data and a second block of data from the second image data, wherein the second image data is the denoised image of the previous frame of the first image data, and the second data is the block data at the same position as the first block of data; The second block of data and the first block of data are processed to obtain a noise reduction coefficient, wherein the noise reduction coefficient is used to reduce the noise of the first block of data; The first block of data is denoised using the denoising coefficient to obtain a third block of data, wherein the third block of data is the denoised first block of data. The third block of data is processed by block-to-line conversion to generate the first image data after noise reduction. The noise reduction coefficient is obtained based on a first pixel deviation, which is obtained based on a chromaticity deviation and a first luminance deviation. The chromaticity deviation is obtained based on the first chromaticity mean of the first data block and the second chromaticity mean of the second data block. The first data block includes first luminance block data, which includes sub-luminance block data. The second data block includes second luminance block data. The first luminance deviation is obtained based on the following method: Subtract the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation; The average value of the second brightness deviation is calculated to obtain the average brightness deviation. The average brightness deviation is smoothed based on the first block of data and the adjacent block of data to obtain the smoothed average brightness deviation, wherein the adjacent block of data is the block of data that is adjacent to the position of the first block of data. The first brightness deviation is obtained by weighting the smoothed average brightness deviation with the third brightness deviation located in the sub-brightness block data, wherein the second brightness deviation includes the third brightness deviation.

2. The method according to claim 1, characterized in that, The chip includes a noise reduction calculation module. The step of processing the second block of data and the first block of data to obtain the noise reduction coefficient includes: The second block of data and the first block of data are input into the noise reduction calculation module for data processing to obtain the noise reduction coefficient.

3. The method according to claim 2, characterized in that, The step of inputting the second block of data and the first block of data into the noise reduction calculation module for data processing to obtain the noise reduction coefficient includes: The first block of data and the second block of data are used to calculate the deviation, and the first pixel deviation of the first block of data is obtained. If the first block of data does not meet the preset conditions, the first pixel deviation is adjusted to obtain the second pixel deviation; The noise reduction coefficient is obtained based on the second pixel deviation and a preset linear function.

4. The method according to claim 3, characterized in that, The first data block also includes a first chroma block data, and the second data block also includes a second chroma block data. The step of calculating the deviation between the first block of data and the second block of data to obtain the first pixel deviation of the first block of data includes: The chromaticity deviation is obtained based on the first chromaticity mean of the first chromaticity block data and the second chromaticity mean of the second chromaticity block data; The deviation between the first brightness block data and the second brightness block data is calculated to obtain the first brightness deviation corresponding to the sub-brightness block data; The edge deviation is obtained based on the grayscale value of the first brightness block data and the average brightness value of the sub-brightness block data. The first pixel deviation is obtained by weighting the chromaticity deviation, the first luminance deviation, and the edge deviation.

5. The method according to claim 3, characterized in that, The step of adjusting the first pixel deviation to obtain the second pixel deviation when the first block of data does not meet the preset conditions includes: If the average value of the smoothed brightness deviation is less than the motion detection threshold, the first pixel deviation is multiplied by a preset factor to obtain the third pixel deviation; If the average brightness deviation is greater than the overexposure threshold, the third pixel deviation is added to a preset value to obtain the fourth pixel deviation; If the motion state of the first block of data meets the preset conditions, the number of moving third pixels is determined by traversing each third pixel in the first block of data, wherein the motion state is determined based on the adjacent blocks of data and the second block of data; If the number of moving third pixels located within the sub-luminance block data is greater than a quantity threshold, the fourth pixel deviation is adjusted to the second pixel deviation.

6. The method according to claim 5, characterized in that, The adjacent block data includes first adjacent block data and second adjacent block data. The method of determining the number of moving third pixels by traversing each third pixel in the first block of data when the motion state of the first block of data meets preset conditions includes: Obtain the first motion indication value of the first adjacent block data, the second motion indication value of the second adjacent block data, and the third motion indication value of the second block data that are pre-stored; If the sum of the first motion indicator value, the second motion indicator value, and twice the third motion indicator value is greater than the first motion threshold, the fourth pixel deviation of the third pixel in the first block of data is traversed. If the fourth pixel deviation of the third pixel is greater than the second motion threshold, the third pixel is taken as the third pixel of the motion.

7. The method according to claim 1, characterized in that, The chip includes a line-to-block module, a memory, a loop controller, and a decompression module. The memory is used to store the data required for the noise reduction process. The acquisition of the first block of data of the first image data and the second block of data of the second image data includes: The first image data is input into the row-to-block module, each row of the first image data is stored, and the first block of data is obtained when the number of the first image data meets a preset threshold. Based on the first block of data, the loop controller retrieves the compressed second block of data from the memory; The compressed second block of data is input into the decompression module and decompressed using a lossy decompression algorithm to obtain the second block of data.

8. The method according to claim 7, characterized in that, The storage of each row of data in the plurality of image rows includes: Obtain the storage address of each row of data. The storage address is determined based on the previous storage address and the interval address. The previous storage address is the interval address when the number of changes in the storage address and the number of pixels in the horizontal direction of the first image data meet a preset condition. Each row of data is stored according to the storage address.

9. The method according to claim 7, characterized in that, The chip also includes a compression module. The process, after performing noise reduction processing on the first block of data using the noise reduction coefficient to obtain the third block of data, further includes: The third block of data is input into the compression module and compressed using a lossy compression algorithm to obtain the compressed third block of data. The compressed third data block is input into the loop controller, which then stores the compressed third data block in the memory and uses it as the compressed second data block for noise reduction of the next frame image.

10. The method according to claim 1, characterized in that, The chip includes a block conversion module and a memory. The step of performing block-to-line calculation on the third block of data to generate the first image data after noise reduction includes: The third block of data is input into the block conversion module and then into the memory for storage, so as to obtain the noise-reduced image line data including the third block of data from the memory; The first image data after noise reduction is obtained based on multiple rows of noise-reduced image data.

11. A data processing system, characterized in that, Applied to chips, the system includes a line-to-block conversion module, a noise reduction calculation module, a block-to-line conversion module, a decompression module, a compression module, a memory, and a loop controller. The line-to-block module is used to acquire the first block of data of the first image data; The decompression module is used to decompress the compressed second block of data to obtain the second block of the second image data, wherein the second image data is the image after noise reduction of the previous frame of the first image data, and the second data is the block data at the same position as the first block of data; The noise reduction calculation module is used to process the second block of data and the first block of data to obtain a noise reduction coefficient, wherein the noise reduction coefficient is used to reduce the noise of the first block of data; and to use the noise reduction coefficient to perform noise reduction processing on the first block of data to obtain a third block of data, wherein the third block of data is the first block of data after noise reduction. The block-to-line conversion module is used to perform block-to-line conversion calculation on the third block of data to generate the first image data after noise reduction; The compression module is used to compress the third block of data using a lossy compression algorithm to obtain the compressed third block of data. The loop controller is used to store the compressed third block of data in the memory, and to retrieve the compressed third block of data from the memory and use it as the compressed second block of data when performing noise reduction on the next frame of the image; The noise reduction coefficient is obtained based on a first pixel deviation, which is obtained based on a chromaticity deviation and a first luminance deviation. The chromaticity deviation is obtained based on the first chromaticity mean of the first data block and the second chromaticity mean of the second data block. The first data block includes first luminance block data, which includes sub-luminance block data. The second data block includes second luminance block data. The first luminance deviation is obtained based on the following method: Subtract the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation; The average value of the second brightness deviation is calculated to obtain the average brightness deviation. The average brightness deviation is smoothed based on the first block of data and the adjacent block of data to obtain the smoothed average brightness deviation, wherein the adjacent block of data is the block of data that is adjacent to the position of the first block of data. The first brightness deviation is obtained by weighting the smoothed average brightness deviation with the third brightness deviation located in the sub-brightness block data, wherein the second brightness deviation includes the third brightness deviation.

12. A data processing apparatus, characterized in that, include: The first acquisition module is used to acquire a first block of data of the first image data and a second block of data of the second image data, wherein the second image data is the image after noise reduction of the previous frame of the first image data, and the second data is the block data at the same position as the first block of data; The second acquisition module is used to process the second block of data and the first block of data to obtain a noise reduction coefficient, wherein the noise reduction coefficient is used to reduce the noise of the first block of data. The noise reduction processing module is used to perform noise reduction processing on the first block of data using the noise reduction coefficient to obtain a third block of data, wherein the third block of data is the first block of data after noise reduction. The third acquisition module is used to perform block-to-line calculation on the third block of data to generate the first image data after noise reduction. The noise reduction coefficient is obtained based on a first pixel deviation, which is obtained based on a chromaticity deviation and a first luminance deviation. The chromaticity deviation is obtained based on the first chromaticity mean of the first data block and the second chromaticity mean of the second data block. The first data block includes first luminance block data, which includes sub-luminance block data. The second data block includes second luminance block data. The first luminance deviation is obtained based on the following method: Subtract the first brightness value of each first pixel in the first brightness block data from the second brightness value of each second pixel in the second brightness block data to obtain the second brightness deviation; The average value of the second brightness deviation is calculated to obtain the average brightness deviation. The average brightness deviation is smoothed based on the first block of data and the adjacent block of data to obtain the smoothed average brightness deviation, wherein the adjacent block of data is the block of data that is adjacent to the position of the first block of data. The first brightness deviation is obtained by weighting the smoothed average brightness deviation with the third brightness deviation located in the sub-brightness block data, wherein the second brightness deviation includes the third brightness deviation.

Citation Information

Patent Citations

  • Method and device for reducing noise between frames

    CN101197934A

  • Image noise reduction method and computer readable storage medium

    CN110443760A

  • Image noise reduction processing method, device and equipment and computer readable medium

    CN115797203A