Image processing method, terminal, chip and storage medium

CN117173004BActive Publication Date: 2026-09-11GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210585820.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2026-09-11
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

然而格式转换会导致图像丢失细节信息,从而导致图像的虚化效果不好

Benefits of technology

[0048]本申请实施例提供了一种图像的虚化处理方案,第一图像中的像素点的第一深度数据是针对原始图像数据格式的第一图像确定的,保留了更多的细节信息,因此第一深度数据较为准确,而第二深度数据是针对由第一图像进行格式转换得到的第三图像确定的,通过结合第一深度数据,对第三图像中的像素点的第二深度数据进行修正,使得修正后的深度数据较为准确,进而根据修正后的深度数据进行虚化处理得到的第一目标图像的虚化效果较好,可见该方案改善了图像的虚化效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173004B_ABST
    Figure CN117173004B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method, a terminal, a chip and a storage medium, and belongs to the technical field of image processing. The method comprises the following steps: receiving a first image, a second image and first depth data of a pixel point in the first image, the first image and the second image being collected by a first image sensor and a second image sensor at different positions at the same time, and the first image and the second image being in an original image data format; performing format conversion on the first image to obtain a third image, and performing format conversion on the second image to obtain a fourth image; determining second depth data of the pixel point in the third image based on the third image and the fourth image; correcting the second depth data of the pixel point in the third image based on the first depth data of the pixel point in the first image; and performing a blurring process on the third image based on the corrected depth data of the pixel point to obtain a first target image. The method improves the blurring effect of the image.
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, and in particular to an image processing method, terminal, chip, and storage medium. Background Technology

[0002] As users demand higher image quality, many devices offer image blurring functionality. By blurring the captured image, the image becomes clearer and more layered, with a distinct sense of depth.

[0003] In related technologies, the terminal includes an application processing chip, which converts the format of the acquired image and then applies a blurring effect to the converted image. However, format conversion can cause the image to lose detail information, resulting in poor blurring effects. Therefore, improving the blurring effect of the image has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides an image processing method, terminal, chip, and storage medium to improve the bokeh effect of images. The technical solution is as follows:

[0005] According to a first aspect of the embodiments of this application, an image processing method is provided, the method comprising:

[0006] Receive a first image, a second image, and first depth data of pixels in the first image. The first image and the second image are acquired at the same time by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format.

[0007] The first image is converted to a different format to obtain the third image, and the second image is converted to a different format to obtain the fourth image.

[0008] Based on the third image and the fourth image, determine the second depth data of the pixels in the third image;

[0009] Based on the first depth data of the pixels in the first image, the second depth data of the pixels in the third image is corrected;

[0010] Based on the depth data after pixel correction, the third image is blurred to obtain the first target image.

[0011] According to a second aspect of the embodiments of this application, an image processing method is provided, the method comprising:

[0012] In response to an image capture request, a first image and a second image are acquired. The first image and the second image are acquired at the same time by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format.

[0013] Based on the first image and the second image, determine the first depth data of the pixels in the first image;

[0014] Send the first image, the second image, and the first depth data of the pixels in the first image.

[0015] According to a third aspect of the embodiments of this application, an image processing method is provided, the method comprising:

[0016] The system receives a first image, a second image, and an eighth image. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The eighth image is an image obtained by the image processing chip after blurring the first image. The first image and the second image are in the original image data format.

[0017] The first image is converted to a different format to obtain the third image, and the second image is converted to a different format to obtain the fourth image.

[0018] Based on the third image and the fourth image, determine the second depth data of the pixels in the third image;

[0019] Based on the second depth data of the pixels in the third image, the third image is blurred to obtain the ninth image;

[0020] The pixels in the ninth image that do not meet the target quality conditions are replaced with the corresponding pixels in the eighth image to obtain the first target image.

[0021] According to a fourth aspect of the embodiments of this application, an image processing method is provided, the method comprising:

[0022] Acquire a first image and a second image, which are acquired simultaneously by a first image sensor and a second image sensor located at different positions, and the first image and the second image are in the original image data format;

[0023] Based on the first image and the second image, determine the first depth data of the pixels in the first image;

[0024] Based on the first depth data of the pixels in the first image, the first image is blurred to obtain the eighth image;

[0025] Send the first image, the second image, and the eighth image.

[0026] According to a fifth aspect of the embodiments of this application, an image processing method is provided, executed by a terminal, the terminal including an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions, the first image sensor, the second image sensor, and the application processing chip being communicatively connected to the image processing chip, the method comprising:

[0027] A first image and a second image are acquired simultaneously by the first image sensor and the second image sensor, respectively, and the first image and the second image are in the original image data format;

[0028] In response to an image capture request, the image processing chip acquires the first image and the second image, determines the first depth data of the pixels in the first image based on the first image and sends the first image, the second image and the first depth data of the pixels in the first image to the application processing chip.

[0029] The application processing chip receives the first image, the second image, and the first depth data of the pixels in the first image. It performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image. Based on the third image and the fourth image, it determines the second depth data of the pixels in the third image. Based on the first depth data of the pixels in the first image, it corrects the second depth data of the pixels in the third image. Based on the corrected depth data of the pixels, it performs blurring processing on the third image to obtain the first target image.

[0030] According to a sixth aspect of the embodiments of this application, an image processing method is provided, executed by a terminal, the terminal including an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions, the first image sensor, the second image sensor, and the application processing chip being communicatively connected to the image processing chip, the method comprising:

[0031] A first image and a second image are acquired simultaneously by the first image sensor and the second image sensor, respectively, and the first image and the second image are in the original image data format;

[0032] In response to an image capture request, the image processing chip acquires the first image and the second image, determines the first depth data of the pixels in the first image based on the first image and the second image, performs a blurring process on the first image based on the first depth data of the pixels in the first image to obtain an eighth image, and sends the first image, the second image and the eighth image to the application processing chip.

[0033] The application processing chip receives the first image, the second image, and the eighth image. It performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image. Based on the third image and the fourth image, it determines the second depth data of the pixels in the third image. Based on the second depth data of the pixels in the third image, it performs blurring processing on the third image to obtain the ninth image. It replaces the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0034] According to a seventh aspect of the present application, a terminal is provided, the terminal including an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions, wherein the first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip;

[0035] The first image sensor is used to acquire a first image;

[0036] The second image sensor is used to acquire a second image. The first image and the second image are acquired at the same time. The first image and the second image are in the original image data format.

[0037] The image processing chip is configured to, in response to an image capture request, acquire the first image and the second image, determine the first depth data of the pixels in the first image based on the first image and the second image, and send the first image, the second image and the first depth data of the pixels in the first image to the application processing chip.

[0038] The application processing chip is configured to receive the first image, the second image, and the first depth data of the pixels in the first image; convert the format of the first image to obtain the third image; convert the format of the second image to obtain the fourth image; determine the second depth data of the pixels in the third image based on the third image and the fourth image; correct the second depth data of the pixels in the third image based on the first depth data of the pixels in the first image; and perform blurring processing on the third image based on the corrected depth data of the pixels to obtain the first target image.

[0039] According to an eighth aspect of the present application, a terminal is provided, the terminal including an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions, wherein the first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip;

[0040] The first image sensor is used to acquire a first image;

[0041] The second image sensor is used to acquire a second image. The first image and the second image are acquired at the same time. The first image and the second image are in the original image data format.

[0042] The image processing chip is configured to, in response to an image capture request, acquire the first image and the second image, determine the first depth data of the pixels in the first image based on the first image and the second image, perform a blurring process on the first image based on the first depth data of the pixels in the first image to obtain an eighth image, and send the first image, the second image and the eighth image to the application processing chip.

