[go: up one dir, main page]

CN108492246B - Image processing method and device and mobile terminal - Google Patents

Image processing method and device and mobile terminal Download PDF

Info

Publication number
CN108492246B
CN108492246B CN201810201454.3A CN201810201454A CN108492246B CN 108492246 B CN108492246 B CN 108492246B CN 201810201454 A CN201810201454 A CN 201810201454A CN 108492246 B CN108492246 B CN 108492246B
Authority
CN
China
Prior art keywords
image
difference
area
region
pixels
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.)
Active
Application number
CN201810201454.3A
Other languages
Chinese (zh)
Other versions
CN108492246A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810201454.3A priority Critical patent/CN108492246B/en
Publication of CN108492246A publication Critical patent/CN108492246A/en
Application granted granted Critical
Publication of CN108492246B publication Critical patent/CN108492246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/22Cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an image processing method, an image processing device and a mobile terminal, wherein the method comprises the following steps: processing the first image to obtain a second image; detecting a difference region on the second image, the difference region having a degree of difference from a corresponding region of the first image exceeding a predetermined threshold; and outputting prompt information for prompting that the image abnormity possibly exists in the difference area. According to the method and the device, whether the second image really has the abnormal error can be determined according to the specific processing mode of the first image through the output prompt information, and when the difference area of the second image really has the abnormal error, the second image can be modified in time, so that the picture distortion caused by the overlarge picture processing difference is prevented, the adverse effect is avoided, and the user experience is improved.

Description

一种图像处理方法、装置及移动终端Image processing method, device and mobile terminal

技术领域technical field

本发明涉及图像处理领域,尤其涉及一种图像处理方法、装置及移动终端。The present invention relates to the field of image processing, in particular to an image processing method, device and mobile terminal.

背景技术Background technique

随着手机处理能力的不断提升,用户习惯于通过手机对拍照获得的图片或从社交媒体上下载获得的图片进行修图,美图等处理,然后将经过处理获得的图片进行保存,并将经过保存后的图片分享在社交媒体上。With the continuous improvement of mobile phone processing capabilities, users are accustomed to modifying and beautifying pictures obtained by taking photos or downloading pictures from social media through mobile phones, and then save the processed pictures and save them after Saved pictures are shared on social media.

当前的修图和美图类功能,针对照片如何修改,如何美化,如何调整光线亮度等,完全是依靠用户进行直观观测比对来确定的,不同人的感觉不同,最终生成的图片效果也不同。部分用户在进行图片修图处理时,持续关注于某一特定区域,在该特定区域修图完成后,即完成图片的修图;由于仅追求该特定区域的高美化程度,忽略了图片上的其它区域,导致修图完成后的其它区域与原图差异过大,甚至导致图片失真。在用户将该修图后的失真图片上传至社交媒体上后,会造成不良影响,导致用户体验较差。The current image retouching and image beautification functions, how to modify, how to beautify, how to adjust the brightness of the photos, etc., are completely determined by the user's intuitive observation and comparison. Different people have different feelings, and the final image effects are also different. Some users continue to focus on a specific area when retouching pictures. After the retouching of the specific area is completed, the picture retouching is completed; because they only pursue the high degree of beautification of the specific area, they ignore the In other areas, the difference between the other areas of the retouched image and the original image is too large, and even the image is distorted. After the user uploads the retouched distorted picture to social media, it will cause adverse effects and lead to poor user experience.

发明内容Contents of the invention

本发明提供了一种图像处理方法、装置及移动终端,以解决图像处理差异过大导致用户体验差的问题。The present invention provides an image processing method, device, and mobile terminal to solve the problem of poor user experience due to excessive differences in image processing.

第一方面,本发明实施例提供了一种图像处理方法,包括:In a first aspect, an embodiment of the present invention provides an image processing method, including:

对第一图像进行处理,获得第二图像;Process the first image to obtain a second image;

检测所述第二图像上的差异区域,所述差异区域与所述第一图像的对应区域的差异度超过预定阈值;Detecting a difference region on the second image, the degree of difference between the difference region and the corresponding region of the first image exceeds a predetermined threshold;

输出用于提示所述差异区域可能存在图像异常的提示信息。and outputting prompt information for prompting that there may be an image abnormality in the difference region.

第二方面,本发明实施例还提供了一种图像处理装置,包括:In a second aspect, an embodiment of the present invention also provides an image processing device, including:

处理模块,用于对第一图像进行处理,获得第二图像;A processing module, configured to process the first image to obtain a second image;

检测模块,用于检测所述第二图像上的差异区域,所述差异区域与所述第一图像的对应区域的差异度超过预定阈值;A detection module, configured to detect a difference region on the second image, the degree of difference between the difference region and the corresponding region of the first image exceeds a predetermined threshold;

输出模块,用于输出用于提示所述差异区域可能存在图像异常的提示信息。An output module, configured to output prompt information for prompting that there may be an image abnormality in the difference region.

第三方面,本发明实施例还提供了一种移动终端,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上述的图像处理方法的步骤。In the third aspect, the embodiment of the present invention also provides a mobile terminal, including a processor, a memory, and a computer program stored in the memory and operable on the processor, and the computer program is executed by the processor During execution, the steps of the above-mentioned image processing method are realized.

第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述的图像处理方法的步骤。In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned image processing method are implemented .

