[go: up one dir, main page]

CN110796600A - Image superdivision reconstruction method, image superdivision reconstruction device and electronic equipment - Google Patents

Image superdivision reconstruction method, image superdivision reconstruction device and electronic equipment Download PDF

Info

Publication number
CN110796600A
CN110796600A CN201911037652.1A CN201911037652A CN110796600A CN 110796600 A CN110796600 A CN 110796600A CN 201911037652 A CN201911037652 A CN 201911037652A CN 110796600 A CN110796600 A CN 110796600A
Authority
CN
China
Prior art keywords
image
processed
preview image
scene
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911037652.1A
Other languages
Chinese (zh)
Other versions
CN110796600B (en
Inventor
何慕威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911037652.1A priority Critical patent/CN110796600B/en
Publication of CN110796600A publication Critical patent/CN110796600A/en
Priority to PCT/CN2020/123345 priority patent/WO2021083059A1/en
Application granted granted Critical
Publication of CN110796600B publication Critical patent/CN110796600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

本申请公开了一种图像超分重建方法、图像超分重建装置、电子设备及计算机可读存储介质,其中,该方法包括:获取预览图像;若所述预览图像中存在待处理目标,则对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,其中,所述待处理目标为满足预设条件的目标;对所述待处理图像进行超分重建,得到处理后图像;将所述处理后图像与所述场景图像进行融合,得到新的预览图像。通过本申请方案,可针对性的提升拍摄目标的清晰度,同时能够减少电子设备的处理数据量。

Figure 201911037652

The present application discloses an image super-resolution reconstruction method, an image super-resolution reconstruction device, an electronic device and a computer-readable storage medium, wherein the method includes: acquiring a preview image; if there is a target to be processed in the preview image, The preview image is divided to obtain a to-be-processed image including the to-be-processed object and a scene image not including the to-be-processed target, wherein the to-be-processed target is a target that satisfies a preset condition; Perform super-resolution reconstruction on the image to obtain a processed image; and fuse the processed image with the scene image to obtain a new preview image. Through the solution of the present application, the definition of the shooting target can be improved in a targeted manner, and at the same time, the amount of data processed by the electronic device can be reduced.

Figure 201911037652

Description

一种图像超分重建方法、图像超分重建装置及电子设备Image superdivision reconstruction method, image superdivision reconstruction device and electronic equipment

技术领域technical field

本申请属于图像处理技术领域,尤其涉及一种图像超分重建方法、图像超分重建装置、电子设备及计算机可读存储介质。The present application belongs to the technical field of image processing, and in particular, relates to an image superdivision reconstruction method, an image superdivision reconstruction device, an electronic device, and a computer-readable storage medium.

背景技术Background technique

人们在较为恶劣的拍摄场景下使用电子设备进行拍摄时,往往会出现拍摄目标不够清晰的情况。为了保障拍摄所得的图像的清晰度,用户可以通过电子设备对拍摄所得的图像整体进行超分重建。然而,这种超分重建的方式难以实现对拍摄目标的针对性处理。When people use electronic equipment to shoot in harsh shooting scenes, the shooting target is often not clear enough. In order to ensure the clarity of the captured image, the user can perform super-resolution reconstruction on the entire captured image through an electronic device. However, this super-resolution reconstruction method is difficult to achieve targeted processing of the shooting target.

发明内容SUMMARY OF THE INVENTION

本申请提供了一种图像超分重建方法、图像超分重建装置、电子设备及计算机可读存储介质,可针对性的提升拍摄目标的清晰度。The present application provides an image super-division reconstruction method, an image super-division reconstruction device, an electronic device and a computer-readable storage medium, which can specifically improve the clarity of a shooting target.

第一方面,本申请实施例提供了一种图像超分重建方法,包括:In a first aspect, an embodiment of the present application provides an image super-resolution reconstruction method, including:

获取预览图像;get a preview image;

若所述预览图像中存在待处理目标,则对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,其中,所述待处理目标为满足预设条件的目标;If there is an object to be processed in the preview image, segment the preview image to obtain an image to be processed including the object to be processed and a scene image not including the object to be processed, wherein the object to be processed To meet the target of the preset conditions;

对所述待处理图像进行超分重建,得到处理后图像;Perform super-resolution reconstruction on the to-be-processed image to obtain a processed image;

将所述处理后图像与所述场景图像进行融合,得到新的预览图像。The processed image and the scene image are fused to obtain a new preview image.

第二方面,本申请实施例提供了一种图像超分重建装置,包括:In a second aspect, an embodiment of the present application provides an image superdivision reconstruction device, including:

获取单元,用于获取预览图像;The acquisition unit is used to acquire the preview image;

分割单元,用于若所述预览图像中存在待处理目标,则对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,其中,所述待处理目标为满足预设条件的目标;a segmentation unit, configured to segment the preview image if there is an object to be processed in the preview image to obtain an image to be processed including the object to be processed and a scene image not including the object to be processed, wherein, The to-be-processed target is a target that satisfies a preset condition;

处理单元,用于对所述待处理图像进行超分重建,得到处理后图像;a processing unit, configured to perform super-resolution reconstruction on the to-be-processed image to obtain a processed image;

融合单元,用于将所述处理后图像与所述场景图像进行融合,得到新的预览图像。A fusion unit, configured to fuse the processed image with the scene image to obtain a new preview image.

第三方面,本申请实施例提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面所述的方法。In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program The method as described in the first aspect above is implemented.

第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to the first aspect is implemented.

第五方面,本申请实施例还提供了一种计算机程序产品,当上述计算机程序产品在电子设备上运行时,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application further provides a computer program product, which implements the method described in the first aspect when the computer program product is run on an electronic device.

上可见,在本申请方案中,电子设备在获取到预览图像后,若上述预览图像中存在有待处理目标,则会对预览图像进行分割,以得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,并仅对待处理图像进行超分重建,减少了超分重建时的处理数据量,并在最后将所述处理后图像与所述场景图像进行融合,得到新的预览图像,可针对性的提升拍摄目标的清晰度。It can be seen from the above that in the solution of the present application, after the electronic device obtains the preview image, if there is a target to be processed in the above-mentioned preview image, the preview image will be segmented, so as to obtain the to-be-processed image including the target to be processed and the non-processed image. The scene image containing the target to be processed, and only the to-be-processed image is subjected to super-resolution reconstruction, which reduces the amount of processing data during super-resolution reconstruction, and finally fuses the processed image with the scene image to obtain a new image. The preview image can be targeted to improve the clarity of the shooting target.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1是本申请实施例提供的图像超分重建方法的实现流程示意图;FIG. 1 is a schematic diagram of an implementation flowchart of an image superdivision reconstruction method provided by an embodiment of the present application;

图2-1是本申请实施例提供的图像超分重建方法中,目标检测框与待处理图像框的示意图;2-1 is a schematic diagram of a target detection frame and a to-be-processed image frame in the image super-score reconstruction method provided by the embodiment of the present application;

图2-2是本申请实施例提供的图像超分重建方法中,目标检测框与待处理图像框的另一示意图;2-2 is another schematic diagram of a target detection frame and a to-be-processed image frame in the image super-score reconstruction method provided by the embodiment of the present application;

图3-1是本申请实施例提供的图像超分重建方法中,待处理图像的示意图;3-1 is a schematic diagram of an image to be processed in the image super-resolution reconstruction method provided by an embodiment of the present application;

图3-2是本申请实施例提供的图像超分重建方法中,场景图像的示意图;3-2 is a schematic diagram of a scene image in the image super-resolution reconstruction method provided by an embodiment of the present application;

图4是本申请实施例提供的图像超分重建方法中,重叠区域的示意图;FIG. 4 is a schematic diagram of an overlapping area in the image superdivision reconstruction method provided by an embodiment of the present application;

图5是本申请实施例提供的图像超分重建装置的示意图;5 is a schematic diagram of an image superdivision reconstruction apparatus provided by an embodiment of the present application;

图6是本申请实施例提供的电子设备的示意图。FIG. 6 is a schematic diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

为了说明本申请上述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the above-mentioned technical solutions of the present application, the following specific embodiments are used for description.

本申请实施例中的图像超分重建方法可应用于智能手机、平板电脑、数码相机等电子设备中,此处不作限定。下面以该图像超分重建方法应用于智能手机为例,对本申请实施例提供的一种图像超分重建方法进行描述,请参阅图1,包括:The image super-resolution reconstruction method in the embodiments of the present application can be applied to electronic devices such as smart phones, tablet computers, and digital cameras, which are not limited here. Taking the application of the image super-resolution reconstruction method to a smartphone as an example, an image super-resolution reconstruction method provided by an embodiment of the present application is described below, referring to FIG. 1 , including:

步骤101,获取预览图像;Step 101, obtaining a preview image;

在本申请实施例中,可通过电子设备所搭载的摄像头进行图像捕捉操作,以获得预览图像,其中,上述摄像头可以是前置摄像头,也可以是后置摄像头,此处不作限定。In this embodiment of the present application, an image capture operation may be performed through a camera mounted on the electronic device to obtain a preview image, wherein the camera may be a front camera or a rear camera, which is not limited here.

步骤102,若上述预览图像中存在待处理目标,则对上述预览图像进行分割,得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像;Step 102, if there is a to-be-processed object in the above-mentioned preview image, the above-mentioned preview image is divided to obtain a to-be-processed image including the above-mentioned to-be-processed target and a scene image that does not include the above-mentioned to-be-processed target;

在本申请实施例中,上述待处理目标为满足预设条件的目标。可选地,可以是在获取预览图像后,就在上述电子设备的屏幕上显示该预览图像,若接收到用户对该预览图像的点击指令,则可以将上述点击指令的输入坐标位置处的目标确定为待处理目标;或者,也可以是由电子设备智能检测该预览图像是否存在待处理目标,此处不作限定。也即,上述待处理目标可以是用户所确定的,也可以是电子设备智能确定的。在确定上述预览图像中存在有待处理目标时,即可对上述预览图像进行分割,得到待处理图像,该待处理图像中包含有上述待处理目标;同时还可得到场景图像,上述场景图像中不包含上述待处理目标。In this embodiment of the present application, the above-mentioned target to be processed is a target that satisfies a preset condition. Optionally, after obtaining the preview image, the preview image can be displayed on the screen of the above-mentioned electronic device, and if a user's click instruction on the preview image is received, the target at the input coordinate position of the above-mentioned click instruction can be displayed. It is determined as the target to be processed; alternatively, the electronic device can also intelligently detect whether there is a target to be processed in the preview image, which is not limited here. That is, the above-mentioned target to be processed may be determined by the user, or may be determined intelligently by the electronic device. When it is determined that there is an object to be processed in the preview image, the preview image can be segmented to obtain an image to be processed, and the image to be processed includes the object to be processed; at the same time, a scene image can be obtained. Contains the above pending targets.

步骤103,对上述待处理图像进行超分重建,得到处理后图像;Step 103, performing super-resolution reconstruction on the above-mentioned to-be-processed image to obtain a processed image;

在本申请实施例中,为实现对待处理目标的针对性处理,此处仅对上述包含待处理目标的待处理图像进行超分重建处理。具体地,可通过预设的超分辨率算法对上述待处理图像进行处理,得到超分辨率处理后的图像,该超分辨率处理后的图像的宽度和高度均为原待处理图像的N倍,N的取值为2或4;随后,再对超分辨率处理后的图像使用双线性插值方法,即可得到与待处理图像的尺寸相同的图像,该图像即为对上述待处理图像进行超分重建后的处理后图像。In this embodiment of the present application, in order to achieve targeted processing of the target to be processed, only the above-mentioned to-be-processed image containing the target to be processed is subjected to super-score reconstruction processing. Specifically, the above-mentioned to-be-processed image can be processed through a preset super-resolution algorithm to obtain a super-resolution processed image, where the width and height of the super-resolution processed image are both N times the original to-be-processed image. , the value of N is 2 or 4; then, the bilinear interpolation method is used for the super-resolution processed image to obtain an image of the same size as the image to be processed, which is the same as the image to be processed. The processed image after super-resolution reconstruction.

步骤104,将上述处理后图像与上述场景图像进行融合,得到新的预览图像。Step 104 , fuse the above-mentioned processed image with the above-mentioned scene image to obtain a new preview image.

在本申请实施例中,在得到上述处理后图像后,可将上述处理后图像与上述场景图像进行融合,融合后的图像即为新的预览图像,并将该新的预览图像显示在电子设备的屏幕中,供用户查阅。由于处理后图像与待处理图像的尺寸完全一致,而待处理图像是从原来的预览图像中分割所得,因而,可基于待处理图像在原来的预览图像中的位置,以及场景图像在原来的预览图像中的位置,实现对处理后图像与场景图像的融合。可选地,在得到新的预览图像后,电子设备的屏幕即不再显示原来的预览图像,而是显示上述新的预览图像。In the embodiment of the present application, after the above-mentioned processed image is obtained, the above-mentioned processed image and the above-mentioned scene image can be fused, the fused image is a new preview image, and the new preview image is displayed on the electronic device screen for the user to view. Since the size of the processed image is exactly the same as that of the to-be-processed image, and the to-be-processed image is obtained by segmenting the original preview image, the location of the to-be-processed image in the original preview image and the scene image in the original preview image can be The position in the image to realize the fusion of the processed image and the scene image. Optionally, after a new preview image is obtained, the screen of the electronic device no longer displays the original preview image, but displays the above-mentioned new preview image.

可选地,考虑到电子设备在夜景中进行拍摄时,由于夜景中光线较暗,导致用户拍摄清晰图像的难度上升,因而,上述图像超分重建方法可基于夜景这一应用场景进行优化,则在上述步骤101之后,上述图像超分重建方法包括:Optionally, considering that when the electronic device is shooting in the night scene, the light in the night scene is dark, which makes it difficult for the user to capture a clear image. Therefore, the above-mentioned image super-resolution reconstruction method can be optimized based on the application scenario of the night scene, then After the above-mentioned step 101, the above-mentioned image super-resolution reconstruction method includes:

A1、检测上述预览图像的拍摄场景是否为夜景;A1. Detect whether the shooting scene of the above-mentioned preview image is a night scene;

其中,在获取到预览图像后,电子设备可以对上述预览图像的灰度信息进行分析,以确定该预览图像的拍摄场景是否为夜景。具体地,上述步骤A1包括:Wherein, after acquiring the preview image, the electronic device may analyze the grayscale information of the preview image to determine whether the shooting scene of the preview image is a night scene. Specifically, the above step A1 includes:

B1、计算上述预览图像的灰度平均值;B1. Calculate the grayscale average value of the above-mentioned preview image;

其中,在获取到预览图像的各个像素点的灰度值之后,可以继续对这些像素点的灰度值进行均值计算,以得到上述预览图像的灰度平均值。Wherein, after the gray value of each pixel point of the preview image is acquired, the average value calculation of the gray value of these pixel points may be continued to obtain the gray average value of the preview image.

B2、将上述预览图像的灰度平均值与预设的第一灰度平均值阈值进行比对;B2, compare the grayscale average value of the above-mentioned preview image with the preset first grayscale average value threshold;

其中,电子设备可以预先设定一第一灰度平均值阈值,当然,该第一灰度平均值阈值也可由用户根据实际需求再进行更改,此处不作限定。The electronic device may preset a first grayscale average threshold. Of course, the first grayscale average threshold can also be changed by the user according to actual needs, which is not limited here.

B3、若上述预览图像的灰度平均值小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景为夜景;B3. If the grayscale average value of the above-mentioned preview image is less than the above-mentioned first grayscale average value threshold, then determine that the shooting scene of the above-mentioned preview image is a night scene;

B4、若上述预览图像的灰度平均值不小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景不为夜景。B4. If the grayscale average value of the preview image is not less than the first grayscale average value threshold, it is determined that the shooting scene of the preview image is not a night scene.

其中,灰度值为0时为全黑,灰度值为255时为全白,因而,上述预览图像的灰度平均值越小,则认为该预览图像的拍摄场景越暗。当上述预览图像的灰度平均值小于上述第一灰度平均值阈值时,即可确定上述预览图像的拍摄场景为夜景;当上述预览图像的灰度平均值不小于上述第一灰度平均值阈值时,即可确定上述预览图像的拍摄场景不为夜景。Wherein, when the grayscale value is 0, it is completely black, and when the grayscale value is 255, it is completely white. Therefore, the smaller the grayscale average value of the preview image is, the darker the shooting scene of the preview image is. When the grayscale average value of the preview image is less than the first grayscale average value threshold, it can be determined that the shooting scene of the preview image is a night scene; when the grayscale average value of the preview image is not less than the first grayscale average value When the threshold value is set, it can be determined that the shooting scene of the above-mentioned preview image is not a night scene.

A2、若上述预览图像的拍摄场景为夜景,则检测上述预览图像中是否存在待处理目标。A2. If the shooting scene of the preview image is a night scene, detect whether there is an object to be processed in the preview image.

其中,当确定上述预览图像的拍摄场景为夜景时,即可检测上述预览图像中是否存在待处理目标,也即满足预设条件的目标。具体地,该检测上述预览图像中是否存在待处理目标的步骤包括:Wherein, when it is determined that the shooting scene of the preview image is a night scene, it can be detected whether there is a target to be processed in the preview image, that is, a target that satisfies a preset condition. Specifically, the step of detecting whether there is an object to be processed in the preview image includes:

C1、对上述预览图像进行目标检测,得到上述预览图像所包含的一个以上目标;C1, performing target detection on the above-mentioned preview image to obtain more than one target contained in the above-mentioned preview image;

其中,当确定预览图像的拍摄场景为夜景时,可进一步对该预览图像进行目标检测,得到预览图像所包含的一个或多个目标。考虑到上述目标有多种类型,而用户可能仅关心其中的某几种类型的目标,因而,可以在对上述预览图像进行目标检测后,对所得到的目标进行筛选,仅保留用户感兴趣的目标类型。例如,在日常的拍摄过程中,人物是最常见的拍摄对象,因而,可以将上述用户感兴趣的目标类型设定为人脸,则在这种应用场景下,上述步骤C1可具体表现为对预览图像进行人脸检测,以得到预览图像所包含的一个或多个人脸。当然,用户也可以根据具体的拍摄需求,自行修改上述感兴趣的目标类型,此处不作限定。Wherein, when it is determined that the shooting scene of the preview image is a night scene, target detection may be further performed on the preview image to obtain one or more targets included in the preview image. Considering that there are many types of the above targets, and the user may only care about some types of targets, therefore, after the target detection is performed on the above preview image, the obtained targets can be screened, and only the ones that the user is interested in are retained. target type. For example, in the daily shooting process, people are the most common shooting objects. Therefore, the target type that the user is interested in can be set as a human face. In this application scenario, the above step C1 can be embodied as a preview of the The image is subjected to face detection to obtain one or more faces contained in the preview image. Of course, the user can also modify the above-mentioned target type of interest by himself according to specific shooting requirements, which is not limited here.

C2、计算所有目标的灰度平均值;C2. Calculate the average gray level of all targets;

其中,在得到上述预览图像所包含的一个以上目标后,即可获取各个目标的像素点的灰度值,并以此对这些像素点的灰度值均值计算,以得到所有目标的灰度平均值。需要注意的是,此处不是以单个目标为单位进行灰度平均值的计算,而是以所有目标为一个整体进行灰度平均值的计算。Wherein, after obtaining more than one target included in the above-mentioned preview image, the gray value of the pixel points of each target can be obtained, and then the average value of the gray value of these pixel points can be calculated to obtain the average gray value of all targets. value. It should be noted that the gray average value is not calculated on a single target, but the gray average value is calculated on all targets as a whole.

C3、将所有目标的灰度平均值与预设的第二灰度平均值阈值进行比对;C3, compare the grayscale average value of all targets with the preset second grayscale average value threshold;

其中,电子设备可以预先设定一第二灰度平均值阈值,当然,该第二灰度平均值阈值也可由用户根据实际需求再进行更改,此处不作限定。The electronic device can preset a second grayscale average threshold. Of course, the second grayscale average threshold can also be changed by the user according to actual needs, which is not limited here.

C4、若所有目标的灰度平均值小于上述第二灰度平均值阈值,则将所有目标均确定为上述待处理目标。C4. If the average grayscale value of all the targets is less than the above-mentioned second threshold value of the grayscale average value, all the targets are determined as the above-mentioned target to be processed.

其中,若基于上述所有目标所计算得到的灰度平均值小于上述第二灰度平均值阈值,则认为这些目标在上述预览图像中的亮度较暗,难以呈现给用户好的拍摄体验,基于此,可以将这些目标均确定为待处理目标。例如,假定在夜景的拍摄场景下,用户感兴趣的目标类型为人脸,则电子设备将检测预览图像中是否存在人脸,若存在多个人脸,则继续计算该多个人脸的灰度平均值,并与上述第二灰度平均值阈值进行比对,若这多个人脸的灰度平均值小于上述第二灰度平均值阈值,则将这多个人脸均确定为待处理目标。Wherein, if the average grayscale value calculated based on all the above-mentioned targets is smaller than the above-mentioned second grayscale average value threshold, it is considered that the brightness of these targets in the above-mentioned preview image is relatively dark, and it is difficult to present a good shooting experience to the user. Based on this , these targets can be determined as pending targets. For example, assuming that in the shooting scene of a night scene, the target type of interest to the user is a human face, the electronic device will detect whether there is a human face in the preview image, and if there are multiple human faces, continue to calculate the grayscale average value of the multiple human faces , and compared with the above-mentioned second grayscale average value threshold, if the grayscale average value of these multiple faces is less than the above-mentioned second grayscale average value threshold, then these multiple human faces are all determined as the target to be processed.

可选地,上述对上述预览图像进行分割,得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像的步骤,具体包括:Optionally, the above-mentioned steps of dividing the above-mentioned preview image to obtain the to-be-processed image including the above-mentioned target to be processed and the scene image not including the above-mentioned target to be processed specifically include:

D1、获取上述待处理目标的目标检测框;D1. Obtain the target detection frame of the above-mentioned target to be processed;

其中,在对进行目标检测的过程中,会生成多个目标检测框。因而,在本步骤,可以获取上述待处理目标的目标检测框,并以此作为后续分割的基础。当然,若上述待处理目标是用户所确定的,则可以在基于用户所输入的点击指令确定待处理目标后,生成一目标检测框将该待处理目标框入其中。一般情况下,该目标检测框为矩形,当然,根据目标检测所采用的算法的不同,上述目标检测框也可以为多边形,此处不作限定。具体地,当目标为人脸时,上述目标检测框即为人脸检测框。Among them, in the process of target detection, a plurality of target detection frames will be generated. Therefore, in this step, the target detection frame of the above-mentioned target to be processed can be obtained and used as the basis for subsequent segmentation. Of course, if the above target to be processed is determined by the user, after determining the target to be processed based on the click instruction input by the user, a target detection frame can be generated to frame the target to be processed. Generally, the target detection frame is a rectangle. Of course, according to different algorithms used for target detection, the above target detection frame may also be a polygon, which is not limited here. Specifically, when the target is a face, the above-mentioned target detection frame is the face detection frame.

D2、基于上述目标检测框,在上述预览图像中设定待处理图像框;D2. Based on the above-mentioned target detection frame, set the to-be-processed image frame in the above-mentioned preview image;

其中,上述待处理图像框与上述目标检测框的形状相同,且上述待处理图像框的尺寸大于上述目标检测框的尺寸,且上述待处理图像框的每一边界分别与上述目标检测框的对应边界平行,且上述待处理图像框的每一边界分别与上述目标检测框的对应边界间隔预设的距离。如图2-1及图2-2所示,图2-1为目标检测框为矩形时,所对应设定的待处理图像框的示意图;图2-2为目标检测框为六边形时,所对应设定的待处理图像框的示意图。可见,目标检测框与对应设定的待处理图像框的距离保持为一固定值。The shape of the image frame to be processed is the same as the shape of the target detection frame, and the size of the image frame to be processed is larger than the size of the target detection frame, and each boundary of the image frame to be processed corresponds to the target detection frame. The boundaries are parallel, and each boundary of the image frame to be processed is separated from the corresponding boundary of the target detection frame by a preset distance. As shown in Figure 2-1 and Figure 2-2, Figure 2-1 is a schematic diagram of the corresponding image frame to be processed when the target detection frame is a rectangle; Figure 2-2 is when the target detection frame is a hexagon , a schematic diagram of the corresponding set to-be-processed image frame. It can be seen that the distance between the target detection frame and the correspondingly set image frame to be processed is kept as a fixed value.

D3、将上述待处理图像框之内的图像确定为待处理图像;D3, determining the image within the above-mentioned to-be-processed image frame as the to-be-processed image;

其中,以预览图像为基础,当在预览图像中设定好待处理图像框之后,将上述待处理图像框之内的图像确定为待处理图像,也即,该待处理图像框为待处理图像的边缘。以目标检测框为矩形为例,如图3-1所示,上述待处理图像框之外为阴影部分,将该阴影部分剔除后,所保留的即为待处理图像。Wherein, based on the preview image, after the image frame to be processed is set in the preview image, the image in the image frame to be processed is determined as the image to be processed, that is, the image frame to be processed is the image to be processed the edge of. Taking the target detection frame as a rectangle as an example, as shown in Figure 3-1, the shadow part outside the frame of the image to be processed is the shadow part. After the shadow part is removed, the image to be processed is what remains.

D4、将上述目标检测框之外的图像确定为场景图像。D4. Determine the image outside the target detection frame as a scene image.

其中,以预览图像为基础,将上述目标检测框之外的图像确定为场景图像,也即,该目标检测框为待处理图像的内边缘,预览图像的原边缘为待处理图像的外边缘。仍以目标检测框为矩形为例,如图3-2所示,上述目标检测框之内为阴影部分,将该阴影部分剔除后,所保留的即为场景图像。Wherein, based on the preview image, the image outside the target detection frame is determined as the scene image, that is, the target detection frame is the inner edge of the image to be processed, and the original edge of the preview image is the outer edge of the image to be processed. Still taking the target detection frame as a rectangle as an example, as shown in Figure 3-2, the above target detection frame is the shadow part. After the shadow part is removed, the scene image remains.

可选地,为了更好的对场景图像及处理后图像进行融合,上述图像超分重建方法还包括:Optionally, in order to better fuse the scene image and the processed image, the above-mentioned image superdivision reconstruction method further includes:

E1、获取上述待处理图像框的各个顶点在上述预览图像中的坐标;E1, obtain the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image;

其中,处理后图像实际为对待处理图像进行了超分重建操作后所得到的图像,因而,该处理后图像与待处理图像的形状大小完全一致。为了实现处理后图像与场景图像的融合,可以先获取上述待处理图像框的各个顶点在上述预览图像中的坐标,该待处理图像框的各个顶点在上述预览图像中的坐标即为处理后图像的各个顶点在预览图像中的坐标。需要注意的是,该坐标是以图像坐标系为基础所得到的坐标,也即,是以图像的左上顶点为坐标系原点,以像素为单位构建的坐标系,像素的横坐标u与纵坐标v分别是在图像数组中所在的列数与所在行数。The processed image is actually an image obtained by performing a super-resolution reconstruction operation on the to-be-processed image. Therefore, the processed image and the to-be-processed image have exactly the same shape and size. In order to realize the fusion of the processed image and the scene image, the coordinates of each vertex of the image frame to be processed in the preview image can be obtained first, and the coordinates of each vertex of the image frame to be processed in the preview image are the processed image. The coordinates of each vertex in the preview image. It should be noted that the coordinates are obtained based on the image coordinate system, that is, the coordinate system constructed in pixels with the upper left vertex of the image as the origin of the coordinate system, the abscissa u and the ordinate of the pixel. v is the number of columns and rows in the image array, respectively.

相应地,上述步骤104,包括:Correspondingly, the above step 104 includes:

E2、基于上述待处理图像框的各个顶点在上述预览图像中的坐标,将上述处理后图像与上述场景图像重叠,得到重叠区域;E2, based on the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image, overlapping the above-mentioned processed image and the above-mentioned scene image to obtain an overlapping area;

其中,由于场景图像的外边缘即为原来的预览图像的边缘,因而,预览图像与场景图像的图像坐标系是完全重合的。基于此,根据上述待处理图像框的各个顶点在上述预览图像中的坐标,即可确定上述处理后图像的各个顶点在上述场景图像中的坐标。如图4所示,实线部分所组成的是场景图像,虚线部分所组成的是处理后图像,场景图像与处理后图像之间存在一重叠区域,也即阴影部分。实际上,在进行图像分割时即可看出,目标检测框构成了该重叠区域的内边缘,待处理图像框构成了该重叠区域的外边缘。Wherein, since the outer edge of the scene image is the edge of the original preview image, the image coordinate systems of the preview image and the scene image are completely coincident. Based on this, according to the coordinates of each vertex of the image frame to be processed in the preview image, the coordinates of each vertex of the processed image in the scene image can be determined. As shown in FIG. 4 , the solid line part constitutes the scene image, and the dotted line part constitutes the processed image. There is an overlapping area between the scene image and the processed image, that is, the shadow part. In fact, when performing image segmentation, it can be seen that the target detection frame constitutes the inner edge of the overlapping area, and the image frame to be processed constitutes the outer edge of the overlapping area.

E3、基于上述重叠区域,对上述场景图像与上述处理后图像的边缘进行融合,得到新的预览图像。E3. Based on the overlapping area, fuse the edge of the scene image and the processed image to obtain a new preview image.

其中,重叠区域外的部分均无需再做其它处理,也即,场景图像中,重叠区域外的像素点保持不变;处理后图像中,重叠区域外的像素点也保持不变。仅对重叠区域的像素点进行融合处理,使得上述场景图像的内边缘区域能够与上述处理后图像的边缘区域进行融合,以此得到新的预览图像。具体地,上述步骤E3包括:The parts outside the overlapping area do not need to be further processed, that is, in the scene image, the pixels outside the overlapping area remain unchanged; in the processed image, the pixels outside the overlapping area also remain unchanged. Only the pixels in the overlapping area are fused, so that the inner edge area of the scene image can be fused with the edge area of the processed image, so as to obtain a new preview image. Specifically, the above step E3 includes:

F1、针对上述重叠区域的任一像素点,获取上述像素点在上述场景图像中的灰度值,记为第一灰度值,并获取上述像素点在上述处理后图像中的灰度值,记为第二灰度值;F1. For any pixel in the overlapping area, obtain the gray value of the pixel in the scene image, denoted as the first gray value, and obtain the gray value of the pixel in the processed image, is recorded as the second gray value;

其中,由于该重叠区域既存在于场景图像中,也存在与处理后图像中,因而,针对上述重叠区域的任一像素点,都将去获取该像素点在上述场景图像中的灰度值,记为第一灰度值,并同时获取该上述像素点在上述处理后图像中的灰度值,记为第二灰度值,以作为后续融合的基础。Among them, since the overlapping area exists in both the scene image and the processed image, for any pixel in the overlapping area, the gray value of the pixel in the scene image will be obtained, and record is the first gray value, and at the same time, the gray value of the above-mentioned pixel point in the above-mentioned processed image is obtained, which is recorded as the second gray value, which is used as the basis for subsequent fusion.

F2、计算上述第一灰度值及第二灰度值的灰度平均值;F2. Calculate the grayscale average value of the first grayscale value and the second grayscale value;

F3、将上述第一灰度值及第二灰度值的灰度平均值确定为融合后的上述像素点的灰度值。F3. Determine the grayscale average value of the first grayscale value and the second grayscale value as the grayscale value of the pixel point after fusion.

以下通过具体实例说明上述步骤F1至F3:假定重叠区域的一像素点P1在场景图像中的灰度值为X1,在处理后图像中的灰度值为X2,对X1及X2求取灰度平均值,并对该灰度平均值进行取整处理,得到灰度值X3,则融合后的上述像素点的灰度值即为X3。通过上述过程,使得重叠区域的各个像素点均为基于场景图像及处理后图像的对应像素点融合而得。这样一来,最后所得到的新的预览图像,实际由三部分组成:其一是待处理图像框之外,未经任何处理的场景图像的部分;其二是目标检测框之内,经过超分重建处理的处理后图像的部分;其三是待处理图像框与目标检测框之间,融合了场景图像及处理后图像的重叠区域的部分。The above steps F1 to F3 are described below with specific examples: Assume that the gray value of a pixel point P1 in the overlapping area is X1 in the scene image, and the gray value in the processed image is X2, and the gray value of X1 and X2 is obtained. The average value of the grayscale is rounded to obtain the grayscale value X3, and the grayscale value of the above-mentioned pixel point after fusion is X3. Through the above process, each pixel point in the overlapping area is obtained by fusion based on the scene image and the corresponding pixel point of the processed image. In this way, the finally obtained new preview image actually consists of three parts: one is the part of the scene image outside the image frame to be processed without any processing; The third is the part of the overlapping area of the scene image and the processed image that is fused between the image frame to be processed and the target detection frame.

由上可见,通过本申请实施例,在获取到预览图像后,若上述预览图像中存在有待处理目标,则会对预览图像进行分割,以得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,并仅对待处理图像进行超分重建,减少了超分重建时的处理数据量,并在最后将上述处理后图像与上述场景图像进行融合,得到新的预览图像,实现对拍摄目标的清晰度的针对性提升。As can be seen from the above, through the embodiment of the present application, after the preview image is obtained, if there is an object to be processed in the preview image, the preview image will be segmented to obtain an image to be processed that includes the object to be processed and an image that does not include the object to be processed. The scene image of the target to be processed, and only the to-be-processed image is subjected to super-resolution reconstruction, which reduces the amount of processing data during super-resolution reconstruction, and finally the above-mentioned processed image and the above-mentioned scene image are fused to obtain a new preview image. Targeted enhancement of the clarity of the shooting target.

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

对应于上文所提出的图像超分重建方法,下面对本申请实施例提供的一种图像超分重建装置进行描述,请参阅图5,上述图像超分重建装置5包括:Corresponding to the image super-division reconstruction method proposed above, an image super-division reconstruction apparatus provided by an embodiment of the present application is described below. Please refer to FIG. 5 . The above-mentioned image super-division reconstruction apparatus 5 includes:

获取单元501,用于获取预览图像;an acquisition unit 501, used to acquire a preview image;

分割单元502,用于若上述预览图像中存在待处理目标,则对上述预览图像进行分割,得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,其中,上述待处理目标为满足预设条件的目标;The segmentation unit 502 is configured to segment the preview image if there is an object to be processed in the preview image to obtain an image to be processed including the object to be processed and a scene image that does not include the object to be processed, wherein the object to be processed is obtained. The target is the target that satisfies the preset conditions;

处理单元503,用于对上述待处理图像进行超分重建,得到处理后图像;A processing unit 503, configured to perform super-resolution reconstruction on the above-mentioned to-be-processed image to obtain a processed image;

融合单元504,用于将上述处理后图像与上述场景图像进行融合,得到新的预览图像。The fusion unit 504 is configured to fuse the above-mentioned processed image and the above-mentioned scene image to obtain a new preview image.

可选地,上述图像超分重建装置5还包括:Optionally, the above-mentioned image super-division reconstruction device 5 also includes:

夜景检测单元,用于在上述获取预览图像之后,检测上述预览图像的拍摄场景是否为夜景;a night scene detection unit, configured to detect whether the shooting scene of the above-mentioned preview image is a night scene after the above-mentioned acquisition of the preview image;

待处理目标检测单元,用于若上述预览图像的拍摄场景为夜景,则检测上述预览图像中是否存在待处理目标。The to-be-processed target detection unit is configured to detect whether there is a to-be-processed target in the above-mentioned preview image if the shooting scene of the above-mentioned preview image is a night scene.

可选地,上述夜景检测单元,包括:Optionally, the above-mentioned night scene detection unit includes:

第一计算子单元,用于计算上述预览图像的灰度平均值;a first calculation subunit, used for calculating the grayscale average value of the above-mentioned preview image;

第一比对子单元,用于将上述预览图像的灰度平均值与预设的第一灰度平均值阈值进行比对;a first comparison subunit, configured to compare the grayscale average value of the above-mentioned preview image with a preset first grayscale average value threshold;

夜景判断子单元,用于若上述预览图像的灰度平均值小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景为夜景;a night scene judgment subunit, configured to determine that the shooting scene of the preview image is a night scene if the average grayscale value of the preview image is less than the first grayscale average value threshold;

上述夜景判断子单元,还用于若上述预览图像的灰度平均值不小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景不为夜景。The night scene judging subunit is further configured to determine that the shooting scene of the preview image is not a night scene if the average grayscale value of the preview image is not less than the first grayscale average value threshold.

可选地,上述待处理目标检测单元,包括:Optionally, the above-mentioned target detection unit to be processed includes:

目标检测子单元,用于对上述预览图像进行目标检测,得到上述预览图像所包含的一个以上目标;a target detection subunit, configured to perform target detection on the above-mentioned preview image to obtain one or more targets contained in the above-mentioned preview image;

第二计算子单元,用于计算所有目标的灰度平均值;The second calculation subunit is used to calculate the gray average value of all targets;

第二比对子单元,用于将所有目标的灰度平均值与预设的第二灰度平均值阈值进行比对;The second comparison subunit is used to compare the grayscale average value of all targets with a preset second grayscale average value threshold;

待处理目标确定子单元,用于若所有目标的灰度平均值小于上述第二灰度平均值阈值,则将所有目标均确定为上述待处理目标。The to-be-processed target determination subunit is configured to determine all the targets as the above-mentioned to-be-processed targets if the grayscale average value of all the targets is smaller than the above-mentioned second grayscale average value threshold.

可选地,上述分割单元502,包括:Optionally, the above-mentioned dividing unit 502 includes:

目标检测框获取子单元,用于获取上述待处理目标的目标检测框;a target detection frame obtaining subunit, used to obtain the target detection frame of the above-mentioned target to be processed;

待处理图像框设定子单元,用于基于上述目标检测框,在上述预览图像中设定待处理图像框,其中,上述待处理图像框与上述目标检测框的形状相同,上述待处理图像框的每一边界分别与上述目标检测框的对应边界平行,且上述待处理图像框的每一边界分别与上述目标检测框的对应边界间隔预设的距离;The image frame setting subunit to be processed is used to set the image frame to be processed in the preview image based on the target detection frame, wherein the image frame to be processed has the same shape as the target detection frame, and the image frame to be processed has the same shape as the target detection frame. Each boundary of the above-mentioned target detection frame is respectively parallel to the corresponding boundary of the above-mentioned target detection frame, and each boundary of the above-mentioned to-be-processed image frame is separated from the corresponding boundary of the above-mentioned target detection frame by a preset distance;

待处理图像确定子单元,用于将上述待处理图像框之内的图像确定为待处理图像;a to-be-processed image determination subunit, configured to determine the image within the above-mentioned to-be-processed image frame as the to-be-processed image;

场景图像确定子单元,用于将上述目标检测框之外的图像确定为场景图像。The scene image determination subunit is used to determine the image outside the target detection frame as the scene image.

可选地,上述图像超分重建装置还包括:Optionally, the above-mentioned image super-resolution reconstruction device further includes:

坐标获取单元,用于获取上述待处理图像框的各个顶点在上述预览图像中的坐标;a coordinate acquiring unit, used for acquiring the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image;

相应地,上述融合单元504,包括:Correspondingly, the above-mentioned fusion unit 504 includes:

重叠区域获取子单元,用于基于上述待处理图像框的各个顶点在上述预览图像中的坐标,将上述处理后图像与上述场景图像重叠,得到重叠区域;an overlapping area acquisition subunit, configured to overlap the above-mentioned processed image with the above-mentioned scene image based on the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image to obtain an overlapping area;

重叠区域融合子单元,用于基于上述重叠区域,对上述场景图像与上述处理后图像的边缘进行融合,得到新的预览图像。The overlapping area fusion subunit is configured to fuse the edges of the above-mentioned scene image and the above-mentioned processed image based on the above-mentioned overlapping area to obtain a new preview image.

可选地,上述重叠区域融合子单元,包括:Optionally, the above-mentioned overlapping region fusion subunit includes:

灰度获取子单元,用于针对上述重叠区域的任一像素点,获取上述像素点在上述场景图像中的灰度值,记为第一灰度值,并获取上述像素点在上述处理后图像中的灰度值,记为第二灰度值;The grayscale acquisition subunit is used for obtaining the grayscale value of the pixel point in the scene image for any pixel point in the overlapping area, which is recorded as the first grayscale value, and obtains the processed image of the pixel point. The gray value in , denoted as the second gray value;

灰度计算子单元,用于计算上述第一灰度值及第二灰度值的灰度平均值;a grayscale calculation subunit, configured to calculate the grayscale average value of the first grayscale value and the second grayscale value;

灰度确定子单元,用于将上述第一灰度值及第二灰度值的灰度平均值确定为融合后的上述像素点的灰度值。The grayscale determination subunit is configured to determine the grayscale average value of the first grayscale value and the second grayscale value as the grayscale value of the pixel point after fusion.

由上可见,通过本申请实施例,图像超分重建装置在获取到预览图像后,若上述预览图像中存在有待处理目标,则会对预览图像进行分割,以得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,并仅对待处理图像进行超分重建,减少了超分重建时的处理数据量,并在最后将上述处理后图像与上述场景图像进行融合,得到新的预览图像,实现对拍摄目标的清晰度的针对性提升。As can be seen from the above, through the embodiment of the present application, after obtaining the preview image, the image super-segmentation reconstruction device will segment the preview image if there is a target to be processed in the above-mentioned preview image, so as to obtain a to-be-processed image including the above-mentioned target to be processed. The image and the scene image that does not contain the above-mentioned target to be processed, and only the to-be-processed image is subjected to super-division reconstruction, which reduces the amount of processing data during super-division reconstruction. Finally, the above-mentioned processed image and the above-mentioned scene image are fused to obtain a new image. The preview image can achieve targeted improvement of the clarity of the shooting target.

本申请实施例还提供了一种电子设备,请参阅图6,本申请实施例中的电子设备6包括:存储器601,一个或多个处理器602(图6中仅示出一个)及存储在存储器601上并可在处理器上运行的计算机程序。其中:存储器601用于存储软件程序以及模块,处理器602通过运行存储在存储器601的软件程序以及单元,从而执行各种功能应用以及数据处理,以获取上述预设事件对应的资源。具体地,上述处理器602通过运行存储在存储器601的上述计算机程序时实现以下步骤:The embodiment of the present application also provides an electronic device, please refer to FIG. 6 , the electronic device 6 in the embodiment of the present application includes: a memory 601, one or more processors 602 (only one is shown in FIG. A computer program on memory 601 and executable on a processor. The memory 601 is used to store software programs and modules, and the processor 602 executes various functional applications and data processing by running the software programs and units stored in the memory 601 to obtain resources corresponding to the above preset events. Specifically, the above-mentioned processor 602 implements the following steps by running the above-mentioned computer program stored in the memory 601:

获取预览图像;get a preview image;

若上述预览图像中存在待处理目标,则对上述预览图像进行分割,得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,其中,上述待处理目标为满足预设条件的目标;If there is an object to be processed in the preview image, the preview image is segmented to obtain an image to be processed that includes the object to be processed and a scene image that does not include the object to be processed, wherein the object to be processed meets a preset condition The goal;

对上述待处理图像进行超分重建,得到处理后图像;Perform super-resolution reconstruction on the above-mentioned to-be-processed image to obtain a processed image;

将上述处理后图像与上述场景图像进行融合,得到新的预览图像。The above-mentioned processed image and the above-mentioned scene image are fused to obtain a new preview image.

假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,在上述获取预览图像之后,上述处理器602通过运行存储在存储器601的上述计算机程序时还实现以下步骤:Assuming that the above is the first possible implementation manner, in the second possible implementation manner provided on the basis of the first possible implementation manner, after the above-mentioned acquisition of the preview image, the above-mentioned processor 602 stores in the memory by running The above computer program of 601 also implements the following steps:

检测上述预览图像的拍摄场景是否为夜景;Detecting whether the shooting scene of the above-mentioned preview image is a night scene;

若上述预览图像的拍摄场景为夜景,则检测上述预览图像中是否存在待处理目标。If the shooting scene of the preview image is a night scene, it is detected whether there is an object to be processed in the preview image.

在上述第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,上述检测上述预览图像的拍摄场景是否为夜景,包括:In the third possible implementation manner provided on the basis of the above-mentioned second possible implementation manner, the above-mentioned detecting whether the shooting scene of the above-mentioned preview image is a night scene includes:

计算上述预览图像的灰度平均值;Calculate the grayscale average value of the above preview image;

将上述预览图像的灰度平均值与预设的第一灰度平均值阈值进行比对;Compare the grayscale average value of the above-mentioned preview image with the preset first grayscale average value threshold;

若上述预览图像的灰度平均值小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景为夜景;If the grayscale average value of the preview image is less than the first grayscale average value threshold, it is determined that the shooting scene of the preview image is a night scene;

若上述预览图像的灰度平均值不小于上述第一灰度平均值阈值,则确定上述预览图像的拍摄场景不为夜景。If the grayscale average value of the preview image is not less than the first grayscale average value threshold, it is determined that the shooting scene of the preview image is not a night scene.

在上述第二种可能的实施方式作为基础而提供的第四种可能的实施方式中,上述检测上述预览图像中是否存在待处理目标,包括:In the fourth possible implementation manner provided on the basis of the above-mentioned second possible implementation manner, the above-mentioned detecting whether there is an object to be processed in the above-mentioned preview image includes:

对上述预览图像进行目标检测,得到上述预览图像所包含的一个以上目标;Perform target detection on the above-mentioned preview image to obtain more than one target contained in the above-mentioned preview image;

计算所有目标的灰度平均值;Calculate the grayscale average of all targets;

将所有目标的灰度平均值与预设的第二灰度平均值阈值进行比对;Compare the grayscale average value of all targets with the preset second grayscale average value threshold;

若所有目标的灰度平均值小于上述第二灰度平均值阈值,则将所有目标均确定为上述待处理目标。If the average gray level of all the targets is less than the above-mentioned second threshold value of the gray average value, then all the targets are determined as the above-mentioned objects to be processed.

在上述第一种可能的实施方式作为基础,或者上述第二种可能的实施方式作为基础,或者上述第三种可能的实施方式作为基础,或者上述第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,上述对上述预览图像进行分割,得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,包括:Based on the above first possible implementation manner, or the above second possible implementation manner as a basis, or the above third possible implementation manner as a basis, or the above fourth possible implementation manner as a basis In a fifth possible implementation manner, the above-mentioned preview image is segmented to obtain a to-be-processed image including the above-mentioned to-be-processed target and a scene image that does not include the above-mentioned to-be-processed target, including:

获取上述待处理目标的目标检测框;Obtain the target detection frame of the above-mentioned target to be processed;

基于上述目标检测框,在上述预览图像中设定待处理图像框,其中,上述待处理图像框与上述目标检测框的形状相同,上述待处理图像框的每一边界分别与上述目标检测框的对应边界平行,且上述待处理图像框的每一边界分别与上述目标检测框的对应边界间隔预设的距离;Based on the above-mentioned target detection frame, a to-be-processed image frame is set in the above-mentioned preview image, wherein the above-mentioned to-be-processed image frame and the above-mentioned target detection frame have the same shape, and each boundary of the above-mentioned to-be-processed image frame is respectively the same as the above-mentioned target detection frame. The corresponding boundaries are parallel, and each boundary of the above-mentioned image frame to be processed is separated from the corresponding boundary of the above-mentioned target detection frame by a preset distance;

将上述待处理图像框之内的图像确定为待处理图像;Determining the image within the frame of the image to be processed as the image to be processed;

将上述目标检测框之外的图像确定为场景图像。An image outside the above target detection frame is determined as a scene image.

在上述第五种可能的实施方式作为基础而提供的第六种可能的实施方式中,上述处理器602通过运行存储在存储器601的上述计算机程序时还实现以下步骤:In the sixth possible implementation manner provided on the basis of the above-mentioned fifth possible implementation manner, the above-mentioned processor 602 further implements the following steps by running the above-mentioned computer program stored in the memory 601:

获取上述待处理图像框的各个顶点在上述预览图像中的坐标;Obtain the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image;

相应地,上述将上述处理后图像与上述场景图像进行融合,得到新的预览图像,包括:Correspondingly, the above-mentioned processed image and the above-mentioned scene image are fused to obtain a new preview image, including:

基于上述待处理图像框的各个顶点在上述预览图像中的坐标,将上述处理后图像与上述场景图像重叠,得到重叠区域;Based on the coordinates of each vertex of the above-mentioned to-be-processed image frame in the above-mentioned preview image, overlapping the above-mentioned processed image and the above-mentioned scene image to obtain an overlapping area;

基于上述重叠区域,对上述场景图像与上述处理后图像的边缘进行融合,得到新的预览图像。Based on the overlapping area, the edges of the scene image and the processed image are fused to obtain a new preview image.

在上述第六种可能的实施方式作为基础而提供的第七种可能的实施方式中,上述基于上述重叠区域,对上述场景图像与上述处理后图像的边缘进行融合,得到新的预览图像,包括:In the seventh possible implementation manner provided on the basis of the sixth possible implementation manner, based on the overlapping area, the edges of the scene image and the processed image are fused to obtain a new preview image, including :

针对上述重叠区域的任一像素点,获取上述像素点在上述场景图像中的灰度值,记为第一灰度值,并获取上述像素点在上述处理后图像中的灰度值,记为第二灰度值;For any pixel in the overlapping area, obtain the gray value of the pixel in the scene image, denoted as the first gray value, and obtain the gray value of the pixel in the processed image, denoted as the second gray value;

计算上述第一灰度值及第二灰度值的灰度平均值;Calculate the grayscale average value of the first grayscale value and the second grayscale value;

将上述第一灰度值及第二灰度值的灰度平均值确定为融合后的上述像素点的灰度值。The grayscale average value of the first grayscale value and the second grayscale value is determined as the grayscale value of the pixel point after fusion.

进一步,上述电子设备还可包括:一个或多个输入设备和一个或多个输出设备。存储器601、处理器602、输入设备和输出设备通过总线连接。Further, the above electronic device may further include: one or more input devices and one or more output devices. The memory 601, the processor 602, the input device and the output device are connected by a bus.

应当理解,在本申请实施例中,所称处理器602可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiments of the present application, the processor 602 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), special-purpose processors An integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

输入设备可以包括键盘、触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备可以包括显示器、扬声器等。The input device may include a keyboard, a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and direction information of the fingerprint), a microphone, and the like, and the output device may include a display, a speaker, and the like.