[0043] The application processing chip is configured to receive the first image, the second image, and the eighth image; convert the format of the first image to obtain the third image; convert the format of the second image to obtain the fourth image; determine the second depth data of the pixels in the third image based on the third image and the fourth image; perform a blurring process on the third image based on the second depth data of the pixels in the third image to obtain the ninth image; and replace the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0044] According to a ninth aspect of the embodiments of this application, an application processing chip is provided, the application processing chip including programmable logic circuits and / or program instructions, which, when running on a terminal, is used to implement the image processing method as described in the first or third aspect above.

[0045] According to a tenth aspect of the present application, an image processing chip is provided, the image processing chip including programmable logic circuits and / or program instructions, which, when running on a terminal, is used to implement the image processing method as described in the second or fourth aspect above.

[0046] According to an eleventh aspect of the embodiments of this application, a computer-readable storage medium is provided, the storage medium storing at least one piece of program code, the at least one piece of program code being executed by an application processing chip to implement the image processing method as described in the first or third aspect above, or the at least one piece of program code being executed by an image processing chip to implement the image processing method as described in the second or fourth aspect.

[0047] According to a twelfth aspect of the present application, a computer program product is provided, including a computer program that is executed by an application processing chip to implement the image processing method as described in the first or third aspect above, or the at least one piece of program code is executed by an image processing chip to implement the image processing method as described in the second or fourth aspect.

[0048] This application provides an image blurring processing scheme. The first depth data of the pixels in the first image is determined for the first image in the original image data format, which retains more detail information. Therefore, the first depth data is relatively accurate. The second depth data is determined for the third image obtained by format conversion of the first image. By combining the first depth data, the second depth data of the pixels in the third image is corrected, so that the corrected depth data is more accurate. Therefore, the first target image obtained by blurring processing based on the corrected depth data has a better blurring effect. It can be seen that this scheme improves the image blurring effect. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This invention provides a structural block diagram of a terminal according to an exemplary embodiment of the present application;

[0051] Figure 2 A flowchart illustrating an image processing method provided in an exemplary embodiment of this application is shown;

[0052] Figure 3 This illustration shows a schematic diagram of an image blurring process provided in an exemplary embodiment of this application;

[0053] Figure 4 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown;

[0054] Figure 5 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown;

[0055] Figure 6 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown;

[0056] Figure 7 This illustration shows another image blurring process provided by an exemplary embodiment of this application;

[0057] Figure 8 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown;

[0058] Figure 9 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown;

[0059] Figure 10 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown;

[0060] Figure 11 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown;

[0061] Figure 12 A flowchart illustrating yet another image processing method provided by an exemplary embodiment of this application is shown. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0063] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application 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 application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] In this article, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0065] This application provides a terminal, which may be a mobile phone, desktop computer, laptop computer, tablet computer, intelligent robot and other types of terminals.

[0066] Optionally, an image acquisition application is installed on the terminal, which has functions such as image acquisition, image capture, and image display. For example, the image acquisition application is a camera application. In this embodiment, when a user wants to capture an image through the terminal, they can trigger the terminal to run the image acquisition application. Accordingly, the terminal responds to the startup command of the image acquisition application, starts and runs the application, displays the application interface, and acquires an image. The application interface includes a preview box displaying the acquired image, allowing the user to see the image in the preview box.

[0067] Optionally, the application interface also includes a camera control used to trigger image capture. This camera control could be a camera button, a camera option, etc. If the image displayed in the preview box meets the user's quality requirements, the user can trigger the camera control. The terminal responds to this trigger by capturing the image, saving it, and allowing the user to perform other processing on the captured image, such as displaying or editing it to obtain an image of higher quality.

[0068] Please see Figure 1The diagram illustrates a structural block diagram of a terminal provided in an exemplary embodiment of this application. The terminal 100 includes a first image sensor 110 and a second image sensor 120 located at different positions, as well as an image processing chip 130 and an application processing chip 140. The first image sensor 110, the second image sensor 120, and the application processing chip 140 are communicatively connected to the image processing chip 130.

[0069] The first image sensor 110 and the second image sensor 120 are used to acquire images simultaneously. Optionally, if an image acquisition application is started, the first image sensor 110 and the second image sensor 120 begin acquiring images. Optionally, the terminal 100 includes cameras located at different positions, and the first image sensor 110 and the second image sensor 120 are respectively disposed in different cameras. The first image sensor 110 and the second image sensor 120 acquire images in the same direction, that is, they acquire images in the same direction. For example, the first image sensor 110 and the second image sensor 120 are both disposed on the side of the display screen or on the back cover of the terminal 100.

[0070] Image processing chip 130 and application processing chip 140 are used to perform blurring processing on the acquired image to obtain a blurred image. Optionally, image processing chip 130 is an NPU (Neural Network Processing Unit) chip or other chip with image processing function. Optionally, application processing chip 140 is an application processor (AP) chip. The application processing chip 140 has image processing function, and correspondingly, it includes an image processing unit. This image processing unit can be of any type, such as an image signal processing (ISP) unit, etc., and this embodiment does not impose any limitations on it.

[0071] During the preview stage, the application processing chip 140 controls the image acquisition application to preview and display the blurred image in the preview frame. During the capture stage, the application processing chip 140 saves the blurred image for subsequent processing.

[0072] The image processing method provided in this application can be applied to image blurring scenarios. The following description uses an example where camera 1 and camera 2 are located at different positions on a terminal. When a user wants to capture an image through the terminal, the terminal is triggered to launch the camera application. The terminal then launches the camera application and controls camera 1 and camera 2 to capture images. The camera application's interface includes a preview frame and shooting controls.

[0073] In the preview scenario, the terminal uses the image processing method provided in this application embodiment to blur the acquired image, obtaining a blurred image, which is then displayed in the preview frame of the camera application. In the photo-taking scenario, when the user wants to take a photo, they trigger the shooting control, and the terminal uses the image processing method provided in this application embodiment to blur the acquired image, obtaining a blurred image, which is then saved.

[0074] The image processing method provided in this application embodiment can also be applied to other image blurring scenarios, and this application embodiment does not limit it.

[0075] The following explanation uses the preview stage as an example to illustrate the image blurring process. Figure 2 A flowchart illustrating an image processing method provided in an exemplary embodiment of this application is shown. See also: Figure 2 This method is executed by an image processing chip and includes:

[0076] 201. The image processing chip acquires the sixth and seventh images. The sixth and seventh images are acquired simultaneously by the first and second image sensors located at different positions. The sixth and seventh images are in the original image data format.

[0077] In this embodiment, if the image acquisition application is started, the first image sensor and the second image sensor begin to acquire images and send the acquired images to the image processing chip. Correspondingly, the image processing chip receives the images acquired by the first image sensor and the second image sensor respectively. The images acquired by the image sensors exist in the form of image data. From a data type perspective, this image data is raw image data, that is, unprocessed image data. From a data format perspective, the format of this image data is a raw image data format, such as RAW format (a raw image data format) or other raw image data formats. This embodiment does not impose any limitations on this.

[0078] Taking the image transmission and reception process between the first image sensor and the image processing chip as an example, optionally, the image processing chip acquires the image captured by the first image sensor through a target interface and Direct Memory Access (DMA) functionality. Optionally, the target interface is a Mobile Industry Processor Interface (MIPI) or other data transmission interface; this embodiment does not limit this. If the target interface is MIPI, the image processing chip receives data packets containing image data sent by the first image sensor to acquire the image. Different data packets are distinguished using Virtual Channel (VC) and Data Type (DT).

