Image processing method and device

By adjusting the feature information of the material in the image processing method to match the feature information of the target image, the picture quality problem caused by the difference in the picture quality between the material and the image is solved, and the natural fusion of the material and the image quality improvement is achieved.

CN113012085BActive Publication Date: 2025-01-03VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110291394.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-18
Publication Date
2025-01-03
Estimated Expiration
2041-03-18

AI Technical Summary

Technical Problem

In the prior art, the overall picture quality of the composite image is poor due to the large difference between the added material and the image itself.

Method used

In the image processing method, the sub-image corresponding to the material in the target image is determined, the feature information of the material and the target image is obtained, including resolution and blur, and the feature information of the material is adjusted to match the feature information of the target image, so that the material can be realized Natural fusion with images.

Benefits of technology

The overall picture quality of the composite image is improved, so that the added materials are blended naturally with the image itself, and the picture quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113012085B_ABST
    Figure CN113012085B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method and electronic device, which belongs to the field of electronic technology, in order to solve the problem in the prior art that the overall quality of the synthesized image is poor due to the large difference in image quality between the added material and the image itself. The method includes: when adding a first sub-image to a target image, determining a second sub-image in the target image corresponding to the first sub-image; obtaining first image feature information and second image feature information, wherein the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image; adjusting the first image feature information to match the second image feature information; wherein the image feature information includes at least one of resolution and blur. The image processing method in the present application is applied to electronic devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic technology, and specifically relates to an image processing method and device. Background Art

[0002] With the development of electronic technology, image processing functions are becoming more and more powerful to meet users' needs for image processing.

[0003] For example, a user can add a material from one picture to another picture by cutting out the material. Furthermore, the user can stretch and enlarge the cut-out material to fit the layout of the scenery in the new picture. In the above process, the quality of the synthesized picture is poor because the cut-out material is stretched and enlarged, or the resolution of the original picture where the cut-out material is located is low.

[0004] It can be seen that in the prior art, the overall quality of the synthesized image is poor due to the large difference in quality between the added material and the image itself. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an image processing method that can solve the problem in the prior art that the overall image quality of the synthesized image is poor due to the large difference in image quality between the added material and the image itself.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising: when a first sub-image is added to a target image, determining a second sub-image in the target image corresponding to the first sub-image; acquiring first image feature information, and second image feature information, the first image feature information being image feature information corresponding to the first sub-image, and the second image feature information being image feature information corresponding to the target image; adjusting the first image feature information to match the second image feature information; wherein the image feature information includes at least one of resolution and blur.

[0008] In a second aspect, an embodiment of the present application provides an image processing device, comprising: a determination module, for determining a second sub-image in the target image corresponding to the first sub-image when a first sub-image is added to a target image; an acquisition module, for acquiring first image feature information, and second image feature information, wherein the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image; an adjustment module, for adjusting the first image feature information to match the second image feature information; wherein the image feature information includes at least one of resolution and blur.

[0009] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method of the first aspect.

[0010] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0011] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0012] Thus, in the embodiment of the present application, the application scenario that can be realized is, in the image processing function, the user obtains the first sub-image from the original image by cutting out the image, and then adds the first sub-image to the target image to synthesize the new target image. Among them, the user can scale the first sub-image in the target image to adapt to the scene layout of the target image. Thus, in the present embodiment, when the first sub-image is added to the target image, first, the second sub-image corresponding to the first sub-image in the target image is determined (the second sub-image can be a sub-image belonging to the same depth of field and the same position as the first sub-image); secondly, the first image feature information of the first sub-image and the second image feature information of the target image are obtained and analyzed; finally, the first image feature information is adjusted so that the adjusted first image feature information matches the second image feature information, wherein the second image feature information of the target image includes the image feature information of the second sub-image. Thus, the first sub-image can be naturally integrated into the target image. It can be seen that based on the image processing method of the present embodiment, the added material can be integrated with the image itself to improve the overall image quality of the synthesized image. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is a flowchart of an image processing method according to an embodiment of the present application;

[0014] Figure 2 to Figure 4 is an image schematic diagram of an embodiment of the present application;

[0015] Figure 5 is a block diagram of an image processing device according to an embodiment of the present application;

[0016] Figure 6 This is one of the hardware structure diagrams of the image processing device according to the embodiment of the present application.