这样,本发明的实施例中,通过对经过处理获得的第二图像进行检测,在检测到第二图像上存在差异度过大的差异区域时,输出提示信息,使得用户能够及时获知到进行处理后的图像可能存在异常错误,避免不良影响,提高用户体验。In this way, in the embodiment of the present invention, by detecting the second image obtained through processing, when it is detected that there is a difference area with too large difference on the second image, a prompt message is output, so that the user can know in time that the processing There may be abnormal errors in the final image to avoid adverse effects and improve user experience.

附图说明Description of drawings

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

图1表示本发明实施例的图像处理方法的流程图之一;Fig. 1 represents one of the flowcharts of the image processing method of the embodiment of the present invention;

图2表示本发明实施例中的步骤102的流程图;Fig. 2 shows the flowchart of step 102 in the embodiment of the present invention;

图3表示本发明实施例的图像处理方法的流程图之二;Fig. 3 shows the second flowchart of the image processing method of the embodiment of the present invention;

图4表示本发明实施例的图像处理方法的流程图之三;Fig. 4 shows the third flowchart of the image processing method of the embodiment of the present invention;

图5表示本发明实施例的图像处理装置的结构示意图之一;FIG. 5 shows one of the schematic structural diagrams of an image processing device according to an embodiment of the present invention;

图6表示本发明实施例的图像处理装置的结构示意图之二;FIG. 6 shows a second structural schematic diagram of an image processing device according to an embodiment of the present invention;

图7表示本发明实施例的移动终端的框图。FIG. 7 shows a block diagram of a mobile terminal according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

参照图1,本发明实施例提供了一种图像处理方法,包括:Referring to Fig. 1, an embodiment of the present invention provides an image processing method, including:

步骤101,对第一图像进行处理,获得第二图像。Step 101, process the first image to obtain a second image.

其中,第一图像可以为进行实时拍照获得的图像,或者历史保存的拍照图像,也可以是通过网络在社交媒体上下载的图像。总之,通过各种渠道获得的图像,都可以为本发明实施例中的第一图像,该第一图像为一原图像。Wherein, the first image may be an image obtained by taking a real-time photograph, or a photographed image saved in history, or an image downloaded from a social media through a network. In short, the images obtained through various channels can all be the first image in the embodiment of the present invention, and the first image is an original image.

其中,步骤101中对第一图像进行处理的步骤可以是对第一图像进行截图、美颜、旋转、亮度调整、对比度调整、滤镜、长宽度等一系列处理。经过上述处理后即获得一第二图像,该第二图像为一中间图像。Wherein, the step of processing the first image in step 101 may be performing a series of processing on the first image such as screenshot, beautification, rotation, brightness adjustment, contrast adjustment, filter, length and width. After the above processing, a second image is obtained, and the second image is an intermediate image.

步骤102,检测所述第二图像上的差异区域,所述差异区域与所述第一图像的对应区域的差异度超过预定阈值。Step 102, detecting a difference region on the second image, where the degree of difference between the difference region and the corresponding region of the first image exceeds a predetermined threshold.

其中,差异度是指差异区域与第一图像的对应区域之间发生色彩参数变化的像素的第一数量。差异区域的数量为至少一个。Wherein, the degree of difference refers to a first number of pixels whose color parameters change between the difference region and the corresponding region of the first image. The number of difference regions is at least one.

其中,参照图2,该步骤102具体为:Wherein, referring to FIG. 2, the step 102 is specifically:

步骤201,按照一预定尺寸大小将第一图像划分为多个参考区域,以及将第二图像划分为多个对照区域,且多个参考区域和多个对照区域一一对应;Step 201, divide the first image into a plurality of reference areas according to a predetermined size, and divide the second image into a plurality of comparison areas, and the plurality of reference areas correspond to the plurality of comparison areas;

步骤202,对每一参考区域和与参考区域对应的对照区域进行色彩参数比对,确定参考区域和对照区域之间发生色彩参数变化的像素的第一数量;Step 202, performing a color parameter comparison between each reference area and a comparison area corresponding to the reference area, and determining a first number of pixels whose color parameters change between the reference area and the comparison area;

步骤203,若第一数量大于预定数量,或者第一数量与第二数量的比值大于预定比例,则确定对照区域为差异区域,所述第二数量为参考区域内的像素数量。Step 203, if the first number is greater than a predetermined number, or the ratio of the first number to the second number is greater than a predetermined ratio, determine that the comparison area is a difference area, and the second number is the number of pixels in the reference area.

在步骤201中的预定尺寸大小是指预定像素尺寸大小,该预定像素尺寸的具体像素值可以是预先存储的像素尺寸,也可以是用户重新设置的像素尺寸。The predetermined size in step 201 refers to a predetermined pixel size, and the specific pixel value of the predetermined pixel size may be a pre-stored pixel size, or a pixel size reset by the user.

其中,色彩参数是指像素的RGB色彩参数、CMYK色彩参数、LAB色彩参数以及HSB色彩参数。以参考区域的一个第一像素和对照区域中与该第一像素对应的第二像素为例,若第二像素和第一像素的色彩参数值不全部相同,则认为第二像素相对于第一像素发生色彩参数变化。Wherein, the color parameters refer to RGB color parameters, CMYK color parameters, LAB color parameters and HSB color parameters of pixels. Taking a first pixel in the reference area and a second pixel corresponding to the first pixel in the comparison area as an example, if the color parameter values of the second pixel and the first pixel are not all the same, it is considered that the second pixel is relative to the first pixel. The pixel undergoes a color parameter change.