[0079] It should be noted that the image transmission and reception process between the second image sensor and the image processing chip is the same as that between the first image sensor, and will not be described again here.

[0080] In this embodiment, the image processing chip can also store the received images. Optionally, after receiving the images currently acquired by the first image sensor and the second image sensor, the image sensor determines the total number of images acquired by the image sensor, and uses this total number as the current image identifier; the image identifier is then stored in correspondence with the received images. The image identifier (frame ID) is used to uniquely identify an image to distinguish different images. The image sensor is either the first image sensor or the second image sensor. If the first image sensor and the second image sensor start acquiring images simultaneously and at the same acquisition frequency, then the total number of images acquired by the first image sensor and the second image sensor is the same.

[0081] Optionally, the image processing chip starts counting from the first frame of image acquired by the first image sensor and the second image sensor respectively. Subsequently, for each frame of image acquired by the first image sensor and the second image sensor respectively, the count value is incremented by one, thereby determining the count value as the total number of images.

[0082] Since the first image sensor and the second image sensor acquire images simultaneously, it can be seen that the image processing chip simultaneously receives the images acquired by the first image sensor and the second image sensor. Therefore, the image identifiers corresponding to the images acquired by different image sensors at the same time are the same.

[0083] For example, the image processing chip caches the image in Double Data Rate (DDR) synchronous dynamic random access memory (hereinafter referred to as DDR), or the image processing chip may cache the image in other storage spaces; this application embodiment does not limit this. Optionally, since the image data volume is large and occupies a lot of storage space, the image storage chip may store the currently received image and delete the stored image to save storage space.

[0084] 202. The image processing chip determines the first depth data of the pixels in the sixth image based on the sixth and seventh images.

[0085] The depth data of a pixel includes the distance between the object corresponding to the pixel and the connecting line between the first and second image sensors. The object is a three-dimensional object, that is, an object captured by the first and second image sensors. For example, if the object is a tree, the tree is captured and imaged by the first image sensor, becoming the corresponding pixel in the sixth image, and by the second image sensor, becoming the corresponding pixel in the seventh image. The distance between the tree and the connecting line between the first and second image sensors is the depth data of the pixel corresponding to the tree.

[0086] Optionally, the image processing chip determines the first depth data of pixels in the sixth image based on the parallax between corresponding pixels in the sixth and seventh images, the distance between the first and second image sensors, and the pre-set focal length. Corresponding pixels are those belonging to the same object in both the sixth and seventh images. The image processing chip performs image alignment on the sixth and seventh images to obtain the correspondence between pixels in the sixth and seventh images.

[0087] Since the depth data of corresponding pixels in the sixth and seventh images are the same, the image processing chip only needs to determine the first depth data of the pixels in one image. In this embodiment, taking the first image sensor as the main image sensor and the second image sensor as the secondary image sensor as an example, the image acquired by the second image sensor is regarded as an image that helps determine the depth data of the pixels, so that the image acquired by the first image sensor can be blurred according to the determined depth data.

[0088] Optionally, corresponding pixels are each a certain distance from the left edge of their respective images, and these distances are different. The difference in distance can represent the parallax between corresponding pixels. The image sensor can then determine the first depth data of the pixels in the sixth image using the following formula:

[0089] Z = (b·f) / |XR-XT|

[0090] Where Z is the first depth data of the pixel in the sixth image, b is the distance between the first image sensor and the second image sensor, f is the focal length, XR is the distance between the pixel in the sixth image and the left edge of the sixth image, XT is the distance between the corresponding pixel in the seventh image and the left edge of the seventh image, and |·| represents taking the absolute value.

[0091] In this embodiment, parallax is the directional difference generated when observing the same target from two points at a certain distance. Since the first image sensor and the second image sensor are located in different positions, the imaging position of the same object acquired by the first image sensor and the second image sensor in the image is different. That is, the position of the corresponding pixel is different in different images. Therefore, there is parallax between the corresponding pixels of the same object in different images. Based on the parallax between the corresponding pixels, the distance between the first image sensor and the second image sensor, and the set focal length, the first depth data of the pixel determined is consistent with the actual situation and is relatively accurate.

[0092] 203. The image processing chip performs a blurring process on the sixth image based on the first depth data of the pixels in the sixth image to obtain the fifth image.

[0093] Optionally, the pixels in the sixth image are first divided into pixels within the focal plane and pixels outside the focal plane, where the focal plane is the plane where the focus is located. The first depth data of pixels within the focal plane is no greater than the first depth data of the focus, while the first depth data of pixels outside the focal plane is greater than the first depth data of the focus. Then, the pixels in the different ranges are blurred. In one possible implementation, the blurring process includes blurring the pixels outside the focal plane while preserving the sharpness of the pixels within the focal plane, i.e., not blurring the pixels within the focal plane, thereby achieving a blurred background and sharp foreground effect. This application does not limit the specific implementation of the blurring process; for example, blurring can be performed based on the size of the first depth data of the pixels, such that a larger first depth data results in a more blurred image, and a smaller first depth data results in a sharper image.

[0094] 204. The image processing chip sends the fifth image to the application processing chip.

[0095] It should be noted that when sending the fifth image, the image processing chip also sends the image identifiers corresponding to the sixth and seventh images to the application processing chip, so that the application processing chip can distinguish the different received images based on the image identifiers.

[0096] 205. The application processing chip receives the fifth image sent by the image processing chip.

[0097] 206. The application processing chip performs format conversion on the fifth image to obtain the second target image.

[0098] In this embodiment, the sixth and seventh images are in the original image data format, and the fifth image obtained by blurring the sixth image is also in the original image data format. Since images in the original image data format cannot be directly displayed on the interface, the application processing chip needs to convert the format of the fifth image after receiving it. The format of the second target image obtained after the format conversion is a display-supported format. Optionally, the converted format can be any display-supported format, such as YUV (Y represents luminance, and U and V represent chrominance) format.

[0099] 207. The application processing chip performs a preview display based on the second target image.

[0100] The application processing chip controls the image acquisition application to preview the second target image, allowing the user to see the displayed second target image. For example, the second target image is displayed in the preview window of the image acquisition application.

[0101] It should be noted that the application processing chip may also have other image processing functions, such as brightness adjustment and noise reduction. In this case, the application processing chip can perform other image processing on the second target image to obtain the processed second target image, and then preview and display it based on the processed second target image. This application embodiment does not limit this.

[0102] For example, see Figure 3 The bokeh process shown involves a first image sensor as the main camera and a second image sensor as the secondary camera. The main and secondary cameras respectively capture images containing objects (represented by trees in the figure) and send them to the image processing chip. The image is in its original image data format. The image processing chip sequentially performs image alignment, parallax calculation, depth data calculation, and bokeh processing to obtain an image in the original image data format after bokeh processing. This image is then sent to the application processing chip, which converts the image format to a display-compatible format and performs a preview display based on the converted image.

[0103] In this embodiment, during the preview stage, the image processing chip performs depth data calculation and blurring processing on the acquired image, and transmits the blurred fifth image to the application processing chip in the original image data format. On the one hand, since the image processing chip has already blurred the image, the application processing chip only needs to perform a simple format conversion to preview the second target image online. On the other hand, since the image processing chip performs blurring processing on the image based on the original image data format acquired by the image sensor, it can retain more image detail information. Furthermore, the image processing chip has lower power consumption and faster speed, thus reducing power consumption in the blurring process and improving the real-time performance of the preview display.