[0017] Figure 7This is the second hardware structure diagram of the image processing device according to the embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0019] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0020] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0021] Figure 1 A flowchart of an image processing method according to an embodiment of the present application is shown. The method is applied to an electronic device. The method includes:

[0022] Step S1: when a first sub-image is added to a target image, a second sub-image corresponding to the first sub-image in the target image is determined.

[0023] In this step, the first sub-image may correspond to an original image.

[0024] Optionally, the first sub-image is obtained from the original image by cutting out the image.

[0025] For example, Figure 2 The original image is shown, which can be cut out manually by the user or automatically by image processing software to obtain Figure 2 Casserole 1 in the figure is used as the first sub-image.

[0026] In this embodiment, the user can add the first sub-image in the original image to the target image to synthesize a new target image.

[0027] For example, Figure 3 The target image is shown, and the user can Figure 2 The casserole 1 in the original image is added to Figure 3 A certain position of the desktop in the target image is selected to synthesize a new target image.

[0028] Application scenarios such as users from Figure 2 In the image shown, casserole 1 is taken as the first sub-image and then placed Figure 3 Further, the user can Figure 3 Size the tabletop in the image shown and resize Casserole 1 appropriately.

[0029] In this embodiment, when it is recognized that the first sub-image is added to the target image, image processing of the target image is started.

[0030] Optionally, after the user appropriately adjusts the size of the first sub-image, the image processing method in this embodiment is automatically performed.

[0031] Optionally, after the user appropriately adjusts the size of the first sub-image, the user clicks a "fusion" control to perform the image processing method in this embodiment.

[0032] In the image processing method of this embodiment, the second sub-image in the target image is firstly identified.

[0033] Optionally, based on the target image, the system automatically identifies an original scene that is on the same horizontal line as the first sub-image as the second sub-image.

[0034] See also Figure 4 As shown in the schematic diagram of equal-horizontal lines, in the target image, the first sub-image is used as a reference, and the image corresponding to the scene at the same depth of field is used as the second sub-image.

[0035] Optionally, the second sub-image has the same depth of field information as the first sub-image, and the second sub-image has the same position information as the first sub-image in the target image.

[0036] For example, a sub-image having the same depth of field information as the first sub-image is identified in the target image; and a sub-image having an overlapping area with the first sub-image greater than a certain threshold is further identified as the second sub-image.

[0037] It can be understood that: when the overlapping area of ​​the second sub-image and the first sub-image is greater than a certain threshold, it means that the first sub-image completely or partially covers the second sub-image, and the positions of the two sub-images in the target image are the same.

[0038] In this step, by determining the second sub-image corresponding to the first sub-image in the target image, some image features of the first sub-image can be adjusted with reference to the second sub-image, so that the first sub-image and the associated sub-image are naturally integrated.

[0039] In addition, before identifying the second sub-image in the target image, the size of the first sub-image is automatically adjusted based on the public visual experience so that the size of the first sub-image adapts to the size of the target image, thereby improving the image quality of the target image from the display effect of image size.

[0040] Step S2: Acquire first image feature information and second image feature information.

[0041] The first image feature information is the image feature information corresponding to the first sub-image, and the second image feature information is the image feature information corresponding to the target image.

[0042] The image feature information includes at least one of resolution and blur.

[0043] In this embodiment, the second image feature information includes image feature information of the second sub-image and image feature information of other sub-images in the target image except the second sub-image.

[0044] In this embodiment, the resolution of the first sub-image can be adjusted according to the image feature information of the second sub-image so that the resolution of the first sub-image matches the resolution of the second sub-image, so that the first sub-image and the second sub-image, as well as the target image where the first sub-image and the second sub-image are located, are naturally integrated; or, the blurriness of the first sub-image can be adjusted so that the blurriness of the first sub-image matches the blurriness of the second sub-image, so that the first sub-image and the second sub-image, as well as the target image where the first sub-image and the second sub-image are located, are naturally integrated.

[0045] The above application scenario is common in which: the image feature information of the second sub-image is inconsistent with the image feature information of other sub-images, and the first sub-image is directly associated with the second sub-image.

[0046] In this embodiment, the resolution of the first sub-image can be adjusted according to the image feature information of other sub-images so that the resolution of the first sub-image matches the resolution of other sub-images, so that the first sub-image is naturally integrated with the target image; or, the blurriness of the first sub-image can be adjusted so that the blurriness of the first sub-image matches the blurriness of other sub-images, so that the first sub-image is naturally integrated with the target image.