由于不管对第一图像进行何种处理,该第一图像的像素个数是不会发生变化的,通过对第一图像和第二图像进行区域划分,并按照划分后的区域进行比对,能够确定出进行处理后的图像上发生变化较大的差异区域。该差异区域可以是进行处理后形成的异常区域,也可能是经过处理形成的正常区域。Since the number of pixels in the first image will not change no matter what kind of processing is performed on the first image, by dividing the first image and the second image into regions and comparing them according to the divided regions, it is possible to Determine the difference region that changes greatly on the processed image. The difference area may be an abnormal area formed after processing, or a normal area formed after processing.

例如,假设本发明实施例中的第一图像的像素为1000*1000像素,步骤 101中对该第一图像进行拉长处理,获得第二图像。以10*10像素为一预定尺寸将第一图像和第二图像分别划分为100个参考区域和100个对照区域,将 100个参考区域和100个对照区域一一进行像素比对,确定每一对照区域和与其对应的参考区域发生色彩参数变化的第一数量,进而根据第一数量和预定数量的大小,或者第一数量和第二数量之间的比值确定第二图像中是否存在差异度过大的区域。For example, assuming that the pixels of the first image in the embodiment of the present invention are 1000*1000 pixels, the first image is elongated in step 101 to obtain the second image. Divide the first image and the second image into 100 reference areas and 100 comparison areas with 10*10 pixels as a predetermined size, compare the 100 reference areas and 100 comparison areas one by one, and determine each The first number of color parameter changes in the comparison area and the corresponding reference area, and then determine whether there is a difference in the second image according to the size of the first number and the predetermined number, or the ratio between the first number and the second number large area.

步骤103,输出一用于提示差异区域可能存在图像异常的提示信息。Step 103, outputting a prompt message for prompting that there may be an image abnormality in the difference area.

由于对第一图像具体采取的处理操作的不同,在步骤102中检测出的差异区域可能是存在图像异常(图像失真)的区域,也可能是正常区域。因此,输出的提示信息所提示的是差异区域可能存在图像异常,而不是一定存在图像异常。例如,对第一图像进行处理的操作是裁剪操作,经过裁剪后获得的第二图像上与第一图像上对应的区域存在差异度超过预定阈值的可能性非常大,此时,步骤102中极有可能会检测到差异区域,但此时检测出的差异区域实质上并不存在图像异常的问题。再例如,假设第二图像上存在多人图像,对第一图像进行处理的操作是对图像进行腿部拉长处理,由于不同人的身高和腿长不同的原因,经过腿部拉长处理后获得的多人的腿部图像中,可能会存在部分人的腿部图像正常,而另一部分人的腿部图像失真的问题。综上,由于对第一图像所进行的处理的具体操作方式的不同,使得处理后获得的第二图像可能是正常的,也可能存在失真,通过输出一提示差异区域可能存在图像异常的提示信息,使得用户根据具体操作方式来判断第二图像是否真正的存在图像异常,可以提高用户体验。Due to different specific processing operations on the first image, the difference area detected in step 102 may be an area with image abnormality (image distortion) or a normal area. Therefore, the output prompt information indicates that there may be an image abnormality in the difference region, rather than that there must be an image abnormality. For example, the operation of processing the first image is a cropping operation, and it is very likely that the degree of difference between the corresponding regions on the second image obtained after cropping and the first image exceeds a predetermined threshold. At this time, in step 102, the It is possible to detect a difference area, but at this time the detected difference area does not have the problem of image abnormality substantially. For another example, assuming that there are multiple images on the second image, the operation of processing the first image is to lengthen the legs of the image. Due to the different heights and leg lengths of different people, after the leg lengthening process In the obtained leg images of multiple people, there may be a problem that some people's leg images are normal, while another part of people's leg images are distorted. To sum up, due to the different specific operation methods of the processing of the first image, the second image obtained after processing may be normal or may be distorted. By outputting a prompt message that prompts that there may be an abnormal image in the difference area , so that the user can judge whether there is an abnormal image in the second image according to the specific operation mode, which can improve user experience.

用户通过输出的提示信息,可以根据对第一图像的具体处理方式,确定该第二图像是否真正存在异常错误,并且,在第二图像的差异区域确实存在异常错误时,能够及时进行修改处理,防止因图片处理差异过大造成图片失真,避免造成不良影响。Through the output prompt information, the user can determine whether there is really an abnormal error in the second image according to the specific processing method of the first image, and when there is indeed an abnormal error in the difference area of the second image, it can be modified in time. Prevent image distortion caused by excessive differences in image processing, and avoid adverse effects.

其中,参照图3,在本发明实施例中,该图像处理方法还包括:Wherein, referring to FIG. 3, in the embodiment of the present invention, the image processing method further includes:

步骤301,在用户界面显示用于保留差异区域的第一虚拟按键以及用于恢复差异区域的第二虚拟按键;Step 301, displaying a first virtual key for reserving the difference area and a second virtual key for restoring the difference area on the user interface;

步骤302,若检测到对第一虚拟按键的操作,保留差异区域;Step 302, if an operation on the first virtual key is detected, reserve the difference area;

步骤303,若检测到对第二虚拟按键的操作,恢复差异区域。Step 303, if an operation on the second virtual key is detected, restore the difference area.