[0104] The above Figure 2 The example describes the image blurring process during the preview stage. The image blurring process during the shooting stage will be described below. Figure 4 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 4 This method is executed by an image processing chip and includes:

[0105] 401. In response to an image capture request, the image processing chip acquires a first image and a second image. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the format of raw image data.

[0106] The image processing chip stores the received images during the preview stage. These received images include those captured simultaneously by the first and second image sensors. Therefore, during the image capture stage, the image processing chip responds to the image capture request and acquires the stored first and second images. The acquired first and second images are in their raw image data format; that is, they are unprocessed raw images. For example, the raw image data format may be RAW or other raw image data formats, and this embodiment does not impose any limitations on this.

[0107] 402. The image processing chip determines the first depth data of the pixels in the first image based on the first image and the second image.

[0108] In this context, the depth data of a pixel represents the distance between the object corresponding to that pixel and the connecting line between the first and second image sensors. The object is a three-dimensional object, that is, an object captured by the first and second image sensors. Since both the first and second images are raw images without format conversion, the determined depth data of the pixels retains more detailed information.

[0109] 403. The image processing chip sends the first image, the second image, and the first depth data of the pixels in the first image.

[0110] Optionally, the image processing chip sends a first image, a second image, and first depth data of pixels in the first image to the application processing chip. The application processing chip performs format conversion on the first image to obtain a third image, performs format conversion on the second image to obtain a fourth image, determines the second depth data of pixels in the third image based on the third and fourth images, corrects the second depth data of pixels in the third image based on the first depth data of pixels in the first image, and performs blurring processing on the third image based on the corrected depth data of pixels to obtain a first target image, which is then displayed.

[0111] In this embodiment of the application, the first image and the second image are in the original image data format. By determining the first depth data of the pixels in the first image based on the first image and the second image, the determined first depth data retains more detailed information, and therefore the accuracy of the first depth data is high.

[0112] The above Figure 4 The example describes the image blurring process during the shooting stage from the image processing chip side. The following describes the image blurring process during the shooting stage from the application processing chip side. Figure 5 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see also... Figure 5 This method is executed by the application processing chip and includes:

[0113] 501. The application processing chip receives a first image, a second image, and first depth data of pixels in the first image. The first image and the second image are acquired at the same time by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format.

[0114] Optionally, the application processing chip receives a first image, a second image, and first depth data of pixels in the first image sent by the image processing chip. The first depth data of the pixels is determined by the image processing chip based on the first and second images.

[0115] 502. The application processing chip performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image.

[0116] The first and second images are raw, unconverted images that cannot be directly displayed on the interface. After receiving the first and second images, the application processing chip needs to convert their formats, resulting in the third and fourth images in displayable formats. Optionally, the converted formats can be any displayable format, such as YUV.

[0117] 503. The application processing chip determines the second depth data of the pixels in the third image based on the third and fourth images.

[0118] 504. The application processing chip corrects the second depth data of pixels in the third image based on the first depth data of pixels in the first image.

[0119] The third and fourth images are converted images, and the conversion will cause the loss of image detail information, which will affect the accuracy of the determined second depth data. However, the first depth data determined by the image processing chip is more accurate. Therefore, the second depth data can be corrected based on the first depth data to improve the accuracy of the depth data of the pixels.

[0120] 505. The application processing chip performs blurring processing on the third image based on the depth data after pixel correction to obtain the first target image.

[0121] The first target image is a photographed image. The application processing chip can save the first target image, so that the user can perform other processing on the first target image through the terminal, such as displaying the first target image or editing the first target image to obtain an image with a quality that better meets the user's requirements.

[0122] This application provides an image blurring processing scheme. The first depth data of the pixels in the first image is determined for the first image in the original image data format, which retains more detail information. Therefore, the first depth data is relatively accurate. The second depth data is determined for the third image obtained by format conversion of the first image. By combining the first depth data, the second depth data of the pixels in the third image is corrected, so that the corrected depth data is more accurate. Therefore, the first target image obtained by blurring processing based on the corrected depth data has a better blurring effect. It can be seen that this scheme improves the image blurring effect.

[0123] The above Figure 4 and Figure 5The embodiments briefly describe the image blurring process during the shooting stage from both the image processing chip side and the application processing chip side. The following description focuses on the interaction between the image processing chip and the application processing chip to explain the image blurring process during the shooting stage. Figure 6 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 6 This method is executed interactively by the image processing chip and the application processing chip. The method includes:

[0124] 601. The application processing chip, in response to the detection of an image capture operation by the image acquisition application, obtains the target image identifier corresponding to the image currently displayed by the image acquisition application.

[0125] The terminal runs an image acquisition application, and the image is previewed and displayed in the application interface. The previewed image is obtained by first blurring the original image data format image through an image processing chip, and then converting the format of the blurred image through an application processing chip. In this embodiment, the image in the original image data format is used as the first image for illustration. The first depth data of the pixels in the first image used for blurring is determined by the image processing chip based on the first image and the second image. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions, and both the first image and the second image are in the original image data format. The image preview display process is described above. Figure 2 The embodiments shown are not described in detail here.

[0126] When the image displayed in the preview box meets the user's requirements, the user may want to take a picture, that is, capture the previewed image. The user can then trigger an image capture operation, which is used to capture the image. Optionally, the application interface of the image acquisition application also displays a shooting control, and the image capture operation is a trigger operation on the shooting control. When the user wants to take a picture, they can trigger the shooting control. When the application processing chip detects the trigger operation on the shooting control, it obtains the target image identifier. Alternatively, the image capture operation can be other operations, such as double-clicking any location on the application interface, etc., which are not limited in this embodiment.

[0127] During the preview stage, after obtaining the blurred image, the image processing chip sends the blurred image and its corresponding image identifier to the application processing chip. The image identifier is used to distinguish the image from other images, and it is also the image identifier corresponding to the original image. In order to obtain the original image with the help of the image processing chip, the application processing chip obtains the target image identifier corresponding to the image currently displayed by the image acquisition application, that is, the previewed image. Based on the image processing chip, the original image corresponding to the target image identifier is obtained for subsequent processing of the original image. Accordingly, the application processing chip continues to execute the operation of step 602.

[0128] 602. The application processing chip sends an image capture request carrying the target image identifier to the image processing chip.

[0129] The image capture request is used to request the image processing chip to return the first image, the second image, and the first depth data of the pixels in the first image that correspond to the target image identifier.

[0130] Optionally, the image capture request also carries a request ID and pipeline information. The request ID is used to distinguish different requests. By carrying the request ID in the image capture request, the image processing chip can differentiate between different requests. In this embodiment, a first image sensor and a second image sensor are used to acquire images. The first image sensor corresponds to one pipeline, and the second image sensor also corresponds to one pipeline. When the image acquisition application is started, the application processing chip determines the image sensor used for image acquisition, such as the first and second image sensors, controls the first and second image sensors to acquire images, and assigns pipeline IDs to the first and second image sensors. The pipeline IDs are used to distinguish between different pipelines. Therefore, the image acquired by the first image sensor corresponds to the first pipeline ID of the first image sensor, and the image acquired by the second image sensor corresponds to the second pipeline ID of the second image sensor. Accordingly, the pipeline information includes the first pipeline ID and the second pipeline ID. By carrying the pipeline information in the image capture request, the image processing chip can distinguish between images from different pipelines.

[0131] 603. In response to an image capture request, the image processing chip acquires the first image and the second image stored corresponding to the target image identifier.