[0047] The above application scenario is common in which: the image feature information of the second sub-image is inconsistent with the image feature information of other sub-images, and the first sub-image is indirectly associated with the second sub-image through other sub-images.

[0048] In this embodiment, the resolution of the first sub-image can be adjusted according to the overall image feature information of the target image so that the resolution of the first sub-image matches the resolution of the target image, so that the first sub-image and the target image are naturally integrated; or, the blurriness of the first sub-image can be adjusted so that the blurriness of the first sub-image matches the blurriness of the target image, so that the first sub-image and the target image are naturally integrated.

[0049] The above application scenario is often used when the image feature information of the second sub-image is consistent with the image feature information of other sub-images.

[0050] In more embodiments, the image feature information may also include clarity, contrast, sharpness, color, noise, brightness, and other information associated with image quality.

[0051] Correspondingly, the clarity, contrast, sharpness, color, noise, brightness, etc. of the first sub-image can be adjusted so that the image features of the first sub-image match the image features of the target image, so that the first sub-image and the target image are naturally integrated.

[0052] Therefore, in this step, after acquiring the first image feature information and the second image feature information, the first image feature information and the second image feature information are analyzed to prepare for the next step of adjustment.

[0053] Step S3: Adjust the first image feature information to match the second image feature information.

[0054] Optionally, the manner of adjusting the first image feature information includes super-resolution processing, blur processing, etc.

[0055] For example, the resolution of the target image is significantly higher than that of the first sub-image, and thus the resolution of the first sub-image can be made close to or consistent with the resolution of the target image by performing super-resolution processing on the first sub-image.

[0056] For another example, the blurriness of the target image is significantly higher than that of the first sub-image, and thus the blurriness of the first sub-image can be made close to or consistent with the blurriness of the target image by blurring the first sub-image.

[0057] Optionally, the method of adjusting the first image feature information also includes denoising processing, deblurring processing, etc.

[0058] Optionally, the interpretation of matching in this embodiment includes but is not limited to: based on the second image feature information, adjusting the first image feature information to be consistent or close to the second image feature information; based on the second image feature information, adjusting the first image feature information to have a specified relationship with the second image feature information, such as a specified gradient relationship.

[0059] The use of the second image feature information as a standard at least includes: using the image feature information of the second sub-image as a standard, using the image feature information of other sub-images as a standard, and using the overall image feature information of the target image as a standard.

[0060] It can be seen that in this step, based on the adjustment of the first image feature information, the first image feature information can be matched with the second image feature information, so that the first sub-image is better integrated into the target image, thereby ensuring the high quality of the target image.

[0061] Thus, in the embodiment of the present application, the application scenario that can be realized is, in the image processing function, the user obtains the first sub-image from the original image by cutting out the image, and then adds the first sub-image to the target image to synthesize the new target image. Among them, the user can scale the first sub-image in the target image to adapt to the scene layout of the target image. Thus, in the present embodiment, when the first sub-image is added to the target image, first, the second sub-image corresponding to the first sub-image in the target image is determined (the second sub-image can be a sub-image belonging to the same depth of field and the same position as the first sub-image); secondly, the first image feature information of the first sub-image and the second image feature information of the target image are obtained and analyzed; finally, the first image feature information is adjusted so that the adjusted first image feature information matches the second image feature information, wherein the second image feature information of the target image includes the image feature information of the second sub-image. Thus, the first sub-image can be naturally integrated into the target image. It can be seen that based on the image processing method of the present embodiment, the added material can be integrated with the image itself to improve the overall image quality of the synthesized image.

[0062] In the embodiment of the present application, the first image feature information and the second image feature information are not matched by default, so the first image feature information can be adjusted based on the image processing method in the present embodiment until the two match.

[0063] In other embodiments, if the first image feature information matches the second image feature information, a new target image is directly output without adjusting the first image feature information.

[0064] In the process of the image processing method of another embodiment of the present application, step S3 includes:

[0065] Sub-step A1: If the second blurriness of the second sub-image is greater than or equal to the first threshold, adjusting the first blurriness of the first sub-image to match the second blurriness.

[0066] Optionally, the manner of adjusting the first blurriness of the first sub-image includes: performing blur processing on the first sub-image.

[0067] The blurring process in this embodiment is the blurring process, and correspondingly, the blurring degree is the blurring degree.