具体地,在用户界面上显示“差异区域可能存在图像异常”的提示信息,第一虚拟按键处显示“保留差异区域”,第二虚拟按键处显示“恢复差异区域”。Specifically, a prompt message "There may be an image abnormality in the difference area" is displayed on the user interface, "Reserve the difference area" is displayed at the first virtual button, and "Restore the difference area" is displayed at the second virtual button.

用户通过用户界面上呈现的界面信息,结合对第一图像的具体操作方式,确定是对差异区域进行恢复还是保留。在确定具体操作后,对第一虚拟按键进行点击或对第二虚拟按键进行点击即可。The user determines whether to restore or retain the difference region through the interface information presented on the user interface and in combination with the specific operation mode on the first image. After the specific operation is determined, it is sufficient to click on the first virtual button or click on the second virtual button.

其中,在步骤303中,恢复差异区域的步骤具体为:Wherein, in step 303, the step of recovering the difference area is specifically:

步骤3031,确定第一图像上与差异区域对应的目标参考区域,并将差异区域内的图像的色彩参数恢复为目标参考区域内的图像的色彩参数。Step 3031, determine the target reference area corresponding to the difference area on the first image, and restore the color parameters of the image in the difference area to the color parameters of the image in the target reference area.

其中,目标参考区域是上述步骤201中划分的多个参考区域中的其中一个区域。通过将差异区域内的图像的色彩参数恢复为目标参考区域内的图像的色彩参数,能够解决对第一图像处理造成的图像失真的问题,提高用户体验。Wherein, the target reference area is one of the multiple reference areas divided in step 201 above. By restoring the color parameters of the image in the difference area to the color parameters of the image in the target reference area, the problem of image distortion caused by the processing of the first image can be solved and user experience can be improved.

在本发明实施例中,参照图4,在恢复差异区域之后,若与差异区域相邻的第一对照区域未被恢复,该方法还包括:In the embodiment of the present invention, referring to FIG. 4, after restoring the difference region, if the first control region adjacent to the difference region has not been restored, the method further includes:

步骤401,确定一包含有差异区域和第一对照区域的分界线的过渡区域;Step 401, determining a transition area including the boundary line between the difference area and the first comparison area;

步骤402,根据过渡区域内的像素对应的权值与像素的当前色彩参数值的乘积,调整像素的色彩参数,其中,像素的权值,与像素到过渡区域内远离像素的边界线的距离正相关。Step 402, according to the product of the weight corresponding to the pixel in the transition area and the current color parameter value of the pixel, adjust the color parameter of the pixel, wherein the weight of the pixel is positive to the distance from the pixel to the boundary line far away from the pixel in the transition area relevant.

其中,该步骤402具体为:将过渡区域内的像素的色彩参数由当前色彩参数值调整为权值与当前色彩参数值的乘积。Wherein, the step 402 is specifically: adjusting the color parameter of the pixels in the transition area from the current color parameter value to the product of the weight and the current color parameter value.

具体地,第一对照区域为至少一个,根据第一对照区域的数量的不同,在步骤401中,一个差异区域对应的过渡区域至少为一个。Specifically, there is at least one first comparison area, and according to the number of the first comparison area, in step 401, there is at least one transition area corresponding to a difference area.

在步骤402中,像素的权重为像素到过渡区域内远离像素的边界线的距离与过渡区域的宽度的比值。也即,像素到过渡区域内远离像素的边界线的距离越大,该权值也越大。In step 402, the weight of the pixel is the ratio of the distance from the pixel to the boundary line away from the pixel in the transition area and the width of the transition area. That is, the greater the distance from the pixel to the boundary line away from the pixel in the transition area, the greater the weight.

并且,在本发明实施例中,该过渡区域的形状为方向。其中,差异区域和第一对照区域的分界线为该过渡区域的中间分割线,也即,该过渡区域被该中间分割线分割为两部分,一部分属于该差异区域,另一部分属于该第一对照区域。Moreover, in the embodiment of the present invention, the shape of the transition region is a direction. Wherein, the dividing line between the difference area and the first comparison area is the middle dividing line of the transition area, that is, the transition area is divided into two parts by the middle dividing line, one part belongs to the difference area, and the other part belongs to the first comparison area. area.

通过对过渡区域内的像素进行调整,使得该过渡区域能够与差异区域和第一对照区域之间很好的衔接,使得差异区域到第一对照区域之间能够自然过渡,提高图像处理的用户体验。By adjusting the pixels in the transition area, the transition area can be well connected with the difference area and the first comparison area, so that the transition between the difference area and the first comparison area can be natural, and the user experience of image processing can be improved. .

在本发明实施例中,在完成对该第二图像的差异区域和第一对照区域之间的过渡区域的处理,形成一张新的第三图像,该方法还包括:In the embodiment of the present invention, after completing the processing of the transition area between the difference area of the second image and the first comparison area, a new third image is formed, the method further includes:

对第三图像进行保存。The third image is saved.

通过本发明实施例提供的图像处理方法,通过输出的提示信息,可以根据对第一图像的具体处理方式,确定该第二图像是否真正存在异常错误,并且,在第二图像的差异区域确实存在异常错误时,能够及时进行修改处理,防止因图片处理差异过大造成图片失真,避免造成不良影响,提高了用户体验。Through the image processing method provided by the embodiment of the present invention, through the output prompt information, it can be determined whether there is really an abnormal error in the second image according to the specific processing method for the first image, and whether there is indeed an abnormal error in the difference area of the second image In the event of an abnormal error, it can be modified in time to prevent image distortion due to excessive differences in image processing, avoid adverse effects, and improve user experience.