[0132] Optionally, after receiving images acquired by the first image sensor and the second image sensor, the image processing chip stores the image identifier and the received image accordingly. Correspondingly, upon receiving an image capture request, the image processing chip retrieves the first image and the second image corresponding to the target image identifier from the already stored image identifiers and images.

[0133] Optionally, the image sensor also corresponds to a path identifier. When storing the received image, the image processing chip also stores the image and its corresponding path identifier. For example, if the image processing chip receives a first image captured by a first image sensor and a second image captured by a second image sensor, and the first image corresponds to a first path identifier and the second image corresponds to a second path identifier, then the image identifier, the first image, the first path identifier, the second image, and the second path identifier are stored accordingly. Correspondingly, the image capture request also carries path information, including the first path identifier and the second path identifier. The image processing chip then acquires the first image stored corresponding to the target image identifier and the first path identifier, and acquires the second image stored corresponding to the target image identifier and the second path identifier.

[0134] 604. The image processing chip determines the first depth data of the pixels in the first image based on the first image and the second image.

[0135] After acquiring the first image and the second image, the image processing chip determines the first depth data of the pixels in the first image, thereby providing a reference for the application processing chip. Optionally, step 604 includes: determining the first depth data of the pixels in the first image based on the parallax between corresponding pixels in the first and second images, the distance between the first image sensor and the second image sensor, and the set focal length. The implementation of step 604 is similar to that of step 202, and will not be described again here.

[0136] Since the image processing chip has already determined the first depth data of the pixels in the first image based on the first and second images during the preview stage, the image processing chip can store the first depth data of the pixels in the first image corresponding to the image identifier. Therefore, when an image capture request is received, the stored first depth data of the pixels can be retrieved, eliminating the need to repeatedly determine the pixel depth data, reducing computational load, and improving efficiency. Optionally, steps 603-604 can be replaced with: in response to the image capture request, retrieving the first image, the second image, and the first depth data of the pixels in the first image stored corresponding to the target image identifier.

[0137] 605. The image processing chip sends a first image, a second image, and first depth data of the pixels in the first image to the application processing chip.

[0138] 606. The application processing chip receives the first image, the second image, and the first depth data of the pixels in the first image sent by the image processing chip.

[0139] Steps 602-606 are an implementation method in which the application processing chip obtains the first image, the second image, and the first depth data of the pixels in the first image stored corresponding to the target image identifier by sending an image capture request carrying the target image identifier.

[0140] 607. The application processing chip performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image.

[0141] Before blurring the first image based on the first and second images, the application processing chip first performs format conversion on the first and second images. Optionally, the image format conversion process is the same as the image format conversion process in step 206, and will not be described again here.

[0142] 608. The application processing chip determines the second depth data of the pixels in the third image based on the third and fourth images.

[0143] Optionally, step 608 includes: determining second depth data of pixels in the third image based on the parallax between corresponding pixels in the third and fourth images, the distance between the first and second image sensors, and the set focal length. The implementation of step 608 is similar to that of step 202, and will not be described again here.

[0144] 609. The application processing chip corrects the second depth data of pixels in the third image based on the first depth data of pixels in the first image.

[0145] The third and fourth images are converted images, and the conversion will cause the loss of image detail information, which will affect the accuracy of the determined second depth data. However, the first depth data determined by the image processing chip is more accurate. Therefore, the second depth data can be corrected based on the first depth data to improve the accuracy of the depth data of the pixels.

[0146] Optionally, the application processing chip corrects the second depth data of pixels in the third image based on the first depth data of pixels in the first image in the following ways: for a pixel in the third image, if the second depth data of the pixel does not meet the target depth data condition, the second depth data of the pixel is replaced with the first depth data of the corresponding pixel in the first image. The target depth data condition is: the difference between the target depth data and the second depth data is less than a depth threshold, and the target depth data is the second depth data of the pixel adjacent to the first pixel.

[0147] The third image is a converted version of the first image, and corresponding pixels in the first and third images are pixels at the same position. The depth threshold can be set as needed, and this embodiment does not impose any restrictions on it.

[0148] In this embodiment, the objects contained in the image are at a certain distance from the image sensor in three-dimensional space. Even if the distances between different positions on the object and the image sensor are different, the differences between the second depth data of the corresponding pixels at different positions are within a small range. If the difference between the second depth data of a certain pixel and the second depth data of its neighboring pixels is not less than the depth threshold, it indicates that the second depth data of the pixel is large and has jumped relative to the neighboring pixels, so the second depth data of the pixel is likely to be wrong. If the difference between the second depth data of a certain pixel and the second depth data of its neighboring pixels is less than the depth threshold, it indicates that the second depth data of the pixel is relatively accurate. Thus, by replacing the second depth data of pixels that do not meet the target depth data conditions with the first depth data, the depth data of the pixels is corrected, and the accuracy of the depth data of the pixels is improved.

[0149] 610. The application processing chip performs a blurring process on the third image based on the depth data after pixel correction to obtain the first target image.

[0150] The first target image is a photographed image that the user desires. The application processing chip can save the first target image, allowing the user to perform other processing on it via the terminal, such as displaying or editing it to obtain an image of higher quality that meets the user's requirements. Optionally, step 610 is implemented in the same way as step 203, and will not be described again here.

[0151] For example, see Figure 7 The diagram illustrates the image blurring process. The image processing chip caches the received image in DDR. The application processing chip sends an image capture request to the image processing chip. The image processing chip returns the cached first and second images, as well as the first depth data of the pixels in the first image. The application processing chip first performs format conversion on the first and second images, and then performs image alignment, disparity calculation, and depth data calculation on the third image obtained from the format conversion to obtain the second depth data of the pixels. Then, it performs correction processing based on the first depth data of the pixels in the first image. Finally, it performs blurring processing on the third image based on the pixel-corrected depth data.

[0152] This application proposes an image blurring processing scheme. When the application processing chip detects an image capture operation through the image acquisition application, it sends an image capture request to the image processing chip. This causes the image processing chip to send a first image, a second image, and the first depth data of the pixels in the first image to the application processing chip. Since the first depth data is determined by the image processing chip for the first image in the original image data format, it retains more detailed information and is therefore more accurate. By combining the first depth data determined by the image processing chip, the second depth data determined by the application processing chip is corrected, making the corrected depth data more accurate. Consequently, the first target image obtained by blurring processing based on the corrected depth data has a better blurring effect. It is evident that this scheme improves the image blurring effect.

[0153] In the above Figures 4-6 In the illustrated embodiment, during the image capture stage, the image processing chip sends a first image, a second image, and first depth data of pixels in the first image to the application processing chip. In another image processing method provided in this application embodiment, the image processing chip may further perform blurring processing on the first image first, and then send the blurred image along with the first image and the second image to the application processing chip. The following describes... Figures 8-10 The illustrated embodiment explains the image processing method.

[0154] Figure 8 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 8 This method is executed by an image processing chip and includes:

[0155] 801. In response to an image capture request, the image processing chip acquires a first image and a second image. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format.

[0156] 802. The image processing chip determines the first depth data of the pixels in the first image based on the first image and the second image.

[0157] 803. The image processing chip performs a blurring process on the first image based on the first depth data of the pixels in the first image to obtain the eighth image.

[0158] 804. The image processing chip sends the first image, the second image, and the eighth image.

[0159] Optionally, the image processing chip sends a first image, a second image, and an eighth image to the application processing chip. The application processing chip performs format conversion on the first image to obtain a third image, and performs format conversion on the second image to obtain a fourth image; based on the third and fourth images, it determines the second depth data of the pixels in the third image; based on the second depth data of the pixels in the third image, it performs blurring processing on the third image to obtain a ninth image; and it replaces pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0160] In this embodiment of the application, an eighth image is obtained by blurring the first image in the original image data format. The eighth image retains more detail information and has a better blurring effect.

[0161] Figure 9 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 9 This method is executed by the application processing chip and includes:

[0162] 901. The application processing chip receives the first image, the second image, and the eighth image. The eighth image is the image obtained after the image processing chip performs a blurring process on the first image. The first image and the second image are in the original image data format.

[0163] Optionally, the application processing chip receives the first image, the second image, and the eighth image sent by the image processing chip.

[0164] 902. The application processing chip performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image.

[0165] 903. The application processing chip determines the second depth data of the pixels in the third image based on the third and fourth images.

[0166] 904. The application processing chip performs a blurring process on the third image based on the second depth data of the pixels in the third image to obtain the ninth image.

[0167] 905. The application processing chip replaces the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0168] This application provides another image blurring scheme. The eighth image is obtained by blurring the first image in the original image data format, which retains more detail information and has a better blurring effect. First, the third image converted from the first image format is blurred by the application processing chip to obtain the ninth image. Then, the application processing chip is combined with the eighth image to replace the pixels in the ninth image that do not meet the quality conditions, so that the first target image obtained after replacing the pixels has a better blurring effect. It can be seen that this scheme improves the image blurring effect.

[0169] The above Figure 8 and Figure 9 The embodiments briefly describe the image blurring process during the shooting stage from both the image processing chip side and the application processing chip side. The following description focuses on the interaction between the image processing chip and the application processing chip to explain the image blurring process during the shooting stage. Figure 10 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 10 This method is executed interactively by the image processing chip and the application processing chip, and includes:

[0170] 1001. The application processing chip, in response to the detection of an image capture operation by the image acquisition application, obtains the target image identifier corresponding to the image currently displayed by the image acquisition application.

[0171] 1002. The application processing chip sends an image capture request carrying the target image identifier to the image processing chip.

[0172] The image capture request is used to request the image processing chip to return the first image, the second image, and the first depth data of the pixels in the first image that correspond to the target image identifier.

[0173] 1003. In response to an image capture request, the image processing chip acquires the first image and the second image stored corresponding to the target image identifier.

[0174] The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions, and the first image and the second image are in the original image data format.

[0175] 1004. The image processing chip determines the first depth data of the pixels in the first image based on the first image and the second image.

[0176] The implementation methods of steps 1001-1004 are the same as those of steps 601-604, and will not be repeated here.

[0177] 1005. The image processing chip performs a blurring process on the first image based on the first depth data of the pixels in the first image to obtain the eighth image.

[0178] The implementation method of step 1005 is similar to that of step 203, but the embodiments of this application are different. Figure 6 The difference in the illustrated embodiment is that, Figure 6 In the illustrated embodiment, after determining the first depth data of the pixels in the first image, the image processing chip directly sends the first image, the second image, and the first depth data of the pixels in the first image to the application processing chip. However, in this embodiment, after determining the first depth data of the pixels in the first image, the image processing chip first performs a blurring process on the first image based on the first depth data to obtain an eighth image. Since the eighth image is obtained by the image processing chip through blurring the first image in the original image data format, more detailed information is preserved.

[0179] 1006. The image processing chip sends the first image, the second image, and the eighth image to the application processing chip.

[0180] 1007. The application processing chip receives the first image, the second image, and the eighth image sent by the image processing chip.

[0181] Steps 1002-1007 are an implementation method in which the application processing chip obtains the first image, the second image, and the eighth image stored corresponding to the target image identifier by sending an image capture request carrying the target image identifier.

[0182] In this embodiment, since the image processing chip first performs a blurring process on the first image to obtain the eighth image, the eighth image is sent together with the first and second images to the application processing chip, so that the application processing chip can perform image blurring processing based on the first and second images and refer to the eighth image, thereby obtaining a better blurring processing effect.

[0183] 1008. The application processing chip performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image.

[0184] 1009. The application processing chip determines the second depth data of the pixels in the third image based on the third and fourth images.

[0185] The implementation methods for steps 1008-1009 are the same as those for steps 607-608, and will not be repeated here.

[0186] 1010. The application processing chip performs a blurring process on the third image based on the second depth data of the pixels in the third image to obtain the ninth image.

[0187] The implementation method of step 1010 is the same as that of step 610, and will not be repeated here.

[0188] 1011. The application processing chip replaces the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0189] The target quality conditions can be set as needed, and this application embodiment does not impose any restrictions on them. For example, the target quality condition could be that the brightness does not meet the requirements, or it could be that the darkness does not meet the requirements. Pixels that do not meet the quality requirements can be regarded as bad pixels. The application processing chip replaces the bad pixels in the ninth image with the corresponding pixels in the eighth image. The pixel replacement involves changing the pixel value of the pixel.

[0190] This application provides another image blurring scheme. First, the first image in the original image data format is blurred by the image processing chip to obtain the eighth image. The eighth image retains more detail information and has a better blurring effect. Then, the third image converted from the first image format is blurred by the application processing chip to obtain the ninth image. The application processing chip can then combine the eighth image to replace pixels in the ninth image that do not meet the quality requirements, so that the first target image obtained after replacing the pixels has a better blurring effect. It can be seen that this scheme improves the image blurring effect.

[0191] Figure 11 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 11 The method is executed by a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are communicatively connected to the image processing chip. The method includes:

[0192] 1101. The terminal acquires a first image and a second image simultaneously through the first image sensor and the second image sensor, respectively. The first image and the second image are in the original image data format.

[0193] 1102. The terminal, in response to an image capture request, acquires a first image and a second image through an image processing chip. Based on the first image and the second image, it determines the first depth data of the pixels in the first image and sends the first image, the second image, and the first depth data of the pixels in the first image to the application processing chip.

[0194] 1103. The terminal receives a first image, a second image, and first depth data of pixels in the first image through an application processing chip. It performs format conversion on the first image to obtain a third image, and performs format conversion on the second image to obtain a fourth image. Based on the third image and the fourth image, it determines the second depth data of pixels in the third image. Based on the first depth data of pixels in the first image, it corrects the second depth data of pixels in the third image. Based on the corrected depth data of pixels, it performs blurring processing on the third image to obtain the first target image.

[0195] Optionally, the method further includes:

[0196] By using the processing chip, in response to the image capture operation detected by the image acquisition application, the target image identifier corresponding to the image currently displayed by the image acquisition application is obtained;

[0197] The application processing chip sends an image capture request carrying a target image identifier to the image processing chip. The image capture request is used to request the image processing chip to return the first image, the second image, and the first depth data of the pixels in the first image that correspond to the target image identifier.

[0198] Optionally, the method further includes:

[0199] The image processing chip acquires the sixth and seventh images. Based on the sixth and seventh images, the first depth data of the pixels in the sixth image is determined. Based on the first depth data of the pixels in the sixth image, the sixth image is blurred to obtain the fifth image. The fifth image is sent to the application processing chip. The sixth and seventh images are acquired by the first image sensor and the second image sensor at the same time, respectively. The sixth and seventh images are in the original image data format.

[0200] The application processing chip receives the fifth image sent by the image processing chip;

[0201] The fifth image is converted into a second target image by using a processing chip, and a preview display is performed based on the second target image.

[0202] One point that needs to be clarified is that, for Figure 11 For details not disclosed in the illustrated embodiments, please refer to the present application. Figures 4-6 The example shown.

