Image blurring processing method and device, electronic equipment, chip and medium
By blurring only the first pixel in the image and updating the pixel value of the second pixel, the problems of high computational cost and jagged edges in the existing technology are solved, achieving efficient image blurring and optimized visual experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING X RING TECHNOLOGY CO LTD
- Filing Date
- 2025-08-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing image blurring methods are computationally intensive, have low processing efficiency, and are prone to jagged edges, affecting the visual experience.
The image is blurred only on the first pixel, and the pixel value of the second pixel is updated using the blurred pixel value of the first pixel. This avoids blurring the second pixel directly and instead blurs the image at its original resolution.
It greatly reduces the computational load of blur processing, improves processing efficiency, avoids jagged edges, and optimizes the visual experience.
Smart Images

Figure CN120725859B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image blurring method, apparatus, electronic device, chip, and storage medium. Background Technology
[0002] Currently, image blurring is widely used in scenarios such as driving, live streaming, smart homes, and film and television production to optimize the visual experience. However, current image blurring methods suffer from high computational cost and low processing efficiency. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, chip, and storage medium for image blurring, to at least solve the problems of high computational load and low processing efficiency in related image blurring methods. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, an image blurring method is provided, comprising: acquiring an original image, the original image including a first pixel and a second pixel; blurring the first pixel to obtain a blurred pixel value of the first pixel; updating the pixel value of the second pixel based on the blurred pixel value of the first pixel; and obtaining a target image of the original image after blurring based on the blurred pixel value of the first pixel and the updated pixel value of the second pixel.
[0005] According to a second aspect of the present disclosure, an image blurring device is provided, comprising: an acquisition module configured to acquire an original image, the original image including a first pixel and a second pixel; a first processing module configured to blur the first pixel to obtain a blurred pixel value of the first pixel; an update module configured to update the pixel value of the second pixel based on the blurred pixel value of the first pixel; and a second processing module configured to obtain a blurred target image of the original image based on the blurred pixel value of the first pixel and the updated pixel value of the second pixel.
[0006] According to a third aspect of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the steps of the image blurring method described in the first aspect of the present disclosure.
[0007] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the image blurring method described in the first aspect of the present disclosure.
[0008] According to a fifth aspect of the present disclosure, a chip is provided, the chip including an interface circuit and a processing circuit coupled to each other, the interface circuit being used to input or output signals, and the processing circuit being configured to implement the steps of the image blurring method described in the first aspect of the present disclosure.
[0009] According to a sixth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the image blurring method described in the first aspect of the present disclosure.
[0010] The technical solution provided by the embodiments of this disclosure brings at least the following beneficial effects: An original image is acquired, including a first pixel and a second pixel; the first pixel is blurred to obtain a blurred pixel value; the pixel value of the second pixel is updated based on the blurred pixel value; and a target image after blurring the original image is obtained based on the blurred pixel value of the first pixel and the updated pixel value of the second pixel. Therefore, only the first pixel needs to be blurred, and the pixel value of the second pixel is updated based on the blurred pixel value of the first pixel. That is, there is no need to blur the second pixel itself. For example, there is no need to use a logically complex blurring algorithm to blur the second pixel. The effect of blurring the second pixel can be indirectly achieved based on the blurred pixel value of the first pixel, which can greatly reduce the computational load of blurring processing and improve the efficiency of blurring processing.
[0011] In addition, this disclosure does not require downsampling of the image, and can directly blur the image at the original resolution, avoiding the jagged edges of the blurred image and optimizing the visual experience.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0014] Figure 1 This is a schematic flowchart illustrating an image blurring method according to an exemplary embodiment.
[0015] Figure 2 This is a flowchart illustrating an image blurring method according to another exemplary embodiment.
[0016] Figure 3 This is a flowchart illustrating an image blurring method according to another exemplary embodiment.
[0017] Figure 4 This is a schematic diagram illustrating an image blurring method according to an exemplary embodiment.
[0018] Figure 5 This is a schematic diagram illustrating the structure of an image blurring device according to an exemplary embodiment.
[0019] Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment.
[0020] Figure 7 This is a schematic diagram of the structure of a chip according to an exemplary embodiment. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0022] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this disclosure.
[0023] The following description, with reference to the accompanying drawings, describes an image blurring method, apparatus, electronic device, chip, and storage medium according to embodiments of the present disclosure.
[0024] Figure 1 This is a flowchart illustrating an image blurring method according to an exemplary embodiment, such as... Figure 1 As shown, the image blurring method of this disclosure includes the following steps.
[0025] S101, Obtain the original image, which includes the first pixel and the second pixel.
[0026] It should be noted that the image blurring method in this embodiment is executed by an electronic device, such as a terminal device, vehicle, camera, server, chip, etc. The terminal device may include a mobile phone, wearable device (such as a smartwatch, smart glasses), laptop computer, etc. The vehicle may include an in-vehicle terminal, in-vehicle controller, etc. The chip may include an ISP (Image Signal Processor), etc.
[0027] The image blurring method of this disclosure embodiment can be executed by the image blurring device of this disclosure embodiment. The image blurring device of this disclosure embodiment can be configured in any electronic device to execute the image blurring method of this disclosure embodiment.
[0028] There are no strict limitations on the original images. For example, in an image editing scenario, the original image can include images captured by the terminal device, such as facial images, landscape images, and building images. In a driving scenario, the original image can include images of the vehicle's external environment (such as images of the road in front of the vehicle), images of the vehicle's interior (such as images of the driver's area), and road surveillance images. In a live streaming scenario, the original image can include at least one frame from the live video. In a smart home scenario, the original image can include at least one frame from home surveillance video.
[0029] The original image may include RGB, HSV, HSL, YCbCr, Lab, YUV images, etc.
[0030] The number of first pixels and second pixels is at least one, and there are no strict restrictions on the relationship between the number of first pixels and the number of second pixels. For example, the number of first pixels and the number of second pixels can be the same.
[0031] There are no restrictions on the distribution of the first and second pixels in the original image, such as continuous distribution, non-continuous distribution, uniform distribution, etc.
[0032] Optionally, at least one neighboring pixel of the second pixel is the first pixel. A neighboring pixel refers to the pixels surrounding a given pixel. There are no strict limitations on the neighboring pixels; for example, it can include 4-neighborhood, 8-neighborhood, circular neighborhood, rectangular neighborhood, etc.
[0033] The 4-neighborhood refers to the four directly adjacent pixels above, below, left, and right of a given pixel. For example, the 4-neighborhood pixels of the pixel in row x and column y include the pixels in row x and column (y-1), row x and column (y+1), row (x-1) and column y, and row (x+1) and column y.
[0034] The 8-neighborhood refers to the eight pixels above, below, left, right, and diagonally adjacent to a given pixel. For example, the 8-neighborhood pixels of the pixel in row x and column y include the pixels in row x and column (y-1), row x and column (y+1), row (x-1) and column y, row (x+1) and column (y-1), row (x-1) and column (y+1), row (x+1) and column (y+1).
[0035] A circular neighborhood refers to all pixels within a circular area centered on a given pixel.
[0036] A rectangular neighborhood refers to all pixels within a rectangular area centered on a given pixel.
[0037] The original image may include only two types of pixels: the first pixel and the second pixel. Alternatively, in addition to the first pixel and the second pixel, the original image may also include other pixels. No further restrictions are imposed here.
[0038] Optionally, the method further includes acquiring or receiving the original image. Thus, the original image can be acquired or received.
[0039] Optionally, before acquiring the original image, a shooting command is also obtained. Thus, the original image can be acquired upon obtaining the shooting command. For example, taking a terminal device as the executing entity, the terminal device is equipped with a camera, and the terminal device can acquire the original image through the camera in response to the shooting command.
[0040] Optionally, receiving the original image includes receiving the original image sent by the terminal device. For example, taking a server as the executing entity, the server can receive the original image sent by the terminal device.
[0041] S102, blur the first pixel to obtain the blurred pixel value of the first pixel.
[0042] It should be noted that blurring of the first pixel can be achieved using any image blurring algorithm in the relevant technologies, including Gaussian blur, mean blur, median filtering, bilateral filtering, etc.
[0043] S103, based on the pixel value of the first pixel after blurring, update the pixel value of the second pixel.
[0044] S104: Based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel, the target image after blurring the original image is obtained.
[0045] Currently, image blurring is widely used in scenarios such as driving, live streaming, smart homes, and film and television production to optimize the visual experience. However, current image blurring methods suffer from high computational cost and low processing efficiency.
[0046] For example, to reduce the computational cost of Gaussian blur, especially for images with high resolution, the image is often downsampled first, then Gaussian blurred, and finally upsampled to restore the original resolution. However, this method often results in jagged edges and other artifacts, leading to a poor visual experience. Specifically, jagged edges refer to the discontinuity, stair-like appearance, or roughness of lines or color transitions at edges or in details.
[0047] In this disclosure, only the first pixel needs to be blurred, and the pixel value of the second pixel is updated based on the blurred pixel value of the first pixel. That is, there is no need to blur the second pixel. For example, there is no need to use a logically complex blurring algorithm to blur the second pixel. The effect of blurring the second pixel can be indirectly achieved based on the blurred pixel value of the first pixel. This can greatly reduce the amount of calculation for blurring and improve the efficiency of blurring.
[0048] In addition, this disclosure does not require downsampling of the image, and can directly blur the image at the original resolution, avoiding the jagged edges of the blurred image and optimizing the visual experience.
[0049] Optionally, the pixel value of the second pixel is updated based on the pixel value of the first pixel after blurring, including determining the reference pixel corresponding to the second pixel from each of the first pixels, and updating the pixel value of the second pixel based on the pixel value of each reference pixel after blurring.
[0050] It is understandable that different second pixels may correspond to different reference pixels, and the number of reference pixels corresponding to a second pixel is at least one.
[0051] Optionally, determining a reference pixel point corresponding to the second pixel point from each of the first pixels includes determining a first pixel point located in the same row as the second pixel point from each of the first pixels point as a reference pixel point, and / or determining a first pixel point located in the same column as the second pixel point from each of the first pixels point as a reference pixel point.
[0052] The details of updating the pixel value of the second pixel based on the blurred pixel values of each reference pixel can be found in the following embodiments, and will not be repeated here.
[0053] Understandably, due to the real-time changing nature of internet bandwidth, especially in low-bitrate scenarios, encoded videos are prone to problems. To improve video encoding quality, most methods first blur each frame of the video, then encode these blurred frames to obtain the encoded video.
[0054] Optionally, the method further includes acquiring the original video to be encoded and using each frame of the original video as the original image.
[0055] After obtaining the target image after blurring the original image, the process also includes generating a target video after blurring the original video based on the target images after blurring each frame of the original video, encoding the target video to obtain an encoded video, storing the encoded video in local storage space, or sending the encoded video to a display device for visualization display.
[0056] Therefore, the image blurring method provided in this disclosure can be applied to video coding scenarios, which can greatly reduce the computational load of video coding and improve video coding efficiency.
[0057] It should be noted that this disclosure does not impose any restrictions on the execution sequence of steps S101 to S104. Figure 1 The example is performed by executing steps S101 to S104 in sequence only.
[0058] The image blurring method provided in the embodiments of this disclosure obtains an original image, which includes a first pixel and a second pixel. The first pixel is blurred to obtain a blurred pixel value. Based on the blurred pixel value of the first pixel, the pixel value of the second pixel is updated. Based on the blurred pixel value of the first pixel and the updated pixel value of the second pixel, a target image after blurring the original image is obtained. Therefore, only the first pixel needs to be blurred, and the pixel value of the second pixel is updated based on the blurred pixel value of the first pixel. That is, there is no need to blur the second pixel itself. For example, there is no need to use a logically complex blurring algorithm to blur the second pixel. The effect of blurring the second pixel can be indirectly achieved based on the blurred pixel value of the first pixel, which can greatly reduce the computational load of blurring processing and improve the efficiency of blurring processing.
[0059] In addition, this disclosure does not require downsampling of the image, and can directly blur the image at the original resolution, avoiding the jagged edges of the blurred image and optimizing the visual experience.
[0060] Figure 2This is a flowchart illustrating an image blurring method according to another exemplary embodiment, such as... Figure 2 As shown, the image blurring method of this disclosure includes the following steps.
[0061] S201, Obtain the original image.
[0062] The details of step S201 can be found in the above embodiments and will not be repeated here.
[0063] S202, extract the first pixel from the original image according to a set interval, and take the pixels that were not extracted from the original image as the second pixel.
[0064] Optionally, the first pixel is extracted from the original image at a set interval, including extracting the first pixel from each row or column of pixels in the original image at a set interval. Thus, the first pixel can be extracted row by row or column by column from the original image.
[0065] It should be noted that there are no strict limitations on the setting interval; for example, it can be one pixel.
[0066] Optionally, the set interval is determined, including at least one of the following operations:
[0067] Operation 1: Determine the set interval based on the distribution rules of black or white areas in the checkerboard image.
[0068] It is understandable that a checkerboard image includes black and white areas, such as an image consisting of alternating black and white rectangular areas.
[0069] For example, the number of white regions A between the two closest black regions in any row of a checkerboard image can be obtained, and the interval can be set to A pixels.
[0070] For example, the number of white regions B between the two closest black regions in any column of a checkerboard image can be obtained, and the interval can be set to B pixels.
[0071] For example, the number of black regions C between the two closest white regions in any row of a checkerboard image can be obtained, and the interval can be set to C pixels.
[0072] For example, the number of black regions D between the two closest white regions in any column of a checkerboard image can be obtained, and the interval can be set to D pixels.
[0073] For example, such as Figure 4As shown, in the checkerboard image, black and white areas are alternately distributed in any row and column, and the set interval can be determined to be one pixel.
[0074] The original image includes pixels numbered 1 to 16. The first pixel can be extracted from each row of pixels in the original image, with a one-pixel interval. For example, pixels numbered 2, 4, 5, 7, 10, 12, 13, and 15 can be extracted from the original image as the first pixel, and pixels numbered 1, 3, 6, 8, 9, 11, 14, and 16 can be used as the second pixel.
[0075] Operation 2: Based on preset constraints, determine the set interval. The constraints include that at least one neighboring pixel of any pixel in the original image is extracted.
[0076] Optionally, the constraint condition includes that at least one of the four neighboring pixels of any pixel in the original image is extracted.
[0077] For example, such as Figure 4 As shown, pixels numbered 2, 4, 5, 7, 10, 12, 13, and 15 are extracted from the original image as the first pixel, and pixels numbered 1, 3, 6, 8, 9, 11, 14, and 16 are used as the second pixel.
[0078] Taking pixel number 1 as an example, the four neighboring pixels of pixel number 1 include pixels number 2 and 5, and pixels number 2 and 5 are both extracted.
[0079] Taking pixel number 3 as an example, the four neighboring pixels of pixel number 3 include pixels number 2, 4, and 7, and all pixels numbered 2, 4, and 7 are extracted.
[0080] Taking pixel number 6 as an example, the four neighboring pixels of pixel number 6 include pixels numbered 2, 5, 7, and 10. Pixels numbered 2, 5, 7, and 10 are all extracted.
[0081] S203, blur the first pixel to obtain the blurred pixel value of the first pixel.
[0082] S204, based on the pixel value of the first pixel after blurring, update the pixel value of the second pixel.
[0083] S205, based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel, the target image after blurring the original image is obtained.
[0084] The details of steps S203-S205 can be found in the above embodiments and will not be repeated here.
[0085] It should be noted that this disclosure does not impose any restrictions on the execution sequence of steps S201 to S205. Figure 2 The example only demonstrates the sequential execution of steps S201 to S205.
[0086] The image blurring method provided in the embodiments of this disclosure extracts a first pixel from the original image according to a set interval, and uses each pixel that was not extracted from the original image as a second pixel, so as to determine the first pixel and the second pixel.
[0087] Figure 3 This is a flowchart illustrating an image blurring method according to another exemplary embodiment, such as... Figure 3 As shown, the image blurring method of this disclosure includes the following steps.
[0088] S301, Obtain the original image, which includes the first pixel and the second pixel.
[0089] S302, blur the first pixel to obtain the blurred pixel value of the first pixel.
[0090] The details of steps S301-S302 can be found in the above embodiments and will not be repeated here.
[0091] S303, determine the neighboring pixels of the second pixel from each first pixel, and use them as reference pixels.
[0092] S304, based on the pixel values of each reference pixel after blurring, update the pixel value of the second pixel.
[0093] In this embodiment, the pixel values of the second pixel can be updated by taking into account the pixel values of each neighboring pixel after blurring, so that the transition between the updated pixel value of the second pixel and the pixel values of its neighboring pixels after blurring is relatively smooth, thereby indirectly achieving the effect of blurring the second pixel.
[0094] Optionally, the pixel value of the second pixel is updated based on the blurred pixel values of each reference pixel. This includes determining an i-th adjustment parameter (where i is a positive integer) based on the difference parameter between the pixel value of the i-th reference pixel before and after blurring. The pixel value of the second pixel is then updated based on these adjustment parameters. Thus, the difference parameter between the pixel values of the reference pixels before and after blurring can be considered when determining the adjustment parameters to update the pixel value of the second pixel.
[0095] Optionally, the i-th adjustment parameter is determined based on the difference parameter between the pixel value of the i-th reference pixel before blurring and the pixel value of the i-th reference pixel after blurring, including subtracting the difference parameter between the pixel values of the i-th reference pixel before blurring from the pixel value of the i-th reference pixel after blurring, as the i-th adjustment parameter.
[0096] Optionally, the pixel value of the second pixel is updated based on each adjustment parameter, including obtaining the weights of each reference pixel and updating the pixel value of the second pixel based on each adjustment parameter and the weights of each reference pixel. Thus, the pixel value of the second pixel can be updated taking into account each adjustment parameter and the weights of each reference pixel.
[0097] Understandably, weights can be set for each reference pixel, and different reference pixels may have different weights.
[0098] Optionally, the pixel value of the second pixel is updated based on each adjustment parameter and the weight of each reference pixel. This includes obtaining the product of the weight of the i-th reference pixel and the i-th adjustment parameter as the i-th product, and updating the pixel value of the second pixel based on the sum of all products. Thus, the weights of each reference pixel can be taken into account, and the adjustment parameters can be weighted and summed to update the pixel value of the second pixel.
[0099] For example, updating the pixel value of the second pixel can be achieved using the following formula:
[0100]
[0101] in, The updated pixel value for the second pixel. The pixel value before the second pixel was updated. For the first i The pixel value after blurring the reference pixel. For the first i The pixel values of the reference pixel before blurring. For the first i The weight of each reference pixel For coefficients, N The number of reference pixels.
[0102] for example, The coefficient has a value range from 0 to 1.
[0103] Optionally, the pixel value of the second pixel is updated based on each adjustment parameter, including obtaining the average value of each adjustment parameter, and obtaining the sum of the pixel value of the second pixel and the average value of each adjustment parameter as the updated pixel value of the second pixel.
[0104] S305, based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel, obtain the target image after blurring the original image.
[0105] The details of step S305 can be found in the above embodiments and will not be repeated here.
[0106] It should be noted that this disclosure does not impose any restrictions on the execution sequence of steps S301 to S305. Figure 3 The example only demonstrates the sequential execution of steps S301 to S305.
[0107] The image blurring method provided in the embodiments of this disclosure determines neighboring pixels of a second pixel from each first pixel as reference pixels, and updates the pixel value of the second pixel based on the blurred pixel values of each reference pixel. Therefore, by taking into account the blurred pixel values of each neighboring pixel, the pixel value of the second pixel is updated, resulting in a smoother transition between the updated pixel value and the blurred pixel values of its neighboring pixels, indirectly achieving the effect of blurring the second pixel.
[0108] Figure 5 This is a schematic diagram illustrating the structure of an image blurring device according to an exemplary embodiment.
[0109] Reference Figure 5 The image blurring device 500 of this disclosure includes: an acquisition module 501, a first processing module 502, an update module 503, and a second processing module 504.
[0110] The acquisition module 501 is configured to acquire an original image, the original image including a first pixel and a second pixel.
[0111] The first processing module 502 is configured to perform blur processing on the first pixel to obtain the pixel value after blur processing of the first pixel.
[0112] The update module 503 is configured to update the pixel value of the second pixel based on the pixel value after blurring the first pixel.
[0113] The second processing module 504 is configured to obtain the target image after blurring the original image based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel.
[0114] In some possible implementations, the first processing module 502 is further configured to: extract the first pixel from the original image according to a set interval, and use each pixel that was not extracted from the original image as the second pixel;
[0115] The first processing module 502 is also configured to perform at least one of the following operations:
[0116] The set interval is determined based on the distribution rules of black or white pixels in the checkerboard image;
[0117] Based on preset constraints, the set interval is determined, wherein at least one neighboring pixel of any pixel in the original image is extracted.
[0118] In some possible implementations, the first processing module 502 is further configured to extract the first pixel from each row or column of pixels in the original image according to the set interval.
[0119] In some possible implementations, the update module 503 is further configured to: determine neighboring pixels of the second pixel from each of the first pixels as reference pixels; and update the pixel value of the second pixel based on the blurred pixel value of each reference pixel.
[0120] In some possible implementations, the update module 503 is further configured to: determine an i-th adjustment parameter, where i is a positive integer, based on the difference parameter between the pixel value of the i-th reference pixel before blurring and the pixel value of the i-th reference pixel after blurring; and update the pixel value of the second pixel based on each adjustment parameter.
[0121] In some possible implementations, the update module 503 is further configured to: obtain the weight of each reference pixel; and update the pixel value of the second pixel based on each adjustment parameter and the weight of each reference pixel.
[0122] In some possible implementations, the acquisition module 501 is further configured to: acquire the original video to be encoded, and use each frame of the original video as the original image.
[0123] After obtaining the target image after blurring the original image, the second processing module 504 is further configured to: generate the target video after blurring the original video based on the target images after blurring each frame of the original video; encode the target video to obtain an encoded video; store the encoded video in local storage space, or send the encoded video to a display device for visualization display on the display device.
[0124] In some possible implementations, the acquisition module 501 is further configured to: acquire the original image; or receive the original image.
[0125] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0126] The image blurring apparatus provided in the embodiments of this disclosure acquires an original image, which includes a first pixel and a second pixel. The first pixel is blurred to obtain a blurred pixel value. Based on the blurred pixel value of the first pixel, the pixel value of the second pixel is updated. Based on the blurred pixel value of the first pixel and the updated pixel value of the second pixel, a target image after blurring the original image is obtained. Therefore, only the first pixel needs to be blurred, and the pixel value of the second pixel is updated based on the blurred pixel value of the first pixel. That is, there is no need to blur the second pixel itself. For example, there is no need to use a logically complex blurring algorithm to blur the second pixel. The effect of blurring the second pixel can be indirectly achieved based on the blurred pixel value of the first pixel, which can greatly reduce the computational load of blurring processing and improve blurring processing efficiency.
[0127] In addition, this disclosure does not require downsampling of the image, and can directly blur the image at the original resolution, avoiding the jagged edges of the blurred image and optimizing the visual experience.
[0128] To implement the above embodiments, this disclosure also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the image blurring method provided in this disclosure.
[0129] Figure 6 This is a schematic diagram illustrating the structure of an electronic device according to an exemplary embodiment. For example, the electronic device 600 may be a vehicle, mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0130] Reference Figure 6 The electronic device 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0131] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the image blurring method described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0132] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of this data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0133] Power component 606 provides power to various components of electronic device 600. Power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0134] Multimedia component 608 includes a screen that provides an output interface between electronic device 600 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When electronic device 600 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0135] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0136] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.
[0137] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 may detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0138] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra-Wideband (UWB), Bluetooth, and other technologies.
[0139] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the steps of the image blurring method described above.
[0140] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to complete the aforementioned image blurring method. For example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0141] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the steps of the image blurring method provided in this disclosure.
[0142] Alternatively, the computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0143] To implement the above embodiments, this disclosure also proposes a chip including an interface circuit and a processing circuit coupled to each other. The interface circuit is used to input or output signals, and the processing circuit is configured to implement the steps of the image blurring method provided in this disclosure.
[0144] Figure 7 This is a schematic diagram illustrating the structure of a chip according to an exemplary embodiment. See also... Figure 7 The diagram shown is a schematic representation of the structure of chip 700, but is not limited thereto.
[0145] Chip 700 includes processing circuit 701, which is configured to perform the steps of the blurring method for any of the above images.
[0146] In some embodiments, chip 700 further includes one or more interface circuits 702. Optionally, interface circuit 702 is connected to memory 703, and interface circuit 702 can be used to receive signals from memory 703 or other devices, and interface circuit 702 can be used to send signals to memory 703 or other devices. For example, interface circuit 702 can read instructions stored in memory 703 and send the instructions to processing circuit 701.
[0147] In some embodiments, the interface circuit 702 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 701 performs other steps.
[0148] In some embodiments, the terms interface circuit, interface, transceiver pin, transceiver, etc., can be used interchangeably.
[0149] In some embodiments, chip 700 further includes one or more memories 703 for storing instructions. Optionally, all or part of the memories 703 may be located outside of chip 700.
[0150] To implement the above embodiments, this disclosure also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the image blurring method provided in this disclosure.
[0151] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only.
[0152] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for blurring an image, characterized in that, include: Acquire the original image, which includes a first pixel and a second pixel; The first pixel is blurred to obtain the blurred pixel value of the first pixel. The pixel value of the second pixel is updated based on the difference parameter between the pixel values before and after the blurring of the first pixel. Based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel, the target image after blurring the original image is obtained. The first pixel is extracted from the original image at a set interval, and each pixel that is not extracted from the original image is used as the second pixel. Determining the set interval includes at least one of the following operations: The set interval is determined based on the distribution rules of black or white areas in the checkerboard image; Based on preset constraints, the set interval is determined, wherein at least one neighboring pixel of any pixel in the original image is extracted. The step of extracting the first pixel from the original image according to a set interval includes: The first pixel is extracted from each row or column of pixels in the original image according to the set interval.
2. The method according to claim 1, characterized in that, The step of updating the pixel value of the second pixel based on the blurred pixel value of the first pixel includes: Determine the neighboring pixels of the second pixel from each first pixel, and use them as reference pixels; The pixel value of the second pixel is updated based on the pixel values of each reference pixel after blurring.
3. The method according to claim 2, characterized in that, The step of updating the pixel value of the second pixel based on the blurred pixel values of each reference pixel includes: Based on the difference parameter between the pixel value of the i-th reference pixel before blurring and the pixel value of the i-th reference pixel after blurring, the i-th adjustment parameter is determined, where i is a positive integer; The pixel value of the second pixel is updated based on the adjustment parameters.
4. The method according to claim 3, characterized in that, The step of updating the pixel value of the second pixel based on each adjustment parameter includes: Obtain the weights of each reference pixel; The pixel value of the second pixel is updated based on the adjustment parameters and the weights of each reference pixel.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the original video to be encoded, and use each frame of the original video as the original image; After obtaining the target image after blurring the original image, the process further includes: Based on the target image after blurring each frame of the original video, generate the target video after blurring the original video. The target video is encoded to obtain an encoded video; The encoded video can be stored in local storage space, or the encoded video can be sent to a display device for visualization display.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: Acquire the original image; or, Receive the original image.
7. An image blurring processing device, characterized in that, include: The acquisition module is configured to acquire an original image, the original image including a first pixel and a second pixel. The first processing module is configured to perform blur processing on the first pixel to obtain the pixel value after blur processing of the first pixel. The update module is configured to update the pixel value of the second pixel based on the difference parameter between the pixel values before and after the blurring of the first pixel. The second processing module is configured to obtain the target image after blurring the original image based on the pixel value after blurring the first pixel and the updated pixel value of the second pixel. The first processing module is further configured to: The first pixel is extracted from each row or column of pixels in the original image according to the set interval. The first processing module is further configured to: The first pixel is extracted from the original image at a set interval, and each pixel that is not extracted from the original image is used as the second pixel. The first processing module is also configured to perform at least one of the following operations: The set interval is determined based on the distribution rules of black or white areas in the checkerboard image; Based on preset constraints, the set interval is determined, wherein at least one neighboring pixel of any pixel in the original image is extracted.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1-6.
10. A chip, characterized in that, The chip includes an interface circuit and a processing circuit coupled to each other. The interface circuit is used to input or output signals, and the processing circuit is configured to implement the steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Image generation method and device and storage medium
CN120020859A
Video processing method and apparatus, electronic device, and computer-readable storage medium
WO2020097888A1