存储器601可以包括只读存储器和随机存取存储器,并向处理器602提供指令和数据。存储器601的一部分或全部还可以包括非易失性随机存取存储器。例如,存储器601还可以存储设备类型的信息。Memory 601 may include read-only memory and random access memory, and provides instructions and data to processor 602 . Part or all of memory 601 may also include non-volatile random access memory. For example, the memory 601 may also store device type information.

由上可见,通过本申请实施例,电子设备在获取到预览图像后,若上述预览图像中存在有待处理目标,则会对预览图像进行分割,以得到包含上述待处理目标的待处理图像及不包含上述待处理目标的场景图像,并仅对待处理图像进行超分重建,减少了超分重建时的处理数据量,并在最后将上述处理后图像与上述场景图像进行融合,得到新的预览图像,实现对拍摄目标的清晰度的针对性提升。As can be seen from the above, through the embodiment of the present application, after the electronic device obtains the preview image, if there is a target to be processed in the above-mentioned preview image, the preview image will be segmented to obtain the above-mentioned target to be processed. The scene image containing the above-mentioned target to be processed, and only the to-be-processed image is subjected to super-resolution reconstruction, which reduces the amount of processing data during super-resolution reconstruction, and finally the above-mentioned processed image and the above-mentioned scene image are fused to obtain a new preview image , to achieve a targeted improvement of the clarity of the shooting target.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the above device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者外部设备软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the system embodiments described above are only illustrative. For example, the division of the above-mentioned modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Either it can be integrated into another system, or some features can be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读存储介质可以包括:能够携带上述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机可读存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,上述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括是电载波信号和电信信号。If the above-mentioned integrated units are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above-mentioned embodiments, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium. The computer program When executed by a processor, the steps of each of the above method embodiments can be implemented. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code form, executable file or some intermediate form. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer-readable memory, a read-only memory (ROM, Read-Only Memory) ), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer-readable storage Excluded from the medium are electrical carrier signals and telecommunication signals.