根据本发明实施例的另一方面,本发明实施例还提供了一种图像处理装置,包括:According to another aspect of the embodiments of the present invention, the embodiments of the present invention also provide an image processing device, including:

处理模块501,用于对第一图像进行处理,获得第二图像;A processing module 501, configured to process the first image to obtain a second image;

检测模块502,用于检测第二图像上的差异区域,差异区域与第一图像的对应区域的差异度超过预定阈值;A detection module 502, configured to detect a difference region on the second image, where the degree of difference between the difference region and the corresponding region of the first image exceeds a predetermined threshold;

输出模块503,用于输出用于提示差异区域可能存在图像异常的提示信息。The output module 503 is configured to output prompt information for prompting that there may be an image abnormality in the difference area.

优选地,装置还包括:Preferably, the device also includes:

显示模块504,用于在用户界面显示用于保留差异区域的第一虚拟按键以及用于恢复差异区域的第二虚拟按键;A display module 504, configured to display a first virtual key for retaining the difference area and a second virtual key for restoring the difference area on the user interface;

保留模块505,用于若检测到对第一虚拟按键的触发操作,保留差异区域;恢复模块506,用于若检测到对第二虚拟按键的触发操作,恢复差异区域。The reserve module 505 is configured to reserve the difference area if a trigger operation on the first virtual key is detected; the restoration module 506 is configured to restore the difference area if a trigger operation to the second virtual key is detected.

优选地,检测模块502包括:Preferably, the detection module 502 includes:

划分单元5021,用于按照一预定尺寸大小将第一图像划分为多个参考区域,以及将第二图像划分为多个对照区域,且多个参考区域和多个对照区域一一对应;A division unit 5021, configured to divide the first image into a plurality of reference areas according to a predetermined size, and divide the second image into a plurality of comparison areas, and the plurality of reference areas correspond to the plurality of comparison areas;

比对单元5022,用于对每一参考区域和与参考区域对应的对照区域进行色彩参数比对,确定参考区域和对照区域之间发生色彩参数变化的像素的第一数量;The comparison unit 5022 is configured to perform color parameter comparison between each reference area and the comparison area corresponding to the reference area, and determine the first number of pixels whose color parameters change between the reference area and the comparison area;

确定单元5023,用于若第一数量大于预定数量,或者第一数量与第二数量的比值大于预定比例,则确定对照区域为差异区域,第二数量为参考区域内的像素数量。The determining unit 5023 is configured to determine that the comparison area is a difference area and the second number is the number of pixels in the reference area if the first number is greater than a predetermined number, or the ratio of the first number to the second number is greater than a predetermined ratio.

优选地,恢复模块506包括:Preferably, the recovery module 506 includes:

恢复单元5061,用于确定第一图像上与差异区域对应的目标参考区域,并将差异区域内的图像的色彩参数恢复为目标参考区域内的图像的色彩参数。The restoration unit 5061 is configured to determine a target reference area corresponding to the difference area on the first image, and restore the color parameters of the image in the difference area to the color parameters of the image in the target reference area.

优选地,在恢复差异区域之后,若与差异区域相邻的第一对照区域未被恢复,装置还包括:Preferably, after restoring the difference region, if the first control region adjacent to the difference region has not been restored, the device further includes:

确定模块507,用于确定一包含有差异区域和第一对照区域的分界线的过渡区域;Determining module 507, configured to determine a transition area including the boundary line between the difference area and the first comparison area;

调整模块508,用于根据过渡区域内的像素对应的权值与像素的当前色彩参数值的乘积,调整该像素的色彩参数,其中,像素的权值,与像素到过渡区域内远离像素的边界线的距离正相关。The adjustment module 508 is configured to adjust the color parameter of the pixel according to the product of the weight corresponding to the pixel in the transition area and the current color parameter value of the pixel, wherein, the weight of the pixel is the same as the boundary between the pixel and the pixel in the transition area away from the pixel The line distance is positively correlated.

优选地,调整模块508包括:Preferably, the adjustment module 508 includes:

调整单元5081,用于将过渡区域内的像素的色彩参数由当前色彩参数值调整为权值与当前色彩参数值的乘积。The adjustment unit 5081 is configured to adjust the color parameters of the pixels in the transition area from the current color parameter value to the product of the weight and the current color parameter value.

本发明实施例提供的图像处理装置能够实现图1至图4的方法实施例中实现的各个过程,为避免重复,这里不再赘述。通过输出的提示信息,可以根据对第一图像的具体处理方式,确定该第二图像是否真正存在异常错误,并且,在第二图像的差异区域确实存在异常错误时,能够及时进行修改处理,防止因图片处理差异过大造成图片失真,避免造成不良影响,提高了用户体验。The image processing apparatus provided in the embodiment of the present invention can implement each process implemented in the method embodiments in FIG. 1 to FIG. 4 , and details are not repeated here to avoid repetition. Through the output prompt information, it can be determined whether there is an abnormal error in the second image according to the specific processing method of the first image, and if there is indeed an abnormal error in the difference area of the second image, it can be modified in time to prevent Image distortion caused by excessive differences in image processing avoids adverse effects and improves user experience.