[0203] Figure 12 A flowchart illustrating another image processing method provided by an exemplary embodiment of this application is shown; see [link to flowchart application]. Figure 12The method is executed by a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are communicatively connected to the image processing chip. The method includes:

[0204] 1201. The terminal acquires a first image and a second image simultaneously through the first image sensor and the second image sensor, respectively. The first image and the second image are in the original image data format.

[0205] 1202. The terminal, in response to an image capture request, acquires a first image and a second image through an image processing chip. Based on the first image and the second image, it determines the first depth data of the pixels in the first image. Based on the first depth data of the pixels in the first image, it performs a blurring process on the first image to obtain an eighth image. The terminal then sends the first image, the second image, and the eighth image to the application processing chip.

[0206] 1203. The terminal receives the first image, the second image, and the eighth image through the application processing chip. It performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image. Based on the third image and the fourth image, it determines the second depth data of the pixels in the third image. Based on the second depth data of the pixels in the third image, it performs blurring processing on the third image to obtain the ninth image. It replaces the pixels in the ninth image whose quality does not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0207] One point that needs to be clarified is that, for Figure 12 For details not disclosed in the illustrated embodiments, please refer to the present application. Figures 8-10 The example shown.

[0208] This application embodiment also provides a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip.

[0209] A first image sensor is used to acquire a first image;

[0210] The second image sensor is used to acquire the second image. The first and second images are acquired at the same time. The first and second images are in the original image data format.

[0211] An image processing chip is used to respond to an image capture request, acquire a first image and a second image, determine first depth data of pixels in the first image based on the first image and the second image, and send the first image, the second image and the first depth data of pixels in the first image to an application processing chip.

[0212] The application processing chip is used to receive a first image, a second image, and first depth data of pixels in the first image; to convert the format of the first image to obtain a third image; to convert the format of the second image to obtain a fourth image; to determine the second depth data of pixels in the third image based on the third image and the fourth image; to correct the second depth data of pixels in the third image based on the first depth data of pixels in the first image; and to perform blurring processing on the third image based on the corrected depth data of pixels to obtain a first target image.

[0213] It should be noted that for details not disclosed in the above terminal embodiments, please refer to this application. Figures 4-6 The example shown.

[0214] This application embodiment also provides a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip.

[0215] A first image sensor is used to acquire a first image;

[0216] The second image sensor is used to acquire the second image. The first and second images are acquired at the same time. The first and second images are in the original image data format.

[0217] An image processing chip is used to respond to an image capture request, acquire a first image and a second image, determine first depth data of pixels in the first image based on the first image and the second image, perform blurring processing on the first image based on the first depth data of pixels in the first image to obtain an eighth image, and send the first image, the second image and the eighth image to the application processing chip.

[0218] The application processing chip is used to receive a first image, a second image, and an eighth image; to convert the format of the first image to obtain a third image; to convert the format of the second image to obtain a fourth image; to determine the second depth data of the pixels in the third image based on the third and fourth images; to perform a blurring process on the third image based on the second depth data of the pixels in the third image to obtain a ninth image; and to replace the pixels in the ninth image whose quality does not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

[0219] It should be noted that for details not disclosed in the above terminal embodiments, please refer to this application. Figures 8-10 The example shown.

[0220] This application also provides an application processing chip, which includes programmable logic circuits and / or program instructions. When the application processing chip runs on a terminal, it is used to implement the image processing method as described in the above embodiments.

[0221] This application also provides an image processing chip, which includes programmable logic circuits and / or program instructions. When the image processing chip is run on a terminal, it is used to implement the image processing method as described in the above embodiments.

[0222] This application also provides a computer-readable storage medium storing at least one piece of program code, which is executed by an application processing chip to implement the image processing method as described in the above embodiments; or, at least one piece of program code is executed by an image processing chip to implement the image processing method as described in the above embodiments.

[0223] This application also provides a computer program product, including a computer program that is executed by an application processing chip to implement the image processing method as described in the above embodiments; or, at least one piece of program code that is executed by an image processing chip to implement the image processing method as described in the above embodiments.

[0224] In some embodiments, the computer program involved in the present application embodiments may be deployed on a terminal for execution, or executed on multiple terminals located in one location, or executed on multiple terminals distributed in multiple locations and interconnected through a communication network. Multiple terminals distributed in multiple locations and interconnected through a communication network may form a blockchain system.

[0225] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0226] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the images involved in this application were all obtained with full authorization.

[0227] Those skilled in the art will understand that all or part of the steps in the image processing method of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. An image processing method, characterized in that, The method includes: Receive a first image, a second image, and first depth data of pixels in the first image. The first image and the second image are acquired at the same time by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format. The first image is converted to a different format to obtain the third image, and the second image is converted to a different format to obtain the fourth image. Based on the third image and the fourth image, determine the second depth data of the pixels in the third image; Based on the first depth data of the pixels in the first image, the second depth data of the pixels in the third image is corrected; Based on the depth data after pixel correction, the third image is blurred to obtain the first target image.

2. The method according to claim 1, characterized in that, The step of correcting the second depth data of pixels in the third image based on the first depth data of pixels in the first image includes: For a pixel in the third image, if the second depth data of the pixel does not meet the target depth data condition, the second depth data of the pixel is replaced with the first depth data of the corresponding pixel in the first image. The target depth data condition is: the difference between the target depth data and the target depth data is less than the depth threshold, and the target depth data is the second depth data of the pixel adjacent to the pixel.

3. The method according to claim 1, characterized in that, The method further includes: In response to detecting an image capture operation through an image acquisition application, the target image identifier corresponding to the image currently displayed by the image acquisition application is obtained; By sending an image capture request carrying the target image identifier, the first depth data of the first image, the second image, and the pixels in the first image stored corresponding to the target image identifier is obtained.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Receive a fifth image, which is an image obtained by blurring the sixth image acquired by the first image sensor, and the sixth image is in the original image data format; The fifth image is converted to a different format to obtain the second target image; A preview display is shown based on the second target image.

5. An image processing method, characterized in that, Applied to an image processing chip, the method includes: In response to an image capture request, a first image and a second image are acquired. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format. Based on the first image and the second image, determine the first depth data of the pixels in the first image; The application processing chip sends the first image, the second image, and the first depth data of the pixels in the first image to the application processing chip. The application processing chip is used to convert the format of the first image and the second image to obtain a third image and a fourth image, and to correct the second depth data of the pixels in the third image based on the first depth data of the pixels in the first image. Based on the corrected depth data of the pixels, the third image is blurred to obtain a first target image. The second depth data of the pixels in the third image is determined based on the third image and the fourth image.

6. The method according to claim 5, characterized in that, The method further includes: Receive the images currently acquired by the first image sensor and the second image sensor; The total number of images acquired by the image sensor is determined, and the total number is used as the current image identifier. The image sensor is either the first image sensor or the second image sensor. Store the image identifier corresponding to the received image; The step of acquiring the first image and the second image in response to the image capture request includes: In response to the image capture request carrying a target image identifier sent by the application processing chip, the first image and the second image stored corresponding to the target image identifier are acquired.

7. The method according to claim 5, characterized in that, The method further includes: A sixth image and a seventh image are acquired, wherein the sixth image and the seventh image are acquired simultaneously by the first image sensor and the second image sensor, respectively, and the sixth image and the seventh image are in the original image data format; Based on the sixth image and the seventh image, determine the first depth data of the pixels in the sixth image; Based on the first depth data of the pixels in the sixth image, the sixth image is blurred to obtain the fifth image; The fifth image is sent to the application processing chip.

8. The method according to any one of claims 5-7, characterized in that, The step of determining the first depth data of pixels in the first image based on the first image and the second image includes: Based on the parallax between corresponding pixels in the first image and the second image, the distance between the first image sensor and the second image sensor, and the set focal length, the first depth data of the pixels in the first image is determined.

9. An image processing method, characterized in that, The method includes: The system receives a first image, a second image, and an eighth image. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format. The eighth image is an image obtained by blurring the first image. The first image is converted to a different format to obtain the third image, and the second image is converted to a different format to obtain the fourth image. Based on the third image and the fourth image, determine the second depth data of the pixels in the third image; Based on the second depth data of the pixels in the third image, the third image is blurred to obtain the ninth image; The pixels in the ninth image that do not meet the target quality conditions are replaced with the corresponding pixels in the eighth image to obtain the first target image.

10. An image processing method, characterized in that, Applied to an image processing chip, the method includes: In response to an image capture request, a first image and a second image are acquired. The first image and the second image are acquired simultaneously by a first image sensor and a second image sensor located at different positions. The first image and the second image are in the original image data format. Based on the first image and the second image, determine the first depth data of the pixels in the first image; Based on the first depth data of the pixels in the first image, the first image is blurred to obtain the eighth image; The application processing chip sends the first image, the second image, and the eighth image to the application processing chip. The application processing chip performs format conversion on the first image and the second image to obtain the third image and the fourth image. Based on the second depth data of the pixels in the third image, the third image is blurred to obtain the ninth image. Pixels in the ninth image that do not meet the target quality conditions are replaced with the corresponding pixels in the eighth image to obtain the first target image. The second depth data of the pixels in the third image is determined based on the third image and the fourth image.

11. An image processing method, characterized in that, The method is executed by a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are communicatively connected to the image processing chip. The method includes: A first image and a second image are acquired simultaneously by the first image sensor and the second image sensor, respectively, and the first image and the second image are in the original image data format; In response to an image capture request, the image processing chip acquires the first image and the second image, determines the first depth data of the pixels in the first image based on the first image and sends the first image, the second image and the first depth data of the pixels in the first image to the application processing chip. The application processing chip receives the first image, the second image, and the first depth data of the pixels in the first image. It performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image. Based on the third image and the fourth image, it determines the second depth data of the pixels in the third image. Based on the first depth data of the pixels in the first image, it corrects the second depth data of the pixels in the third image. Based on the corrected depth data of the pixels, it performs blurring processing on the third image to obtain the first target image.

12. The method according to claim 11, characterized in that, The method further includes: The application processing chip, in response to detecting an image capture operation through the image acquisition application, obtains the target image identifier corresponding to the image currently displayed by the image acquisition application; The application processing chip sends an image capture request carrying the target image identifier to the image processing chip. The image capture request is used to request the image processing chip to return the first image, the second image, and the first depth data of the pixels in the first image that are stored corresponding to the target image identifier.

13. The method according to claim 11, characterized in that, The method further includes: The image processing chip acquires a sixth image and a seventh image. Based on the sixth image and the seventh image, the first depth data of the pixels in the sixth image is determined. Based on the first depth data of the pixels in the sixth image, the sixth image is blurred to obtain a fifth image. The fifth image is sent to the application processing chip. The sixth image and the seventh image are acquired simultaneously by the first image sensor and the second image sensor, respectively. The sixth image and the seventh image are in the original image data format. The application processing chip receives the fifth image sent by the image processing chip. The application processing chip converts the format of the fifth image to obtain a second target image, and then previews and displays the second target image.

14. An image processing method, characterized in that, The method is executed by a terminal, which includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are communicatively connected to the image processing chip. The method includes: A first image and a second image are acquired simultaneously by the first image sensor and the second image sensor, respectively, and the first image and the second image are in the original image data format; In response to an image capture request, the image processing chip acquires the first image and the second image, determines the first depth data of the pixels in the first image based on the first image and the second image, performs a blurring process on the first image based on the first depth data of the pixels in the first image to obtain an eighth image, and sends the first image, the second image and the eighth image to the application processing chip. The application processing chip receives the first image, the second image, and the eighth image. It performs format conversion on the first image to obtain the third image, and performs format conversion on the second image to obtain the fourth image. Based on the third image and the fourth image, it determines the second depth data of the pixels in the third image. Based on the second depth data of the pixels in the third image, it performs blurring processing on the third image to obtain the ninth image. It replaces the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

15. A terminal, characterized in that, The terminal includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip. The first image sensor is used to acquire a first image; The second image sensor is used to acquire a second image. The first image and the second image are acquired at the same time. The first image and the second image are in the original image data format. The image processing chip is configured to, in response to an image capture request, acquire the first image and the second image, determine the first depth data of the pixels in the first image based on the first image and the second image, and send the first image, the second image and the first depth data of the pixels in the first image to the application processing chip. The application processing chip is configured to receive the first image, the second image, and the first depth data of the pixels in the first image; convert the format of the first image to obtain the third image; convert the format of the second image to obtain the fourth image; determine the second depth data of the pixels in the third image based on the third image and the fourth image; correct the second depth data of the pixels in the third image based on the first depth data of the pixels in the first image; and perform blurring processing on the third image based on the corrected depth data of the pixels to obtain the first target image.

16. A terminal, characterized in that, The terminal includes an image processing chip, an application processing chip, and a first image sensor and a second image sensor located at different positions. The first image sensor, the second image sensor, and the application processing chip are respectively communicatively connected to the image processing chip. The first image sensor is used to acquire a first image; The second image sensor is used to acquire a second image. The first image and the second image are acquired at the same time. The first image and the second image are in the original image data format. The image processing chip is configured to, in response to an image capture request, acquire the first image and the second image, determine the first depth data of the pixels in the first image based on the first image and the second image, perform a blurring process on the first image based on the first depth data of the pixels in the first image to obtain an eighth image, and send the first image, the second image and the eighth image to the application processing chip. The application processing chip is configured to receive the first image, the second image, and the eighth image; convert the format of the first image to obtain the third image; convert the format of the second image to obtain the fourth image; determine the second depth data of the pixels in the third image based on the third image and the fourth image; perform a blurring process on the third image based on the second depth data of the pixels in the third image to obtain the ninth image; and replace the pixels in the ninth image that do not meet the target quality conditions with the corresponding pixels in the eighth image to obtain the first target image.

17. An application processing chip, characterized in that, The application processing chip includes programmable logic circuits and / or program instructions. When the application processing chip is running on a terminal, it is used to implement the image processing method as described in any one of claims 1 to 4, or the image processing method as described in claim 9.

18. An image processing chip, characterized in that, The image processing chip includes programmable logic circuits and / or program instructions, which, when running on a terminal, are used to implement the image processing method as described in any one of claims 5 to 8, or the image processing method as described in claim 10.

19. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is executed by the application processing chip to implement the image processing method as described in any one of claims 1 to 4, or the image processing method as described in claim 9; or, the at least one piece of program code is executed by the image processing chip to implement the image processing method as described in any one of claims 5 to 8, or the image processing method as described in claim 10.

20. A computer program product, comprising a computer program, characterized in that, The computer program is executed by an application processing chip to implement the image processing method as described in any one of claims 1 to 4, or the image processing method as described in claim 9; or, the computer program is executed by an image processing chip to implement the image processing method as described in any one of claims 5 to 8, or the image processing method as described in claim 10.

Citation Information

Patent Citations

  • Image processing method, image processing device and mobile terminal

    CN108769545A