以上上述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that the above-mentioned embodiments can still be used for The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the present application. within the scope of protection of the application.

Claims (10)

1.一种图像超分重建方法,其特征在于,包括:1. an image super-resolution reconstruction method, is characterized in that, comprises: 获取预览图像;get a preview image; 若所述预览图像中存在待处理目标,则对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,其中,所述待处理目标为满足预设条件的目标;If there is an object to be processed in the preview image, segment the preview image to obtain an image to be processed including the object to be processed and a scene image not including the object to be processed, wherein the object to be processed To meet the target of the preset conditions; 对所述待处理图像进行超分重建,得到处理后图像;Perform super-resolution reconstruction on the to-be-processed image to obtain a processed image; 将所述处理后图像与所述场景图像进行融合,得到新的预览图像。The processed image and the scene image are fused to obtain a new preview image. 2.如权利要求1所述的图像超分重建方法,其特征在于,在所述获取预览图像之后,所述图像超分重建方法还包括:2. The image super-resolution reconstruction method according to claim 1, characterized in that, after the acquisition of the preview image, the image super-resolution reconstruction method further comprises: 检测所述预览图像的拍摄场景是否为夜景;Detecting whether the shooting scene of the preview image is a night scene; 若所述预览图像的拍摄场景为夜景,则检测所述预览图像中是否存在待处理目标。If the shooting scene of the preview image is a night scene, it is detected whether there is an object to be processed in the preview image. 3.如权利要求2所述的图像超分重建方法,其特征在于,所述检测所述预览图像的拍摄场景是否为夜景,包括:3. The image super-resolution reconstruction method according to claim 2, wherein the detecting whether the shooting scene of the preview image is a night scene, comprising: 计算所述预览图像的灰度平均值;calculating the grayscale average value of the preview image; 将所述预览图像的灰度平均值与预设的第一灰度平均值阈值进行比对;comparing the grayscale average value of the preview image with a preset first grayscale average value threshold; 若所述预览图像的灰度平均值小于所述第一灰度平均值阈值,则确定所述预览图像的拍摄场景为夜景;If the grayscale average value of the preview image is less than the first grayscale average value threshold, determining that the shooting scene of the preview image is a night scene; 若所述预览图像的灰度平均值不小于所述第一灰度平均值阈值,则确定所述预览图像的拍摄场景不为夜景。If the grayscale average value of the preview image is not less than the first grayscale average value threshold, it is determined that the shooting scene of the preview image is not a night scene. 4.如权利要求2所述的图像超分重建方法,其特征在于,所述检测所述预览图像中是否存在待处理目标,包括:4. The image super-resolution reconstruction method according to claim 2, wherein the detecting whether there is an object to be processed in the preview image comprises: 对所述预览图像进行目标检测,得到所述预览图像所包含的一个以上目标;performing target detection on the preview image to obtain more than one target included in the preview image; 计算所有目标的灰度平均值;Calculate the grayscale average of all targets; 将所有目标的灰度平均值与预设的第二灰度平均值阈值进行比对;Compare the grayscale average value of all targets with the preset second grayscale average value threshold; 若所有目标的灰度平均值小于所述第二灰度平均值阈值,则将所有目标均确定为所述待处理目标。If the average gray level of all objects is less than the second gray level average threshold, then all objects are determined as the objects to be processed. 5.如权利要求1至4任一项所述的图像超分重建方法,其特征在于,所述对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,包括:5. The image superdivision reconstruction method according to any one of claims 1 to 4, wherein the preview image is segmented to obtain a to-be-processed image including the to-be-processed target and an image not including the to-be-processed target. Scene image of the target to be processed, including: 获取所述待处理目标的目标检测框;obtaining the target detection frame of the target to be processed; 基于所述目标检测框,在所述预览图像中设定待处理图像框,其中,所述待处理图像框与所述目标检测框的形状相同,所述待处理图像框的每一边界分别与所述目标检测框的对应边界平行,且所述待处理图像框的每一边界分别与所述目标检测框的对应边界间隔预设的距离;Based on the target detection frame, a to-be-processed image frame is set in the preview image, wherein the to-be-processed image frame and the target detection frame have the same shape, and each boundary of the to-be-processed image frame is The corresponding boundaries of the target detection frame are parallel, and each boundary of the to-be-processed image frame is separated from the corresponding boundary of the target detection frame by a preset distance; 将所述待处理图像框之内的图像确定为待处理图像;determining the image within the to-be-processed image frame as the to-be-processed image; 将所述目标检测框之外的图像确定为场景图像。An image outside the target detection frame is determined as a scene image. 6.如权利要求5所述的图像超分重建方法,其特征在于,所述图像超分重建方法还包括:6. The image super-resolution reconstruction method according to claim 5, wherein the image super-resolution reconstruction method further comprises: 获取所述待处理图像框的各个顶点在所述预览图像中的坐标;Obtain the coordinates of each vertex of the to-be-processed image frame in the preview image; 所述将所述处理后图像与所述场景图像进行融合,得到新的预览图像,包括:The fusion of the processed image and the scene image to obtain a new preview image includes: 基于所述待处理图像框的各个顶点在所述预览图像中的坐标,将所述处理后图像与所述场景图像重叠,得到重叠区域;Based on the coordinates of each vertex of the to-be-processed image frame in the preview image, overlapping the processed image and the scene image to obtain an overlapping area; 基于所述重叠区域,对所述场景图像与所述处理后图像的边缘进行融合,得到新的预览图像。Based on the overlapping area, the edges of the scene image and the processed image are fused to obtain a new preview image. 7.如权利要求6所述的图像超分重建方法,其特征在于,所述基于所述重叠区域,对所述场景图像与所述处理后图像的边缘进行融合,得到新的预览图像,包括:7. The image superdivision reconstruction method according to claim 6, wherein, based on the overlapping area, the scene image and the edge of the processed image are fused to obtain a new preview image, comprising: : 针对所述重叠区域的任一像素点,获取所述像素点在所述场景图像中的灰度值,记为第一灰度值,并获取所述像素点在所述处理后图像中的灰度值,记为第二灰度值;For any pixel in the overlapping area, obtain the gray value of the pixel in the scene image, record it as the first gray value, and obtain the gray value of the pixel in the processed image degree value, denoted as the second gray value; 计算所述第一灰度值及第二灰度值的灰度平均值;calculating the grayscale average value of the first grayscale value and the second grayscale value; 将所述第一灰度值及第二灰度值的灰度平均值确定为融合后的所述像素点的灰度值。The grayscale value of the first grayscale value and the grayscale average value of the second grayscale value is determined as the grayscale value of the pixel point after fusion. 8.一种图像超分重建装置,其特征在于,包括:8. An image super-division reconstruction device, characterized in that, comprising: 获取单元,用于获取预览图像;The acquisition unit is used to acquire the preview image; 分割单元,用于若所述预览图像中存在待处理目标,则对所述预览图像进行分割,得到包含所述待处理目标的待处理图像及不包含所述待处理目标的场景图像,其中,所述待处理目标为满足预设条件的目标;a segmentation unit, configured to segment the preview image if there is an object to be processed in the preview image to obtain an image to be processed including the object to be processed and a scene image not including the object to be processed, wherein, The to-be-processed target is a target that satisfies a preset condition; 处理单元,用于对所述待处理图像进行超分重建,得到处理后图像;a processing unit, configured to perform super-resolution reconstruction on the to-be-processed image to obtain a processed image; 融合单元,用于将所述处理后图像与所述场景图像进行融合,得到新的预览图像。A fusion unit, configured to fuse the processed image with the scene image to obtain a new preview image. 9.一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述方法的步骤。9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the computer program as claimed in the claims The steps of any one of 1 to 7 of the method. 10.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述方法的步骤。10. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented .
CN201911037652.1A 2019-10-29 2019-10-29 An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment Active CN110796600B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911037652.1A CN110796600B (en) 2019-10-29 2019-10-29 An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment
PCT/CN2020/123345 WO2021083059A1 (en) 2019-10-29 2020-10-23 Image super-resolution reconstruction method, image super-resolution reconstruction apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911037652.1A CN110796600B (en) 2019-10-29 2019-10-29 An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment

Publications (2)

Publication Number Publication Date
CN110796600A true CN110796600A (en) 2020-02-14
CN110796600B CN110796600B (en) 2023-08-11

Family

ID=69441809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911037652.1A Active CN110796600B (en) 2019-10-29 2019-10-29 An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment

Country Status (2)

Country Link
CN (1) CN110796600B (en)
WO (1) WO2021083059A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111968037A (en) * 2020-08-28 2020-11-20 维沃移动通信有限公司 Digital zooming method and device and electronic equipment
WO2021083059A1 (en) * 2019-10-29 2021-05-06 Oppo广东移动通信有限公司 Image super-resolution reconstruction method, image super-resolution reconstruction apparatus, and electronic device
CN113240687A (en) * 2021-05-17 2021-08-10 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and readable storage medium
CN113572955A (en) * 2021-06-25 2021-10-29 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN114697543A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Image reconstruction method, related device and system
CN114764745A (en) * 2020-12-31 2022-07-19 华为技术有限公司 Image reconstruction method and related device
CN115914744A (en) * 2022-12-12 2023-04-04 湖南快乐阳光互动娱乐传媒有限公司 A region-based video super-resolution processing method, device and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313630B (en) * 2021-05-27 2024-08-23 艾酷软件技术(上海)有限公司 Image processing method and device and electronic equipment
CN113902639B (en) * 2021-10-08 2025-04-25 维沃移动通信(杭州)有限公司 Image processing method, device, electronic device and storage medium
CN116630220B (en) * 2023-07-25 2023-11-21 江苏美克医学技术有限公司 Fluorescent image depth-of-field fusion imaging method, device and storage medium
CN118134765B (en) * 2024-04-30 2024-07-12 国家超级计算天津中心 Image processing method, apparatus and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080240605A1 (en) * 2007-03-27 2008-10-02 Seiko Epson Corporation Image Processing Apparatus, Image Processing Method, and Image Processing Program
JP2009177764A (en) * 2007-12-27 2009-08-06 Eastman Kodak Co Imaging apparatus
CN105517677A (en) * 2015-05-06 2016-04-20 北京大学深圳研究生院 Depth/disparity map post-processing method and apparatus
CN107835661A (en) * 2015-08-05 2018-03-23 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic image processing system and method and device thereof, ultrasonic diagnostic device
CN110288530A (en) * 2019-06-28 2019-09-27 北京金山云网络技术有限公司 A processing method and device for super-resolution reconstruction of an image
CN110298790A (en) * 2019-06-28 2019-10-01 北京金山云网络技术有限公司 A kind of pair of image carries out the processing method and processing device of super-resolution rebuilding

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101179497B1 (en) * 2008-12-22 2012-09-07 한국전자통신연구원 Apparatus and method for detecting face image
CN104820966B (en) * 2015-04-30 2016-01-06 河海大学 Asynchronous many video super-resolution methods of registration deconvolution during a kind of sky
CN109064399B (en) * 2018-07-20 2023-01-24 广州视源电子科技股份有限公司 Image super-resolution reconstruction method and system, computer equipment and storage medium thereof
CN110310229B (en) * 2019-06-28 2023-04-18 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, terminal device, and readable storage medium
CN110796600B (en) * 2019-10-29 2023-08-11 Oppo广东移动通信有限公司 An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080240605A1 (en) * 2007-03-27 2008-10-02 Seiko Epson Corporation Image Processing Apparatus, Image Processing Method, and Image Processing Program
JP2009177764A (en) * 2007-12-27 2009-08-06 Eastman Kodak Co Imaging apparatus
CN105517677A (en) * 2015-05-06 2016-04-20 北京大学深圳研究生院 Depth/disparity map post-processing method and apparatus
CN107835661A (en) * 2015-08-05 2018-03-23 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic image processing system and method and device thereof, ultrasonic diagnostic device
CN110288530A (en) * 2019-06-28 2019-09-27 北京金山云网络技术有限公司 A processing method and device for super-resolution reconstruction of an image
CN110298790A (en) * 2019-06-28 2019-10-01 北京金山云网络技术有限公司 A kind of pair of image carries out the processing method and processing device of super-resolution rebuilding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁忠伟等: "基于灰度直方图拟合曲线的数字图像多阈值分割技术研究", 《现代制造工程》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021083059A1 (en) * 2019-10-29 2021-05-06 Oppo广东移动通信有限公司 Image super-resolution reconstruction method, image super-resolution reconstruction apparatus, and electronic device
CN111968037A (en) * 2020-08-28 2020-11-20 维沃移动通信有限公司 Digital zooming method and device and electronic equipment
CN114697543A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Image reconstruction method, related device and system
WO2022143921A1 (en) * 2020-12-31 2022-07-07 华为技术有限公司 Image reconstruction method, and related apparatus and system
CN114764745A (en) * 2020-12-31 2022-07-19 华为技术有限公司 Image reconstruction method and related device
CN114697543B (en) * 2020-12-31 2023-05-19 华为技术有限公司 An image reconstruction method, related device and system
CN114764745B (en) * 2020-12-31 2025-07-04 华为技术有限公司 Image reconstruction method and related device
CN113240687A (en) * 2021-05-17 2021-08-10 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and readable storage medium
CN113572955A (en) * 2021-06-25 2021-10-29 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN115914744A (en) * 2022-12-12 2023-04-04 湖南快乐阳光互动娱乐传媒有限公司 A region-based video super-resolution processing method, device and storage medium
CN115914744B (en) * 2022-12-12 2025-01-03 湖南快乐阳光互动娱乐传媒有限公司 A method, device and storage medium for processing video super-resolution by region