图7为实现本发明各个实施例的一种移动终端的硬件结构示意图,该移动终端600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609、处理器610、以及电源611等部件。本领域技术人员可以理解,图7中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。7 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, and a display unit 606 , a user input unit 607 , an interface unit 608 , a memory 609 , a processor 610 , and a power supply 611 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 7 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than shown in the figure, or combine some components, or different components layout. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, and a pedometer.

其中,射频单元601,用于根据处理器610的控制进行收发信号;Wherein, the radio frequency unit 601 is configured to send and receive signals according to the control of the processor 610;

处理器610,用于对第一图像进行处理,获得第二图像;a processor 610, configured to process the first image to obtain a second image;

检测第二图像上的差异区域,差异区域与第一图像的对应区域的差异度超过预定阈值;Detecting a difference region on the second image, where the degree of difference between the difference region and the corresponding region of the first image exceeds a predetermined threshold;

输出用于提示所述差异区域可能存在图像异常的提示信息。and outputting prompt information for prompting that there may be an image abnormality in the difference region.

通过输出的提示信息,可以根据对第一图像的具体处理方式,确定该第二图像是否真正存在异常错误,并且,在第二图像的差异区域确实存在异常错误时,能够及时进行修改处理,防止因图片处理差异过大造成图片失真,避免造成不良影响,提高了用户体验。Through the output prompt information, it can be determined whether there is an abnormal error in the second image according to the specific processing method of the first image, and if there is indeed an abnormal error in the difference area of the second image, it can be modified in time to prevent Image distortion caused by excessive differences in image processing avoids adverse effects and improves user experience.

应理解的是,本发明实施例中,射频单元601可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器 610处理;另外,将上行的数据发送给基站。通常,射频单元601包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元601还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, the downlink data from the base station is received and processed by the processor 610; in addition, the Uplink data is sent to the base station. Generally, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 601 can also communicate with the network and other devices through a wireless communication system.

移动终端通过网络模块602为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides users with wireless broadband Internet access through the network module 602, such as helping users send and receive emails, browse web pages, and access streaming media.

音频输出单元603可以将射频单元601或网络模块602接收的或者在存储器609中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元603还可以提供与移动终端600执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元603包括扬声器、蜂鸣器以及受话器等。The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 can also provide audio output related to a specific function performed by the mobile terminal 600 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.

输入单元604用于接收音频或视频信号。输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)6041和麦克风6042,图形处理器6041 对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元606 上。经图形处理器6041处理后的图像帧可以存储在存储器609(或其它存储介质)中或者经由射频单元601或网络模块602进行发送。麦克风6042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元601发送到移动通信基站的格式输出。The input unit 604 is used for receiving audio or video signals. The input unit 604 may include a graphics processing unit (Graphics Processing Unit, GPU) 6041 and a microphone 6042, and the graphics processing unit 6041 is used for still pictures or video images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frames may be displayed on the display unit 606 . The image frames processed by the graphics processor 6041 may be stored in the memory 609 (or other storage media) or sent via the radio frequency unit 601 or the network module 602 . The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 601 for output in the case of a phone call mode.

移动终端600还包括至少一种传感器605,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板6061的亮度,接近传感器可在移动终端600移动到耳边时,关闭显示面板6061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击) 等;传感器605还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The mobile terminal 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 6061 and the display panel 6061 when the mobile terminal 600 moves to the ear / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of mobile terminals (such as horizontal and vertical screen switching, related games, etc.) , magnetometer attitude calibration), vibration recognition-related functions (such as pedometer, knocking), etc.; the sensor 605 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.

显示单元606用于显示由用户输入的信息或提供给用户的信息。显示单元 606可包括显示面板6061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板6061。The display unit 606 is used to display information input by the user or information provided to the user. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.

用户输入单元607可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元607 包括触控面板6071以及其他输入设备6072。触控面板6071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板6071上或在触控面板6071附近的操作)。触控面板 6071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板6071。除了触控面板 6071,用户输入单元607还可以包括其他输入设备6072。具体地,其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 607 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072 . The touch panel 6071, also referred to as a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 6071 or near the touch panel 6071). operate). The touch panel 6071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the For the processor 610, receive the command sent by the processor 610 and execute it. In addition, the touch panel 6071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 6071, the user input unit 607 may also include other input devices 6072. Specifically, other input devices 6072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板6071可覆盖在显示面板6061上,当触控面板6071 检测到在其上或附近的触摸操作后,传送给处理器610以确定触摸事件的类型,随后处理器610根据触摸事件的类型在显示面板6061上提供相应的视觉输出。虽然在图7中,触控面板6071与显示面板6061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板6071与显示面板6061集成而实现移动终端的输入和输出功能,具体此处不做限定。Furthermore, the touch panel 6071 can be covered on the display panel 6061. When the touch panel 6071 detects a touch operation on or near it, it will be sent to the processor 610 to determine the type of the touch event, and then the processor 610 will The type of event provides a corresponding visual output on the display panel 6061. Although in FIG. 7, the touch panel 6071 and the display panel 6061 are used as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 6071 and the display panel 6061 can be integrated. The implementation of the input and output functions of the mobile terminal is not specifically limited here.

接口单元608为外部装置与移动终端600连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/ 输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元608可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端600内的一个或多个元件或者可以用于在移动终端600和外部装置之间传输数据。The interface unit 608 is an interface for connecting an external device to the mobile terminal 600 . For example, an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 608 can be used to receive input from an external device (for example, data information, power, etc.) transfer data between devices.

存储器609可用于存储软件程序以及各种数据。存储器609可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器 609可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 609 can be used to store software programs as well as various data. The memory 609 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 609 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

处理器610是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器609内的软件程序和/或模块,以及调用存储在存储器609内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。The processor 610 is the control center of the mobile terminal, which uses various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609 , execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that, the foregoing modem processor may not be integrated into the processor 610 .

移动终端600还可以包括给各个部件供电的电源611(比如电池),优选的,电源611可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 600 can also include a power supply 611 (such as a battery) for supplying power to various components. Preferably, the power supply 611 can be logically connected to the processor 610 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. and other functions.

另外,移动终端600包括一些未示出的功能模块,在此不再赘述。In addition, the mobile terminal 600 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种移动终端,包括处理器610,存储器609,存储在存储器609上并可在所述处理器610上运行的计算机程序,该计算机程序被处理器610执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides a mobile terminal, including a processor 610, a memory 609, a computer program stored in the memory 609 and operable on the processor 610, when the computer program is executed by the processor 610 Each process of the above embodiment of the image processing method can achieve the same technical effect, so in order to avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned image processing method embodiment is realized, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive, and those of ordinary skill in the art will Under the enlightenment of the present invention, without departing from the gist of the present invention and the protection scope of the claims, many forms can also be made, all of which belong to the protection of the present invention.

以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。What has been described above is a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, some improvements and modifications can also be made without departing from the principles described in the present invention. within the scope of protection of the invention.

Claims (9)

1. An image processing method, comprising:
processing the first image to obtain a second image; the processing comprises at least one of screenshot, beautifying, rotation, brightness adjustment, contrast adjustment, filter, length and width and cutting;
detecting a difference region on the second image, the difference region having a degree of difference from a corresponding region of the first image exceeding a predetermined threshold;
outputting prompt information for prompting that the image abnormity possibly exists in the difference area;
displaying a first virtual key for reserving the difference area and a second virtual key for restoring the difference area on a user interface;
if the triggering operation of the first virtual key is detected, reserving the difference area;
and if the triggering operation of the second virtual key is detected, restoring the difference area.
2. The image processing method according to claim 1, wherein the step of detecting a difference region on the second image comprises:
dividing the first image into a plurality of reference areas according to a preset size, dividing the second image into a plurality of comparison areas, and enabling the plurality of reference areas and the plurality of comparison areas to be in one-to-one correspondence;
comparing color parameters of each reference area with the corresponding comparison area of the reference area, and determining a first number of pixels with color parameter change between the reference area and the comparison area;
and if the first number is greater than a preset number or the ratio of the first number to the second number is greater than a preset ratio, determining that the comparison area is a difference area, and the second number is the number of pixels in the reference area.
3. The image processing method according to claim 1, wherein the step of restoring the difference region comprises:
and determining a target reference region corresponding to the difference region on the first image, and restoring the color parameters of the image in the difference region into the color parameters of the image in the target reference region.
4. The image processing method according to claim 1, wherein after restoring the difference region, if a first control region adjacent to the difference region is not restored, the method further comprises:
determining a transition region comprising a boundary of the difference region and the first control region;
and adjusting the color parameters of the pixels according to the product of the weight corresponding to the pixels in the transition region and the current color parameter values of the pixels, wherein the weight of the pixels is positively correlated with the distance from the pixels to the boundary line far away from the pixels in the transition region.
5. An image processing apparatus characterized by comprising:
the processing module is used for processing the first image to obtain a second image; the processing comprises at least one of screenshot, beautifying, rotation, brightness adjustment, contrast adjustment, filter, length and width and cutting;
a detection module, configured to detect a difference region on the second image, where a difference degree between the difference region and a corresponding region of the first image exceeds a predetermined threshold;
the output module is used for outputting prompt information for prompting that the image abnormity possibly exists in the difference area;
the display module is used for displaying a first virtual key for reserving the difference area and a second virtual key for restoring the difference area on a user interface;
the reserving module is used for reserving the difference area if the triggering operation of the first virtual key is detected;
and the restoring module is used for restoring the difference area if the triggering operation of the second virtual key is detected.
6. The image processing apparatus according to claim 5, wherein the detection module comprises:
the dividing unit is used for dividing the first image into a plurality of reference areas according to a preset size and dividing the second image into a plurality of contrast areas, and the reference areas and the contrast areas are in one-to-one correspondence;
the comparison unit is used for comparing color parameters of each reference area with the comparison area corresponding to the reference area and determining a first number of pixels with color parameter change between the reference area and the comparison area;
a determining unit, configured to determine that the comparison area is a difference area if the first number is greater than a predetermined number, or a ratio of the first number to a second number is greater than a predetermined ratio, where the second number is a number of pixels in the reference area.
7. The image processing apparatus according to claim 5, wherein the restoration module comprises:
and the restoring unit is used for determining a target reference area corresponding to the difference area on the first image and restoring the color parameters of the image in the difference area into the color parameters of the image in the target reference area.
8. The image processing apparatus according to claim 5, wherein after restoring the difference region, if a first comparison region adjacent to the difference region is not restored, the apparatus further comprises:
the determining module is used for determining a transition region containing a boundary of the difference region and the first comparison region;
and the adjusting module is used for adjusting the color parameters of the pixels according to the product of the weight values corresponding to the pixels in the transition region and the current color parameter values of the pixels, wherein the weight values of the pixels are positively correlated with the distance from the pixels to the boundary line far away from the pixels in the transition region.
9. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the image processing method according to any one of claims 1 to 4.
CN201810201454.3A 2018-03-12 2018-03-12 Image processing method and device and mobile terminal Active CN108492246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201454.3A CN108492246B (en) 2018-03-12 2018-03-12 Image processing method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201454.3A CN108492246B (en) 2018-03-12 2018-03-12 Image processing method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN108492246A CN108492246A (en) 2018-09-04
CN108492246B true CN108492246B (en) 2023-01-24