[0068] In the case of this embodiment, in the target image, the second blurriness of the second sub-image is greater than or equal to the first threshold, that is, the second sub-image is blurred. Therefore, in order to make the first sub-image merge naturally with the corresponding second sub-image, the first sub-image can be blurred at the same level as the second sub-image.

[0069] In this case, before the blurring process, the relationship between the first blurriness of the first sub-image and the second blurriness of the second sub-image is not restricted. The first blurriness of the first sub-image can be greater than the second blurriness of the second sub-image, or the first blurriness of the first sub-image can be less than the second blurriness of the second sub-image.

[0070] Optionally, the first threshold is a lowest level of blurriness.

[0071] Correspondingly, when the second blurriness is greater than or equal to the first threshold, it means that the second blurriness of the second sub-image is greater than or equal to the lowest level of blurriness, that is, the second sub-image has been blurred. In order to make the first sub-image and the second sub-image blend naturally, the first sub-image needs to be blurred at the same level.

[0072] In this embodiment, the second blurriness of the second sub-image is judged. If the second blurriness of the second sub-image is greater than or equal to the first threshold, it is considered that the second sub-image is blurred and the second sub-image is definitely not the focus of the target image. The first blurriness of the first sub-image is adjusted to match the first blurriness of the first sub-image with the second blurriness of the second sub-image, so that the fusion of the first sub-image and the target image is more natural, and the new target image looks more natural and harmonious, thereby improving the image quality of the composite image.

[0073] In the process of the image processing method of another embodiment of the present application, step S3 includes:

[0074] Sub-step B1: If there is a part in the target image whose blurriness is greater than or equal to the first threshold, and the second blurriness of the second sub-image is less than the first threshold, then when the second resolution of the second sub-image is greater than the first resolution of the first sub-image, super-resolution is performed on the first sub-image to adjust the first resolution to match the second resolution.

[0075] In the case of this embodiment, in the target image, there is a part whose blurriness is greater than or equal to the first threshold value, and this part is blurred, but the second blurriness of the second sub-image is less than the first threshold value, and the second sub-image is clear. In order to make the first sub-image and the second sub-image blend naturally, the first sub-image can be super-resolution processed so that the resolution of the first sub-image and the second sub-image are consistent, so that the first sub-image and the uncovered part of the second sub-image can be used as the focus area of ​​the target image and are clearly displayed in the target image.

[0076] In this case, before super-resolution processing, the first resolution of the first sub-image is lower than the second resolution of the second sub-image, that is, the first sub-image is blurrier than the second sub-image, so that the first sub-image can be super-resolution processed to improve the first resolution of the first sub-image.

[0077] In addition, if the first resolution of the first sub-image is higher than the second resolution of the second sub-image, the first resolution of the first sub-image can be kept unchanged, so that the first sub-image can be used as the focus area of ​​the target image and clearly displayed in the target image.

[0078] In addition, in this embodiment, according to the actual layout of the target image, when there is a part in the target image whose blurriness is greater than or equal to the first threshold value, and the second blurriness of the second sub-image is less than the first threshold value, if the second sub-image is the focus area of ​​the target image, the first blurriness of the first sub-image is adjusted to be consistent with the blurriness of the corresponding part of the target image to highlight the second sub-image, so that the second sub-image is clearly displayed in the target image as the focus area of ​​the target image; at the same time, the blurred first sub-image is naturally integrated with the part outside the focus area.

[0079] In this case, before the blurring process, the relationship between the blurriness of the first sub-image and the blurriness of the corresponding part of the target image is not restricted. The blurriness of the first sub-image can be greater than the blurriness of the corresponding part of the target image, or the blurriness of the first sub-image can be less than the blurriness of the corresponding part of the target image.

[0080] Optionally, the first threshold is a lowest level of blurriness.

[0081] Correspondingly, when the blurriness of a part in the target image is greater than or equal to the first threshold, it means that the part in the target image has been blurred; when the second blurriness of the second sub-image is less than the first threshold, it means that the second blurriness of the second sub-image is less than the lowest level of blurriness, that is, the second sub-image has not been blurred and the image is clear. In order to make the first sub-image and the second sub-image blend naturally, it is necessary to perform super-resolution processing on the first sub-image to improve the resolution.