Also Published As

Publication number Publication date
WO2021083059A1 (en) 2021-05-06
CN110796600B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN110796600B (en) An image super-resolution reconstruction method, an image super-resolution reconstruction device, and electronic equipment
CN109005368B (en) A method for generating high dynamic range image, mobile terminal and storage medium
CN108765278B (en) Image processing method, mobile terminal and computer readable storage medium
CN107909569B (en) Screen-patterned detection method, screen-patterned detection device and electronic equipment
CN109951635B (en) Photographing processing method, device, mobile terminal, and storage medium
CN108769634B (en) Image processing method, image processing device and terminal equipment
CN111861938B (en) Image denoising method and device, electronic equipment and readable storage medium
CN108833784B (en) Self-adaptive composition method, mobile terminal and computer readable storage medium
CN108711161A (en) Image segmentation method, image segmentation device and electronic equipment
CN109978805A (en) Photographing processing method, device, mobile terminal, and storage medium
CN111028276A (en) Image alignment method and device, storage medium and electronic equipment
CN110717452B (en) Image recognition method, device, terminal and computer readable storage medium
CN111311482A (en) Background blurring method, device, terminal device and storage medium
CN110335216A (en) Image processing method, image processing apparatus, terminal device and readable storage medium
CN108776800A (en) Image processing method, mobile terminal and computer readable storage medium
CN114418914A (en) Image processing method, device, electronic device and storage medium
CN114973344A (en) Face detection method, face detection device, terminal equipment and computer readable storage medium
CN114596210A (en) Noise estimation method, device, terminal equipment and computer readable storage medium
CN108810407B (en) Image processing method, mobile terminal and computer-readable storage medium
CN110728705A (en) Image processing method, image processing device, storage medium and electronic equipment
CN106357978B (en) Image output method, device and terminal
CN111340722A (en) Image processing method, processing device, terminal device and readable storage medium
CN108763491B (en) Picture processing method and device and terminal equipment
CN111784607B (en) Image tone mapping method, device, terminal equipment and storage medium
CN111311610A (en) Image segmentation method and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant