CN108492246B - Image processing method and device and mobile terminal - Google Patents
Image processing method and device and mobile terminal Download PDFInfo
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 24
- 238000012545 processing Methods 0.000 claims abstract description 47
- 238000000034 method Methods 0.000 claims abstract description 28
- 230000000875 corresponding effect Effects 0.000 claims description 25
- 230000007704 transition Effects 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 7
- 230000002596 correlated effect Effects 0.000 claims description 3
- 230000002159 abnormal effect Effects 0.000 abstract description 15
- 230000000694 effects Effects 0.000 abstract description 10
- 230000002411 adverse Effects 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 12
- 230000005856 abnormality Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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/04845—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User 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/72439—User 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/22—Cropping
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
Description
技术领域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
图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,对第一图像进行处理,获得第二图像。
其中,第一图像可以为进行实时拍照获得的图像,或者历史保存的拍照图像,也可以是通过网络在社交媒体上下载的图像。总之,通过各种渠道获得的图像,都可以为本发明实施例中的第一图像,该第一图像为一原图像。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
步骤102,检测所述第二图像上的差异区域,所述差异区域与所述第一图像的对应区域的差异度超过预定阈值。
其中,差异度是指差异区域与第一图像的对应区域之间发生色彩参数变化的像素的第一数量。差异区域的数量为至少一个。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
步骤201,按照一预定尺寸大小将第一图像划分为多个参考区域,以及将第二图像划分为多个对照区域,且多个参考区域和多个对照区域一一对应;
步骤202,对每一参考区域和与参考区域对应的对照区域进行色彩参数比对,确定参考区域和对照区域之间发生色彩参数变化的像素的第一数量;
步骤203,若第一数量大于预定数量,或者第一数量与第二数量的比值大于预定比例,则确定对照区域为差异区域,所述第二数量为参考区域内的像素数量。
在步骤201中的预定尺寸大小是指预定像素尺寸大小,该预定像素尺寸的具体像素值可以是预先存储的像素尺寸,也可以是用户重新设置的像素尺寸。The predetermined size in
其中,色彩参数是指像素的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
步骤103,输出一用于提示差异区域可能存在图像异常的提示信息。
由于对第一图像具体采取的处理操作的不同,在步骤102中检测出的差异区域可能是存在图像异常(图像失真)的区域,也可能是正常区域。因此,输出的提示信息所提示的是差异区域可能存在图像异常,而不是一定存在图像异常。例如,对第一图像进行处理的操作是裁剪操作,经过裁剪后获得的第二图像上与第一图像上对应的区域存在差异度超过预定阈值的可能性非常大,此时,步骤102中极有可能会检测到差异区域,但此时检测出的差异区域实质上并不存在图像异常的问题。再例如,假设第二图像上存在多人图像,对第一图像进行处理的操作是对图像进行腿部拉长处理,由于不同人的身高和腿长不同的原因,经过腿部拉长处理后获得的多人的腿部图像中,可能会存在部分人的腿部图像正常,而另一部分人的腿部图像失真的问题。综上,由于对第一图像所进行的处理的具体操作方式的不同,使得处理后获得的第二图像可能是正常的,也可能存在失真,通过输出一提示差异区域可能存在图像异常的提示信息,使得用户根据具体操作方式来判断第二图像是否真正的存在图像异常,可以提高用户体验。Due to different specific processing operations on the first image, the difference area detected in
用户通过输出的提示信息,可以根据对第一图像的具体处理方式,确定该第二图像是否真正存在异常错误,并且,在第二图像的差异区域确实存在异常错误时,能够及时进行修改处理,防止因图片处理差异过大造成图片失真,避免造成不良影响。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
在本发明实施例中,参照图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,确定一包含有差异区域和第一对照区域的分界线的过渡区域;
步骤402,根据过渡区域内的像素对应的权值与像素的当前色彩参数值的乘积,调整像素的色彩参数,其中,像素的权值,与像素到过渡区域内远离像素的边界线的距离正相关。
其中,该步骤402具体为:将过渡区域内的像素的色彩参数由当前色彩参数值调整为权值与当前色彩参数值的乘积。Wherein, the
具体地,第一对照区域为至少一个,根据第一对照区域的数量的不同,在步骤401中,一个差异区域对应的过渡区域至少为一个。Specifically, there is at least one first comparison area, and according to the number of the first comparison area, in
在步骤402中,像素的权重为像素到过渡区域内远离像素的边界线的距离与过渡区域的宽度的比值。也即,像素到过渡区域内远离像素的边界线的距离越大,该权值也越大。In
并且,在本发明实施例中,该过渡区域的形状为方向。其中,差异区域和第一对照区域的分界线为该过渡区域的中间分割线,也即,该过渡区域被该中间分割线分割为两部分,一部分属于该差异区域,另一部分属于该第一对照区域。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
检测模块502,用于检测第二图像上的差异区域,差异区域与第一图像的对应区域的差异度超过预定阈值;A
输出模块503,用于输出用于提示差异区域可能存在图像异常的提示信息。The
优选地,装置还包括:Preferably, the device also includes:
显示模块504,用于在用户界面显示用于保留差异区域的第一虚拟按键以及用于恢复差异区域的第二虚拟按键;A
保留模块505,用于若检测到对第一虚拟按键的触发操作,保留差异区域;恢复模块506,用于若检测到对第二虚拟按键的触发操作,恢复差异区域。The
优选地,检测模块502包括:Preferably, the
划分单元5021,用于按照一预定尺寸大小将第一图像划分为多个参考区域,以及将第二图像划分为多个对照区域,且多个参考区域和多个对照区域一一对应;A
比对单元5022,用于对每一参考区域和与参考区域对应的对照区域进行色彩参数比对,确定参考区域和对照区域之间发生色彩参数变化的像素的第一数量;The
确定单元5023,用于若第一数量大于预定数量,或者第一数量与第二数量的比值大于预定比例,则确定对照区域为差异区域,第二数量为参考区域内的像素数量。The determining
优选地,恢复模块506包括:Preferably, the
恢复单元5061,用于确定第一图像上与差异区域对应的目标参考区域,并将差异区域内的图像的色彩参数恢复为目标参考区域内的图像的色彩参数。The
优选地,在恢复差异区域之后,若与差异区域相邻的第一对照区域未被恢复,装置还包括: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
调整模块508,用于根据过渡区域内的像素对应的权值与像素的当前色彩参数值的乘积,调整该像素的色彩参数,其中,像素的权值,与像素到过渡区域内远离像素的边界线的距离正相关。The
优选地,调整模块508包括:Preferably, the
调整单元5081,用于将过渡区域内的像素的色彩参数由当前色彩参数值调整为权值与当前色彩参数值的乘积。The
本发明实施例提供的图像处理装置能够实现图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
其中,射频单元601,用于根据处理器610的控制进行收发信号;Wherein, the
处理器610,用于对第一图像进行处理,获得第二图像;a
检测第二图像上的差异区域,差异区域与第一图像的对应区域的差异度超过预定阈值;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
移动终端通过网络模块602为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides users with wireless broadband Internet access through the
音频输出单元603可以将射频单元601或网络模块602接收的或者在存储器609中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元603还可以提供与移动终端600执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元603包括扬声器、蜂鸣器以及受话器等。The
输入单元604用于接收音频或视频信号。输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)6041和麦克风6042,图形处理器6041 对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元606 上。经图形处理器6041处理后的图像帧可以存储在存储器609(或其它存储介质)中或者经由射频单元601或网络模块602进行发送。麦克风6042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元601发送到移动通信基站的格式输出。The
移动终端600还包括至少一种传感器605,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板6061的亮度,接近传感器可在移动终端600移动到耳边时,关闭显示面板6061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击) 等;传感器605还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The
显示单元606用于显示由用户输入的信息或提供给用户的信息。显示单元 606可包括显示面板6061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板6061。The
用户输入单元607可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元607 包括触控面板6071以及其他输入设备6072。触控面板6071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板6071上或在触控面板6071附近的操作)。触控面板 6071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板6071。除了触控面板 6071,用户输入单元607还可以包括其他输入设备6072。具体地,其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The
进一步的,触控面板6071可覆盖在显示面板6061上,当触控面板6071 检测到在其上或附近的触摸操作后,传送给处理器610以确定触摸事件的类型,随后处理器610根据触摸事件的类型在显示面板6061上提供相应的视觉输出。虽然在图7中,触控面板6071与显示面板6061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板6071与显示面板6061集成而实现移动终端的输入和输出功能,具体此处不做限定。Furthermore, the
接口单元608为外部装置与移动终端600连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/ 输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元608可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端600内的一个或多个元件或者可以用于在移动终端600和外部装置之间传输数据。The
存储器609可用于存储软件程序以及各种数据。存储器609可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器 609可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The
处理器610是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器609内的软件程序和/或模块,以及调用存储在存储器609内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。The
移动终端600还可以包括给各个部件供电的电源611(比如电池),优选的,电源611可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The
另外,移动终端600包括一些未示出的功能模块,在此不再赘述。In addition, the
优选的,本发明实施例还提供一种移动终端,包括处理器610,存储器609,存储在存储器609上并可在所述处理器610上运行的计算机程序,该计算机程序被处理器610执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides a mobile terminal, including a
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(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)
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)
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)
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 |
-
2018
- 2018-03-12 CN CN201810201454.3A patent/CN108492246B/en active Active
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 |