[0082] In this embodiment, if the target image has a blurred part, the second blurriness of the second sub-image is judged. If the second blurriness of the second sub-image is less than the first threshold, it is considered that the second sub-image is clear (the part where the focus is), and the resolution of the first sub-image is adjusted to make the first resolution of the first sub-image match the second resolution of the second sub-image, so that the fusion of the first sub-image and the target image is more natural, and looks more natural and harmonious, thereby improving the image quality of the composite image.

[0083] In the process of the image processing method of another embodiment of the present application, step S3 includes:

[0084] Sub-step C1: If the blurriness of the target image is less than a first threshold, adjusting the first resolution of the first sub-image to match the second resolution of the second sub-image.

[0085] In the case of this embodiment, the overall blurriness of the target image is less than the first threshold value, the target image is clear as a whole, and the target image as a whole corresponds to one resolution, that is, the second resolution of the second sub-image is the resolution of the target image. In order to make the first sub-image and the target image merge naturally as a whole, the first resolution of the first sub-image can be adjusted so that the resolution of the first sub-image is consistent with that of the target image as a whole.

[0086] In this case, before adjusting the resolution, the first resolution of the first sub-image is lower than the resolution of the target image, that is, the first sub-image is blurrier than the target image, so the first sub-image can be super-resolution processed to improve the first resolution of the first sub-image.

[0087] In addition, before adjusting the resolution, the first resolution of the first sub-image is higher than the resolution of the target image, that is, the first sub-image is clearer than the target image, so the first sub-image can be processed to reduce the resolution.

[0088] Optionally, the explanation of the first threshold in this embodiment may refer to the explanation of the first threshold in the aforementioned embodiment, which will not be repeated here.

[0089] In this embodiment, the second blurriness of the second sub-image can be judged. If the second blurriness of the second sub-image is less than the first threshold value, the second sub-image is considered to be clear. At the same time, the blurriness of other parts of the target image is analyzed. If the blurriness of other parts is consistent with the second blurriness of the second sub-image, the target image as a whole is considered to be clear, so that the first resolution of the first sub-image is adjusted so that the first sub-image reaches the second resolution of the target image as a whole. In this way, the first sub-image and the second sub-image are naturally integrated, and also naturally integrated with the target image as a whole, to obtain a new target image, which looks more natural and harmonious, thereby improving the image quality of the composite image.

[0090] In the process of the image processing method of another embodiment of the present application, step S1 includes:

[0091] Sub-step D1: Determine the portion of the target image that overlaps with the first sub-image by more than a second threshold as the second sub-image.

[0092] The second threshold can be customized. The larger the second threshold is, when the condition is met, the larger the overlapping area between the first sub-image and the second sub-image is, and the greater the probability that the two belong to the same position area; conversely, the smaller the second threshold is, when the condition is met, the smaller the overlapping area between the first sub-image and the second sub-image is, and the smaller the probability that the two belong to the same position area.

[0093] In this embodiment, when the second sub-image in the target image overlaps with the first sub-image and exceeds the second threshold, it means that the first sub-image and the second sub-image are located in the same position area in the target image. Therefore, the first sub-image and the second sub-image have the same depth of field information and the same position, and the first sub-image and the second sub-image can be regarded as scenes on the same horizontal line. In order to make the synthesized new target image look more realistic, this embodiment uses the second sub-image as a reference and adjusts the image feature information of the first sub-image so that the image can reflect the real shooting scene, thereby improving the image quality of the synthesized image.

[0094] In summary, in the embodiments of the present application, on the one hand, when cutting out and merging a new image, the size and resolution of the cutout part will be automatically adjusted according to the size of the cutout object and the size of the merged area, so that the new image layout is suitable and the picture is clear; on the other hand, after the cutout and merge, the background blur processing of the original scene on the same horizontal line in the merged picture is automatically obtained, and then the cutout part is blurred at the same level to make the whole picture look more harmonious. It can be seen that in the embodiments of the present application, after the cutout and merge, no matter how the picture size changes, the background blur processing of the original scene on the same horizontal line of the cutout object can be diagnosed in advance, so that the cutout object can be pre-processed according to the diagnosis result, and the cutout object is kept as close or consistent as possible with the original object, so that the picture quality can be guaranteed.

[0095] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the image processing method. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the image processing device of the image processing method provided in the embodiment of the present application.

[0096] Figure 5 A block diagram of an image processing device according to another embodiment of the present application is shown, comprising:

[0097] A determination module 10, configured to determine a second sub-image in the target image corresponding to the first sub-image when the first sub-image is added to the target image;