Family

ID=63338713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201454.3A Active CN108492246B (en) 2018-03-12 2018-03-12 Image processing method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN108492246B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493294A (en) * 2018-10-30 2019-03-19 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN109831493A (en) * 2019-01-18 2019-05-31 深圳壹账通智能科技有限公司 A kind of detection method of image configurations, device, equipment and medium
CN110456960B (en) * 2019-05-09 2021-10-01 华为技术有限公司 Image processing method, device and equipment
CN111539914B (en) * 2020-03-24 2022-12-20 上海交通大学 Mobile phone photo quality comparison and evaluation method, system and terminal
CN111669611B (en) * 2020-06-19 2022-02-22 广州繁星互娱信息科技有限公司 Image processing method, device, terminal and storage medium
CN113077391B (en) * 2020-07-22 2024-01-26 同方威视技术股份有限公司 Method and device for correcting scanned image and image scanning system
CN112184835B (en) * 2020-10-16 2024-01-19 深圳阿图科技有限公司 Deformation recovery method and system for piano keyboard image
CN113706439A (en) * 2021-03-10 2021-11-26 腾讯科技(深圳)有限公司 Image detection method and device, storage medium and computer equipment
CN114004732A (en) * 2021-06-22 2022-02-01 荣耀终端有限公司 Image editing prompting method and device, electronic equipment and readable storage medium
CN114697547A (en) * 2022-02-14 2022-07-01 上海奕瑞光电子科技股份有限公司 Image diagnosis system and image risk processing method

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4750047B2 (en) * 2006-03-31 2011-08-17 株式会社リコー Misalignment detection apparatus, misalignment detection method, misalignment detection program, and recording medium
JP2010074342A (en) * 2008-09-17 2010-04-02 Fuji Xerox Co Ltd Image processing apparatus, image forming apparatus, and program
JP5641751B2 (en) * 2010-03-15 2014-12-17 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP5818091B2 (en) * 2011-12-27 2015-11-18 ソニー株式会社 Image processing apparatus, image processing system, image processing method, and program
JP5968084B2 (en) * 2012-05-30 2016-08-10 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP5762587B2 (en) * 2013-04-15 2015-08-12 キヤノン株式会社 Image processing apparatus and image processing method
JP5870231B2 (en) * 2013-05-13 2016-02-24 富士フイルム株式会社 Image processing apparatus, imaging apparatus, image processing method, and program
CN104506847A (en) * 2014-11-24 2015-04-08 小米科技有限责任公司 Method and device for detecting display fault
CN113763377A (en) * 2015-01-31 2021-12-07 文塔纳医疗系统公司 System and method for region of interest detection using slide thumbnail images
CN105791786A (en) * 2016-03-09 2016-07-20 上海易景信息科技有限公司 System and method for automatically adjusting smoothness of projection surface
CN106210508B (en) * 2016-06-24 2019-09-27 维沃移动通信有限公司 A kind of shooting preview method, wearable device and mobile terminal
CN106530267B (en) * 2016-11-30 2017-11-21 长沙全度影像科技有限公司 A kind of fusion method for avoiding panoramic picture from misplacing
CN107451978B (en) * 2017-08-07 2020-08-21 上海东软医疗科技有限公司 Image processing method, device and equipment
CN107729099A (en) * 2017-09-25 2018-02-23 联想(北京)有限公司 Background method of adjustment and its system

Also Published As

Publication number Publication date
CN108492246A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN108492246B (en) Image processing method and device and mobile terminal
US20220276909A1 (en) Screen projection control method and electronic device
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108495029B (en) A kind of photographing method and mobile terminal
CN107566730B (en) A panoramic image shooting method and mobile terminal
CN107977652B (en) Method for extracting screen display content and mobile terminal
CN108038825B (en) Image processing method and mobile terminal
CN108924414B (en) A shooting method and terminal equipment
CN110072012B (en) Reminding method for screen state switching and mobile terminal
CN110602401A (en) Photographing method and terminal
CN109739407B (en) Information processing method and terminal equipment
CN108196815B (en) Method for adjusting call sound and mobile terminal
JP7467667B2 (en) Detection result output method, electronic device and medium
WO2021077908A1 (en) Parameter adjusting method and electronic device
CN107608606A (en) A kind of image display method, mobile terminal and computer-readable recording medium
CN108763998A (en) Barcode recognition method and terminal equipment
CN108052368A (en) Application display interface control method and mobile terminal
CN108174110B (en) Photographing method and flexible screen terminal
CN108881721B (en) Display method and terminal
CN108307123B (en) Exposure adjusting method and mobile terminal
CN107729100B (en) Interface display control method and mobile terminal
CN111523286B (en) Picture display method, picture display device, electronic equipment and computer readable storage medium
CN108536513B (en) Picture display direction adjusting method and mobile terminal
CN110516495B (en) Code scanning method and mobile terminal

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
TG01 Patent term adjustment
TG01 Patent term adjustment