[0098] An acquisition module 20, configured to acquire first image feature information and second image feature information, wherein the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image;

[0099] An adjustment module 30, used to adjust the first image feature information to match the second image feature information;

[0100] The image feature information includes at least one of resolution and blur.

[0101] Thus, in the embodiment of the present application, the application scenario that can be realized is, in the image processing function, the user obtains the first sub-image from the original image by cutting out the image, and then adds the first sub-image to the target image to synthesize the new target image. Among them, the user can scale the first sub-image in the target image to adapt to the scene layout of the target image. Thus, in the present embodiment, when the first sub-image is added to the target image, first, the second sub-image corresponding to the first sub-image in the target image is determined (the second sub-image can be a sub-image belonging to the same depth of field and the same position as the first sub-image); secondly, the first image feature information of the first sub-image and the second image feature information of the target image are obtained and analyzed; finally, the first image feature information is adjusted so that the adjusted first image feature information matches the second image feature information, wherein the second image feature information of the target image includes the image feature information of the second sub-image. Thus, the first sub-image can be naturally integrated into the target image. It can be seen that based on the image processing method of the present embodiment, the added material can be integrated with the image itself to improve the overall image quality of the synthesized image.

[0102] Optionally, the adjustment module 30 is specifically configured to adjust the first blurriness of the first sub-image to match the second blurriness if the second blurriness of the second sub-image is greater than or equal to the first threshold.

[0103] Optionally, the adjustment module 30 is specifically used to perform super-resolution processing on the first sub-image and adjust the first resolution to match the second resolution if there is a part in the target image whose blurriness is greater than or equal to the first threshold and the second blurriness of the second sub-image is less than the first threshold, when the second resolution of the second sub-image is greater than the first resolution of the first sub-image.

[0104] Optionally, the adjustment module 30 is specifically configured to adjust the first resolution of the first sub-image to match the second resolution of the second sub-image if the blurriness of the target image is less than a first threshold.

[0105] Optionally, the determination module 10 is specifically configured to determine a portion of the target image that overlaps with the first sub-image by more than a second threshold as the second sub-image.

[0106] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0107] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0108] The image processing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0109] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 100, including a processor 101, a memory 102, and a program or instruction stored in the memory 102 and executable on the processor 101. When the program or instruction is executed by the processor 101, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0110] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0111] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0112] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0113] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0114] Among them, the processor 1010 is used to determine a second sub-image in the target image corresponding to the first sub-image when the first sub-image is added to the target image; obtain first image feature information and second image feature information, the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image; adjust the first image feature information to match the second image feature information; wherein the image feature information includes at least one of resolution and blur.

[0115] Thus, in the embodiment of the present application, the application scenario that can be realized is, in the image processing function, the user obtains the first sub-image from the original image by cutting out the image, and then adds the first sub-image to the target image to synthesize the new target image. Among them, the user can scale the first sub-image in the target image to adapt to the scene layout of the target image. Thus, in the present embodiment, when the first sub-image is added to the target image, first, the second sub-image corresponding to the first sub-image in the target image is determined (the second sub-image can be a sub-image belonging to the same depth of field and the same position as the first sub-image); secondly, the first image feature information of the first sub-image and the second image feature information of the target image are obtained and analyzed; finally, the first image feature information is adjusted so that the adjusted first image feature information matches the second image feature information, wherein the second image feature information of the target image includes the image feature information of the second sub-image. Thus, the first sub-image can be naturally integrated into the target image. It can be seen that based on the image processing method of the present embodiment, the added material can be integrated with the image itself to improve the overall image quality of the synthesized image.

[0116] Optionally, the processor 1010 is further configured to adjust the first blurriness of the first sub-image to match the second blurriness if the second blurriness of the second sub-image is greater than or equal to a first threshold.

[0117] Optionally, the processor 1010 is further used to, if there is a part in the target image whose blurriness is greater than or equal to a first threshold, and the second blurriness of the second sub-image is less than the first threshold, then, when the second resolution of the second sub-image is greater than the first resolution of the first sub-image, perform super-resolution on the first sub-image and adjust the first resolution to match the second resolution.

[0118] Optionally, the processor 1010 is further configured to adjust a first resolution of the first sub-image to match a second resolution of the second sub-image if the blurriness of the target image is less than a first threshold.

[0119] Optionally, the processor 1010 is further configured to determine a portion of the target image that overlaps with the first sub-image by more than a second threshold as the second sub-image.

[0120] In summary, in the embodiments of the present application, on the one hand, when cutting out and merging a new image, the size and resolution of the cutout part will be automatically adjusted according to the size of the cutout object and the size of the merged area, so that the new image layout is suitable and the picture is clear; on the other hand, after the cutout and merge, the background blur processing of the original scene on the same horizontal line in the merged picture is automatically obtained, and then the cutout part is blurred at the same level to make the whole picture look more harmonious. It can be seen that in the embodiments of the present application, after the cutout and merge, no matter how the picture size changes, the background blur processing of the original scene on the same horizontal line of the cutout object can be diagnosed in advance, so that the cutout object can be pre-processed according to the diagnosis result, and the cutout object is kept as close or consistent as possible with the original object, so that the picture quality can be guaranteed.

[0121] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1009 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010.

[0122] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0123] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0124] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0125] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0126] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0128] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image processing method, characterized in that: The method comprises: In the case where the first sub-image is added to the target image, determining a second sub-image in the target image corresponding to the first sub-image; the second sub-image is a sub-image in the target image having the same depth of field and the same position as the first sub-image; Acquire first image feature information and second image feature information, wherein the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image; Adjusting the first image feature information to match the second image feature information; The image feature information includes at least one of resolution and blur; the second image feature information includes image feature information of the second sub-image; The adjusting the first image feature information to match the second image feature information includes: adjusting the blurriness of the first sub-image to match the blurriness of the second sub-image, and / or adjusting the resolution of the first sub-image to match the resolution of the second sub-image.

2. The method according to claim 1, characterized in that: The adjusting the first image feature information to match the second image feature information includes: If the second blurriness of the second sub-image is greater than or equal to the first threshold, the first blurriness of the first sub-image is adjusted to match the second blurriness.

3. The method according to claim 1, characterized in that The adjusting the first image feature information to match the second image feature information includes: If there is a part in the target image whose blurriness is greater than or equal to a first threshold, and the second blurriness of the second sub-image is less than the first threshold, then when the second resolution of the second sub-image is greater than the first resolution of the first sub-image, super-resolution processing is performed on the first sub-image to adjust the first resolution to match the second resolution.

4. The method according to claim 1, characterized in that: The adjusting the first image feature information to match the second image feature information includes: If the blurriness of the target image is less than a first threshold, the first resolution of the first sub-image is adjusted to match the second resolution of the second sub-image.

5. The method according to claim 1, characterized in that: The determining a second sub-image in the target image corresponding to the first sub-image includes: A portion of the target image that overlaps with the first sub-image by more than a second threshold is determined as the second sub-image.

6. An image processing device, characterized in that: The device comprises: a determination module, configured to determine, when a first sub-image is added to a target image, a second sub-image in the target image corresponding to the first sub-image; the second sub-image being a sub-image in the target image having the same depth of field and the same position as the first sub-image; an acquisition module, used to acquire first image feature information and second image feature information, wherein the first image feature information is image feature information corresponding to the first sub-image, and the second image feature information is image feature information corresponding to the target image; An adjustment module, used for adjusting the first image feature information to match the second image feature information; The image feature information includes at least one of resolution and blur; the second image feature information includes image feature information of the second sub-image; The adjustment module is specifically used to adjust the blurriness of the first sub-image to match the blurriness of the second sub-image, and / or adjust the resolution of the first sub-image to match the resolution of the second sub-image.

7. The device according to claim 6, characterized in that The adjustment module is specifically configured to adjust the first blurriness of the first sub-image to match the second blurriness if the second blurriness of the second sub-image is greater than or equal to a first threshold.

8. The device according to claim 6, characterized in that The adjustment module is specifically used to, if there is a part in the target image whose blurriness is greater than or equal to a first threshold, and the second blurriness of the second sub-image is less than the first threshold, then, if the second resolution of the second sub-image is greater than the first resolution of the first sub-image, perform super-resolution processing on the first sub-image and adjust the first resolution to match the second resolution.

9. The device according to claim 6, characterized in that The adjustment module is specifically configured to adjust the first resolution of the first sub-image to match the second resolution of the second sub-image if the blurriness of the target image is less than a first threshold.

10. The device according to claim 6, characterized in that include: The determination module is specifically configured to determine a portion of the target image that overlaps with the first sub-image by more than a second threshold as the second sub-image.