A special effect verification method, device and electronic equipment

By calculating the comparison between pixel color differences in the image and the reference special effect image, the accuracy of the special effect processing function is automatically judged, and the problem of relying on manual verification in the prior art is solved, and efficiency and accuracy are improved.

CN113706371BActive Publication Date: 2025-04-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110211210.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-25
Publication Date
2025-04-29
Estimated Expiration
2041-02-25

AI Technical Summary

Technical Problem

The prior art cannot automatically and accurately determine whether the special effects processing function in image processing software is correct on the image, resulting in verification relying on manual labor and limited accuracy.

Method used

By calculating the color difference information between the original image and the pixel points at the same position as the image to be checked, the effect effective pixel points are determined, and compared with the effect pixel points in the reference effect image to judge the accuracy of the effect processing.

Benefits of technology

Reliance on labor is reduced, human resources is saved, efficiency in judging the accuracy of special effects processing functions is improved, and the accuracy of calibration results is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113706371B_ABST
    Figure CN113706371B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a special effect verification method, device and electronic device based on computer vision; an original image and an image to be verified corresponding to the original image can be obtained, color difference information between pixel points at the same position of the original image and the image to be verified can be calculated, special effect effective pixel points in the image to be verified can be determined, a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image can be obtained, and target special effect effective pixel points that are correctly effective among the special effect effective pixel points can be determined according to the position information of the reference special effect effective pixel points and the position of the special effect effective pixel points in the image to be verified; if the number of the target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification; thereby, the reliance on manual labor in the special effect verification process can be reduced, human resources can be saved, and the efficiency of judging the accuracy of the special effect processing function can be improved on the basis of ensuring accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a special effect verification method, device and electronic equipment. Background Art

[0002] At present, the functions of image processing software are becoming more and more abundant. In addition to puzzles and adding text, it also provides special effects processing functions such as beauty and adding special effects. For example, the beauty functions of some image processing software have the functions of beautifying, enlarging eyes, thinning the face, brightening eyes, adding foundation, lip gloss, eye shadow, and dyeing hair to the face. Users can use a variety of special effects processing functions when editing images or videos. The accurate implementation of special effects processing functions in actual applications is a key factor in ensuring user experience.

[0003] In the related art, the accuracy of the special effects processing function is generally judged from the implementation code level of the special effects processing function. However, this solution cannot judge whether the special effects processing effect is correct on the image. For example, it cannot judge whether beauty effects have been added to a video. Currently, such effects can only be verified by human eyes, which has high requirements on human resources and is restricted by the technical level of developers, and the accuracy of the verification results cannot be guaranteed. Summary of the invention

[0004] The embodiments of the present invention provide a special effect verification method, device and electronic device, which can reduce the dependence on manual work, save human resources, and improve the efficiency of judging the accuracy of special effect processing functions while ensuring accuracy.

[0005] An embodiment of the present invention provides a special effect verification method, comprising:

[0006] Acquire an original image and an image to be verified obtained by processing the original image with a special effects processing algorithm;

[0007] Calculating color difference information between pixels at the same position of the original image and the image to be verified, and determining special effect effective pixels in the image to be verified according to the color difference information;

[0008] Acquire a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is a reference original image corresponding to the original image and is obtained after being processed by the special effect processing algorithm;

[0009] Determine a target special effect effective pixel point that is correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified;

[0010] If the number of target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0011] Correspondingly, an embodiment of the present invention further provides a special effect verification device, the special effect verification device comprising:

[0012] An image acquisition unit, used to acquire an original image and an image to be verified obtained by processing the original image with a special effect processing algorithm;

[0013] A pixel point determination unit, used to calculate color difference information between the pixel points at the same position of the original image and the image to be verified, and determine the special effect effective pixel points in the image to be verified according to the color difference information;

[0014] A reference image acquisition unit, used to acquire a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is an image obtained after the reference original image corresponding to the original image is processed by the special effect processing algorithm;

[0015] a target pixel point determination unit, configured to determine a target special effect effective pixel point that is correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified;

[0016] The target pixel point verification unit is used to determine that the image to be verified passes the special effect verification if the number of the target special effect effective pixel points meets the preset special effect effective condition.

[0017] In an optional example, the pixel determination unit is used to obtain the red component, blue component and green component of the pixel value corresponding to each pixel in the original image, and the red component, blue component and green component of the pixel value corresponding to each pixel in the image to be verified;

[0018] Calculate the red component difference, blue component difference and green component difference between the pixels at the same position in the original image and the image to be verified, calculate the sum of the absolute values ​​of the red component difference, blue component difference and green component difference of the pixels at the same position, and obtain color difference information of the pixels at the same position;

[0019] The pixel points in the image to be verified whose color difference information is greater than a preset color difference threshold are determined as special effect effective pixel points.

[0020] In an optional example, before the image acquisition unit, a reference image acquisition unit is further included, which is used to acquire the reference original image and the special effect processing algorithm;

[0021] Performing special effects processing on the reference original image based on the special effects processing algorithm to obtain the reference special effects image;

[0022] Calculate color difference information between pixels at the same position of the reference original image and the reference special effect image, determine reference special effect effective pixel points in the reference special effect image according to the color difference information, and obtain position information of reference special effect effective pixel points in the reference special effect image.

[0023] In an optional example, the apparatus of the embodiment of the present invention further includes a special effect strength verification unit, which is used to obtain a reference special effect processing strength of the special effect processing algorithm on the reference special effect image, and a target special effect processing strength of the special effect processing algorithm on the image to be verified;

[0024] According to the position information of the reference special effect effective pixel point, obtain the first position information of the reference special effect effective pixel point on the image bearing object in the reference special effect image, and determine the original pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the original image based on the first position information, and determine the target pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the image to be verified;

[0025] Calculating first color change information between the original pixel in the original image and the reference special effect effective pixel in the reference special effect image, and calculating second color change information between the original pixel and the target pixel;

[0026] Determining an actual special effect processing intensity of the special effect processing algorithm on the image to be verified based on the first color change information, the second color change information and the reference special effect processing intensity;

[0027] If the difference information between the actual special effect processing intensity and the target special effect processing intensity is less than a preset intensity difference threshold, it is determined that the image to be verified passes the special effect processing intensity verification.

[0028] In an optional example, the special effect strength verification unit includes a color change calculation subunit, which is used to decompose the pixel values ​​of the original pixel point, the reference special effect effective pixel point and the target pixel point into a red component, a blue component and a green component;

[0029] Based on the red component, blue component and green component of the original pixel and the reference special effect effective pixel, a first red component difference, a first blue component difference and a first green component difference between the original pixel and the reference special effect effective pixel at the same position are calculated, and the sum of the absolute values ​​of the first red component difference, the first blue component difference and the first green component difference are calculated to obtain first color change information of the original pixel and the reference special effect effective pixel at the same position;

[0030] Based on the red component, blue component and green component of the target pixel and the original pixel, the second red component difference, the second blue component difference and the second green component difference between the corresponding original pixel and the target pixel are calculated, and the sum of the absolute values ​​of the second red component difference, the second blue component difference and the second green component difference is calculated to obtain the second color change information of the corresponding original pixel and the target pixel.

[0031] Correspondingly, the special effect intensity verification unit includes an intensity determination subunit, which is used to determine, for each of the original pixels, a comparison result of the color change degree of each of the original pixels in the reference special effect image and the image to be verified based on the corresponding first color change information and second color change information;

[0032] Based on the color change degree comparison result, the number of the original pixels, and the reference special effect processing intensity, the actual special effect processing intensity of the special effect processing algorithm on the image to be verified is determined.

[0033] In an optional example, the image acquisition unit further includes a region processing unit, which is used to perform special effect region detection on the original image to determine the special effect processing region in the original image;

[0034] Based on the special effect processing algorithm, special effect processing is performed on the special effect processing area in the original image to obtain the image to be verified.

[0035] The pixel point calculation unit may be used to determine, based on the special effect processing area in the original image, an area at the same position in the image to be verified as a special effect processed area in the image to be verified;

[0036] Calculate the color difference information between the pixels at the same position in the special effect processing area and the area after the special effect processing.

[0037] In an optional example, the original image includes at least two special effect processing areas, the image to be verified is obtained by processing each special effect processing area of ​​the original image based on the special effect processing algorithm and using a corresponding special effect processing intensity, and the special effect intensity verification unit includes an intensity acquisition subunit, which can be used to obtain a reference special effect processed area corresponding to the special effect processing area in the reference special effect image, and a reference special effect processing intensity of each reference special effect processing area;

[0038] Acquire the special effect processed area corresponding to the special effect processed area in the image to be verified, and the target special effect processing intensity of each special effect processed area.

[0039] The color change calculation subunit is used to calculate the first color change information of the original pixel points and the reference special effect pixel points in the corresponding special effect processing area and the reference special effect processed area;

[0040] For the corresponding special effect processing area and the area after special effect processing, the second color change information of the original pixel points and the target pixel points in the area is calculated.

[0041] The intensity determination subunit can also be used to determine, for each special effect processed area, the actual special effect processing intensity of the special effect processed area by the special effect processing algorithm based on the first color change information and the second color change information of the corresponding special effect processed area, and the reference special effect processing intensity of the reference special effect processed area corresponding to the special effect processed area.

[0042] In an optional example, the special effect processing algorithm includes at least two special effect processing sub-algorithms with different special effect effects, the reference special effect image includes at least two reference special effect sub-images obtained by performing special effect processing on the reference original image based on the special effect processing sub-algorithms respectively, and the pixel point determination unit can be used to extract the sub-images to be verified corresponding to each special effect processing sub-algorithm from the image to be verified based on the image to be verified and each of the special effect processing sub-algorithms, wherein one special effect processing sub-algorithm used for one sub-image to be verified is one;

[0043] Color difference information between the original image and each of the sub-images to be checked is calculated, and special effect effective pixel points in each of the sub-images to be checked are determined according to the color difference information.

[0044] Correspondingly, the reference image acquisition unit can be used to acquire the reference special effect sub-image corresponding to each of the special effect processing sub-algorithms, and the position information of the reference special effect effective pixel point in the reference special effect sub-image.

[0045] Correspondingly, the target pixel point determination unit can be used to determine the correctly effective target special effect effective pixel points among the special effect effective pixel points of the sub-image to be verified based on the position information of the reference special effect effective pixel points and the position of the special effect effective pixel points in the reference special effect sub-image and the sub-image to be verified corresponding to the same special effect processing sub-algorithm.

[0046] Correspondingly, the target pixel point verification unit can be used to determine that the image to be verified passes the special effect verification if the number of the target special effect effective pixel points in each of the sub-images to be verified meets the preset special effect effectiveness condition.

[0047] In an optional example, the pixel point determination unit further includes a region determination unit, which is used to perform special effect region detection on the original image to determine the special effect processing sub-region corresponding to each of the special effect processing sub-algorithms in the original image;

[0048] According to the special effect processing sub-region in the original image, the region at the same position in the image to be verified is determined as the special effect processed sub-region corresponding to each of the special effect processing sub-algorithms.

[0049] Correspondingly, the pixel point determination unit may also be used to determine a target sub-algorithm from the special effect processing sub-algorithm selection, and determine the special effect processed sub-regions corresponding to other special effect processing sub-algorithms except the target sub-algorithm as the target inverse operation region corresponding to the target sub-algorithm;

[0050] Based on the inverse algorithms corresponding to the other special effect processing sub-algorithms other than the target sub-algorithm, the target inverse operation area in the image to be verified is processed to obtain the sub-image to be verified corresponding to the target sub-algorithm;

[0051] For the special effect processed sub-region in the original image, and the special effect processed sub-region corresponding to the special effect processed sub-region in the sub-image to be verified, color difference information between pixel points at the same position is calculated, and special effect effective pixel points in each of the special effect processed sub-regions are determined based on the color difference information.

[0052] In an optional example, the special effect verification device of the embodiment of the present invention further includes an image restoration unit after the intensity determination subunit, which is used to obtain the reference original image;

[0053] According to the special effect processing algorithm, special effect processing is performed on the reference original image using the actual special effect processing intensity to obtain a special effect reference image;

[0054] Calculating first color difference information between pixels at the same position in the reference original image and the special effect restored reference image;

[0055] According to the first color difference information, the pixel values ​​of the pixels corresponding to the reference special effect effective pixels in the image bearing object of the image to be verified are adjusted and determined to obtain a special effect restored image corresponding to the image to be verified.

[0056] Correspondingly, an embodiment of the present invention also provides an electronic device, including a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to execute the steps in any special effect verification method provided by the embodiment of the present invention.

[0057] In addition, an embodiment of the present invention further provides a storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any special effect verification method provided by the embodiment of the present invention.

[0058] By adopting the scheme of the embodiment of the present invention, an original image and an image to be verified obtained after the original image is processed by a special effects processing algorithm can be obtained, color difference information between pixels at the same position of the original image and the image to be verified can be calculated, special effect effective pixels in the image to be verified can be determined according to the color difference information, a reference special effect image and position information of reference special effect effective pixels in the reference special effect image can be obtained, the reference special effect image is a reference original image corresponding to the original image and an image obtained after being processed by the special effects processing algorithm, and the correct special effect effective pixels in the image to be verified can be determined according to the position information of the reference special effect effective pixels and the position of the special effect effective pixels in the image to be verified. The effective target special effect effective pixel points, if the number of the target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified has passed the special effect verification; because in this embodiment, the color difference information between the corresponding pixel points in the original image and the image to be verified can be calculated to determine the special effect effective pixel points in the image to be verified, and according to the preset reference special effect image, the correctly effective target special effect effective pixel points in the special effect effective pixel points are determined, and according to the number of the target special effect effective pixel points, the effect of the special effect is verified. Therefore, the reliance on manual labor in the special effect verification process can be reduced, human resources can be saved, and on the basis of ensuring accuracy, the special effect effect can be verified from the image level, thereby improving the efficiency of judging the accuracy of the special effect processing function. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0060] Figure 1 Schematic diagram of a scene of a special effect verification method provided by an embodiment of the present invention;

[0061] Figure 2 is a flow chart of a special effect verification method provided by an embodiment of the present invention;

[0062] Figure 3 It is a schematic diagram of a processing area of ​​a special effects processing algorithm for performing beauty makeup on a face provided by an embodiment of the present invention;

[0063] Figure 4 is a schematic diagram of reference special effect effective pixel points in a reference special effect image provided by an embodiment of the present invention;

[0064] Figure 5 is a schematic diagram of target special effect effective pixel points in an image to be verified provided by an embodiment of the present invention;

[0065] Figure 6 is another flow chart of the special effect verification method provided by an embodiment of the present invention;

[0066] Figure 7 is a structural schematic diagram of a special effect verification device provided by an embodiment of the present invention;

[0067] Figure 8 is another structural schematic diagram of the special effect verification device provided by an embodiment of the present invention;

[0068] Fig. 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0070] The embodiments of the present invention provide a special effect verification method, device, electronic device and storage medium. Specifically, the embodiments of the present invention provide a special effect verification method applicable to a special effect verification device, and the special effect verification device can be integrated in an electronic device.

[0071] The electronic device can be a terminal or other device, including but not limited to a mobile terminal and a fixed terminal. For example, a mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a laptop computer, a smart car-mounted terminal, etc., wherein a fixed terminal includes but is not limited to a desktop computer, a smart TV, etc.

[0072] The electronic device can also be a server or other device. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.

[0073] The special effect verification method of the embodiment of the present invention can be implemented by the server, or can be implemented by the terminal and the server together.

[0074] The following takes the example of a terminal and a server jointly implementing the special effect verification method to illustrate the method.

[0075] like Figure 1 As shown, the special effects verification system provided by the embodiment of the present invention includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 are connected via a network, for example, via a wired or wireless network connection, etc., wherein the terminal 10 can exist as a terminal for a user to send customer data to be analyzed to the server 20.

[0076] Among them, the terminal 10 can be a terminal for users to upload original images. The terminal 10 can process the original image through a special effect processing algorithm selected by the user to obtain an image to be verified. The terminal 10 is used to send the original image and the image to be verified to the server 20.

[0077] The server 20 can be used to obtain an original image and an image to be verified after the original image is processed by a special effects processing algorithm, calculate the color difference information between the pixels at the same position of the original image and the image to be verified, determine the special effect effective pixels in the image to be verified according to the color difference information, obtain a reference special effect image, and the position information of the reference special effect effective pixels in the reference special effect image, the reference special effect image is a reference original image corresponding to the original image, and is an image obtained after being processed by the special effects processing algorithm, determine the target special effect effective pixels that are correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixels and the position of the special effect effective pixels in the image to be verified, and if the number of the target special effect effective pixels meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect effect verification.

[0078] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0079] The embodiment of the present invention will be described from the perspective of a special effect verification device, which can be specifically integrated in a server or a terminal.

[0080] like Figure 2 As shown, the specific process of the special effect verification method of this embodiment can be as follows:

[0081] 201. Acquire an original image and an image to be verified obtained by processing the original image with a special effect processing algorithm.

[0082] When the original image is processed by special effects processing algorithm to obtain the image to be verified, computer vision technology (Computer Vision, CV) is applied. Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify, track and measure targets, and further perform graphic processing to make computer processing into an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition, optical character recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0083] Among them, the special effects processing algorithm can realize operations such as adding filters, face beautification, and adding animation to the original image or original video. Users can select a specific special effects processing algorithm on the terminal to process the original image or original video.

[0084] Among them, the original image is an image that has not been processed by a specific special effect processing algorithm. The original image can be an image taken instantly by the user through the terminal, or a stored image selected by the user from the terminal, or a video frame obtained after decoding, frame extraction, key frame extraction, etc. of the original video that has not been processed by a special effect processing algorithm, etc.

[0085] It is understandable that the original image may be an image that has not been processed by any special effect processing algorithm, or may be an image that has been processed by some special effect processing algorithms but not by a specific special effect processing algorithm.

[0086] Optionally, if the user provides an original video, the step of "obtaining the original image" may include:

[0087] An original video is obtained, and key frames are extracted from the original video to obtain at least one video frame as an original image.

[0088] In an example, the image to be verified can be an image obtained by processing the original image provided by the user with a specific special effects processing algorithm, or it can be a video frame obtained by decoding, frame extraction, key frame extraction, etc. of the video to be verified processed by the special effects processing algorithm, etc.

[0089] Optionally, if the video to be verified is a processed video, the step of "obtaining the image to be verified obtained by processing the original image with a special effects processing algorithm" may include:

[0090] The video to be verified is obtained after being processed by a special effects processing algorithm, and key frames are extracted from the video to be verified to obtain at least one video frame corresponding to the original image as the image to be verified.

[0091] Among them, when determining the image to be verified corresponding to the original image from the video to be verified, it can be that the time point at which the original image in the original video is located is recorded, and then a video frame at the same time point is selected from the video to be verified as the image to be verified based on the time point, or the similarity between the video frame extracted from the video to be verified and the original image is calculated. If the similarity between the video frame extracted from the video to be verified and the original image is greater than a preset value, the video frame is used as the image to be verified corresponding to the original image.

[0092] 202. Calculate color difference information between pixels at the same position of the original image and the image to be verified, and determine special effect effective pixels in the image to be verified according to the color difference information.

[0093] Among them, taking the special effects processing algorithm as an example to beautify the face, in the image to be verified after being processed by the special effects processing algorithm, the position of the special effect effective pixel point can be as follows Figure 5 The positions of the white pixels are shown in the figure.

[0094] Among them, the special effects processing algorithm for face beautification refers to Figure 3 The forehead processing area, eye shadow processing area, nose processing area, lip processing area, etc. of the person's face in the image shown are subjected to color modification, visual beautification, and other operations.

[0095] Among them, the color information of each pixel in the image can be expressed in the form of RGB (Red, Green, Blue) color mode, HSB (Hue, Saturation, Brightness) color mode, Lab color mode (a color mode established according to an international standard for measuring color formulated by the International Illumination Commission), CMYK (printing four-color mode) color mode, etc.

[0096] The color difference information can be obtained by calculating the Euclidean distance in the color space, etc., and can reflect the color difference between the pixels at the same position of the original image and the image to be verified.

[0097] It can be understood that the pixel value of each pixel point can be decomposed into components of three channels of the Lab mode, or the pixel value of each pixel point can be decomposed into components of three channels of red, blue and green of the RGB mode. Since the RGB color mode is a color mode defined according to the colors recognized by the human eye, it has a wide range of applications in practical applications. Therefore, the color information of each pixel point in the image can be represented by the RGB color mode. Optionally, step 202 may specifically include:

[0098] Obtain the red component, blue component and green component of the pixel value corresponding to each pixel point in the original image, as well as the red component, blue component and green component of the pixel value corresponding to each pixel point in the image to be verified;

[0099] Calculate the red component difference, blue component difference and green component difference between the pixels at the same position in the original image and the image to be verified, calculate the sum of the absolute values ​​of the red component difference, blue component difference and green component difference of the pixels at the same position, and obtain the color difference information of the pixels at the same position;

[0100] The pixels in the image to be verified whose color difference information is greater than a preset color difference threshold are determined as special effect effective pixels.

[0101] Among them, the pixel value can be represented by the RGB color mode. For example, the pixel value of a point in the image can be (163, 148, 128), "163" represents the red component when the color of the point is represented by the RGB color mode, "148" represents the green component when the color of the point is represented by the RGB color mode, and "128" represents the blue component when the color of the point is represented by the RGB color mode.

[0102] In order to improve the calculation efficiency, the red component difference, the blue component difference and the green component difference can be directly added to obtain the color difference information. That is, the step of "calculating the sum of the absolute values ​​of the red component difference, the blue component difference and the green component difference of the pixel points at the same position" can also include:

[0103] Calculate the sum of the red component difference, blue component difference, and green component difference of pixels at the same position.

[0104] Among them, the step of "calculating the sum of the absolute values ​​of the red component difference, the blue component difference and the green component difference of the pixel points at the same position" can be expressed by the following formula:

[0105]

[0106] in, Represents the red component of the pixel at the coordinate (w,h) in the original image. Represents the green component of the pixel at coordinate (w,h) in the original image. Represents the blue component of the pixel at coordinate (w,h) in the original image; Represents the red component of the pixel at the coordinate (w,h) in the coordinate system of the image to be verified. The meaning and Similar, I will not go into details here.

[0107] in, represents the difference in red color between the pixel with coordinates (w, h) in the original image and the image to be verified, represents the absolute value of the difference between the red component of the pixel with coordinates (w, h) in the original image and the image to be verified; The meaning is the same as above Similar, I will not go into details here.

[0108] In one example, the step of “determining pixels in the image to be verified whose color difference information is greater than a preset color difference threshold as special effect effective pixels” can be expressed by the following formula:

[0109]

[0110] Wherein, k is the preset color difference threshold.

[0111] In actual application, in order to save computing resources and improve the efficiency of calculating color difference information, before directly calculating the color difference information between the pixels at the same position of the original image and the image to be verified, the processing range of the special effect processing algorithm in the original image and the image to be verified can be determined first, and then the color difference information of the pixels in the processing range can be calculated. Optionally, before the step of "obtaining the original image and the image to be verified obtained after the original image is processed by the special effect processing algorithm", it can include:

[0112] Performing special effect area detection on the original image to determine the special effect processing area in the original image;

[0113] Based on the special effect processing algorithm, special effect processing is performed on the special effect processing area in the original image to obtain the image to be verified.

[0114] Among them, developers can pre-mark the processing range of special effects processing algorithms. For example, developers can set the 001 label for special effects processing algorithm A, indicating that the processing area of ​​special effects processing algorithm A is the human face area; set the 002 label for special effects processing algorithm B, indicating that the processing area of ​​special effects processing algorithm B is the human hand area, and so on.

[0115] In another example, the developer can also directly establish a correspondence between the special effects processing algorithm and the processing area. Once the special effects processing algorithm to be used is determined, the corresponding processing area can be directly determined. For example, if the user is using special effects processing algorithm A, it can be determined that the target processing area in the original image and the image to be verified is the human face area.

[0116] When the special effect area is detected on the original image, the special effect processing area in the original image can be determined according to the processing area corresponding to the special effect processing algorithm. For example, if the processing area corresponding to the special effect processing algorithm is a human face, the range of the human face in the original image can be identified as the special effect processing area by identifying facial feature points, using support vector machines or neural networks, etc.

[0117] Optionally, if the special effect processing area in the original image and the image to be verified is predetermined, the color difference information can be calculated only for the pixels in the special effect processing area to save computing resources. The step of "calculating the color difference information between the pixels at the same position of the original image and the image to be verified" can specifically include:

[0118] Based on the special effect processing area in the original image, determine the area at the same position in the image to be verified as the special effect processed area in the image to be verified;

[0119] Calculate the color difference information between the pixels at the same position in the special effect processing area and the area after special effect processing.

[0120] Optionally, before applying the special effects processing algorithm to the original image, the special effects processing area does not need to be determined in advance. Instead, when calculating the color difference information between the pixels at the same position in the original image and the image to be verified, the special effects area is first detected on the original image and the image to be verified, and then the color difference information is calculated. This can save computing resources and improve the efficiency of calculating color difference information.

[0121] 203. Obtain a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image. The reference special effect image is an image obtained after a special effect processing algorithm is used to process a reference original image corresponding to the original image.

[0122] The reference special effect image is an image pre-set by the developer before the special effect verification. The developer ensures that the position of the reference special effect effective pixel point in the reference special effect image is correct by manually adjusting the pixel value and manually confirming the effect of the special effect processing algorithm.

[0123] Specifically, the reference special effect image can be obtained by the following method, before step 201, further comprising:

[0124] Obtain reference original images and special effects processing algorithms;

[0125] Performing special effects processing on the reference original image based on a special effects processing algorithm to obtain a reference special effects image;

[0126] Calculate the color difference information between the pixel points at the same position of the reference original image and the reference special effect image, determine the reference special effect effective pixel points in the reference special effect image according to the color difference information, and obtain the position information of the reference special effect effective pixel points in the reference special effect image.

[0127] In actual application, developers can concentrate on generating reference special effects images for different special effects processing algorithms, and can store the obtained reference special effects images in a pre-set storage area. Whenever the special effects verification method is executed, the reference special effects images can be directly obtained from the storage area.

[0128] Among them, the position information of the reference special effect effective pixel point can indicate the position of the reference special effect effective pixel point in the reference special effect image. The position information of the reference special effect effective pixel point can specifically be the specific position of the reference special effect effective pixel point. For example, if the reference special effect image is placed in a preset coordinate system, the position information of a reference special effect effective pixel point can be (3, 5) and so on; the position information of the reference special effect effective pixel point can also be identification information. For example, the pixel value of the reference special effect effective pixel point can be modified to (255, 255, 255), that is, white as the position information. When the position information of a point is detected to be (255, 255, 255), the point can be considered to be the reference special effect effective pixel point.

[0129] For example, if the special effects processing algorithm is a beauty algorithm, the reference special effects image is obtained after processing the reference original image. The pixel values ​​of all reference special effects effective pixels in the reference special effects image can be modified to (255, 255, 255), and then a new reference template image is generated to facilitate the subsequent determination of the position of the reference special effects effective pixels or calculation of the number of reference special effects effective pixels, etc.

[0130] The reference original image is an image corresponding to a special effect processing algorithm and preset by a developer, and the reference original image has not been processed by the corresponding special effect processing algorithm.

[0131] Optionally, each special effect processing algorithm may correspond to only one reference original image or multiple reference original images. For example, in actual application, each special effect processing algorithm may correspond to only one reference original image. In order to ensure the effectiveness of the special effect verification method, the reference original image may be the same as the original image. In this case, the same special effect processing algorithm, under ideal circumstances, processes the same area of ​​the original image and the reference original image.

[0132] Alternatively, the reference original image may be different from the original image. The developer may limit in the graphical display interface the original image obtained by the user through photography or the original image directly provided by the user, the posture of the characters, the proportion of the characters in the image, etc., so that under ideal circumstances, the same special effects processing algorithm processes the same area of ​​the original image and the reference original image or the degree of similarity of the areas exceeds a preset value.

[0133] In another example, each special effect processing algorithm can correspond to multiple images. For example, the developer can set each special effect processing algorithm to correspond to multiple reference original images of different resolutions as alternatives, such as 640*480, 800*600, etc. After obtaining the original image, the resolution of the original image can be analyzed, and the resolution closest to the original image can be selected from the alternative reference original images as the reference original image, and the resolution of the original image can be processed to be the same as that of the reference original image;

[0134] Alternatively, if the special effects processing algorithm is related to human faces, animal bodies, etc., for example, the special effects processing algorithm can be a beautification process for human faces, the developer can set multiple reference original images with different face ratios in the image as alternatives, such as images with 20% face ratio, 50% face ratio, etc. After obtaining the original image, the face ratio in the original image can be analyzed, and the one with the closest face ratio can be selected from the alternative reference original images as the reference original image;

[0135] Alternatively, the terminal may collect data on the user's face to generate a three-dimensional image. If an image containing the user's face is obtained, a reference original image corresponding to the original image may be generated from the three-dimensional image based on conditions such as the face angle and face ratio in the original image.

[0136] 204. Determine a correctly effective target special effect effective pixel among the special effect effective pixels according to the position information of the reference special effect effective pixel and the position of the special effect effective pixel in the image to be verified.

[0137] The correctly effective special effect pixel point refers to a pixel point whose position of the special effect pixel point in the image to be verified is the same as the position of the reference special effect pixel point.

[0138] Optionally, step 204 can be expressed by the following formula:

[0139] S t ∩S m

[0140] Among them, S m Indicates the special effect effective pixel in the image to be verified, S t Indicates the effective pixel of the reference special effect in the image to be verified, S t ∩S m It indicates that the target special effect effective pixel point that is correctly effective among the special effect effective pixels is determined according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified.

[0141] In one example, the positions of the pixels in the image to be verified and the reference special effect image may be represented by a preset coordinate system, and the image to be verified and the reference special effect image occupy the same area in the coordinate system. Step 204 may specifically include:

[0142] Determine the coordinates of the reference special effect effective pixel point in a preset coordinate system according to the position information of the reference special effect effective pixel point;

[0143] Determine the coordinates of the special effect effective pixel point in the image to be verified in a preset coordinate system according to the position of the special effect effective pixel point in the image to be verified in the image to be verified;

[0144] Among the special effect effective pixel points of the image to be verified, the special effect effective pixel points having the same coordinates as the reference special effect effective pixel points in the coordinate system are taken as the correctly effective special effect effective pixel points.

[0145] The preset coordinate system may be constructed in any manner, and may be constructed with the center point of the image to be verified as the coordinate origin, the horizontal direction as the horizontal axis, and the vertical direction as the vertical axis; or may be constructed with the straight lines where the mutually perpendicular boundaries of the original image are located as the horizontal axis and the vertical axis, and the intersection of the boundaries as the coordinate origin, etc. The preset coordinate system may be constructed according to actual applications and is not limited in the embodiments of the present invention.

[0146] 205. If the number of target special effect effective pixel points meets a preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0147] The preset special effect effective condition may be that the ratio between the number of target special effect effective pixels and the number of all special effect effective pixels in the image to be verified is greater than a preset first threshold. Step 205 may specifically include:

[0148] Calculate the ratio between the number of pixels at which the target special effect is effective and the number of all pixels at which the special effect is effective in the image to be verified;

[0149] If the ratio is greater than a preset first threshold, it is determined that the image to be verified passes the special effect verification.

[0150] Among them, it can be specifically expressed by the following formula:

[0151]

[0152] Among them, |S t ∩S m | indicates the number of pixels where the target special effect is effective. |S m | represents the number of pixels in the image to be verified where all special effects are effective, k s Indicates a preset first threshold.

[0153] The preset first threshold value may be 98%, 99%, etc., which may be set by the developer according to actual needs.

[0154] In another example, the preset special effect effectiveness condition may be that the ratio between the number of target special effect effective pixels and the number of all reference special effect effective pixels in the reference special effect image is greater than a preset second threshold, wherein the preset second threshold may be set by the developer according to the actual application, and the corresponding preset second threshold may be different under different special effect processing intensities.

[0155] In another example, the preset special effect activation condition can be that the ratio of the area of ​​the target special effect activation area composed of the target special effect activation pixels is calculated based on the number of target special effect activation pixels, and the area of ​​the special effect activation area composed of all special effect activation pixels in the image to be verified is greater than a preset value. The preset value can be a value set by the developer according to actual needs.

[0156] In actual application, in addition to selecting a special effect processing algorithm, the user can also select the special effect processing intensity when the special effect processing algorithm processes the original image. If it is determined that the effective area of ​​the special effect effect is correct, it can be further determined whether the special effect processing intensity of the special effect processing algorithm is correct. Optionally, the reference original image and the original image include the same type of image bearing objects, and the special effect processing algorithm is an algorithm for performing special effect processing on the image bearing object. This embodiment may also include:

[0157] Obtaining a reference special effect processing intensity of the special effect processing algorithm for a reference special effect image, and a target special effect processing intensity of the special effect processing algorithm for a verification image;

[0158] According to the position information of the reference special effect effective pixel point, obtain the first position information of the reference special effect effective pixel point on the image bearing object in the reference special effect image, and determine the original pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the original image based on the first position information, and determine the target pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the image to be verified;

[0159] Calculating first color change information between an original pixel in the original image and a reference special effect effective pixel in the reference special effect image, and calculating second color change information between the original pixel and a target pixel;

[0160] Determine, based on the first color change information, the second color change information and the reference special effect processing intensity, an actual special effect processing intensity of the special effect processing algorithm to be used for the verification image;

[0161] If the difference information between the actual special effect processing intensity and the target special effect processing intensity is less than the preset intensity difference threshold, it is determined that the image to be verified passes the special effect processing intensity verification.

[0162] Among them, the image bearing object refers to the object included in the image that needs to be processed by the special effects processing algorithm. For example, in a landscape photo, if the object that needs to be processed by the special effects processing algorithm is a tree, then the image bearing object in the landscape photo is the tree; or, in a portrait photo, if the object that needs to be processed by the special effects processing algorithm is a human face, then the image bearing object in the portrait photo is the human face.

[0163] Among them, the original pixel point in the image-bearing object of the original image corresponding to the reference special effect effective pixel point means that the original pixel point and the reference special effect effective pixel point represent the same object content in the image-bearing object.

[0164] Taking the reference original image and the original image including the face of the same user as an example, a certain reference special effect effective pixel point represents a mole at the left corner of the human face, then the original pixel point corresponding to the reference special effect effective pixel point is also the same mole at the left corner of the human face.

[0165] The first color change information and the second color change information may reflect the color difference between the pixels.

[0166] Among them, taking the special effect processing algorithm for beautifying a human face as an example, in the reference special effect image processed by the special effect processing algorithm, the reference special effect effective area composed of the reference special effect effective pixels can be as follows Figure 4 The area composed of white pixels is shown in the figure.

[0167] In actual application, the user can freely select a special effect processing algorithm to process the original image through the terminal to obtain the target special effect processing intensity of the image to be verified. Therefore, before the step of "obtaining the original image and the image to be verified obtained after the original image is processed by the special effect processing algorithm", it also includes:

[0168] Obtaining a target special effect processing intensity of the image to be verified as the special effect processing intensity of the special effect processing algorithm for the image to be verified;

[0169] The original image is processed with special effects based on the special effects processing algorithm and the target special effects processing intensity to obtain the image to be verified.

[0170] In actual applications, due to problems such as algorithm deviation, there may be an error between the actual special effects processing intensity when the special effects processing algorithm processes the original image and the target special effects processing intensity.

[0171] Among them, the preset special effect intensity effectiveness condition can be that the absolute value of the difference between the target special effect processing intensity corresponding to the image to be verified when it is processed by the special effect processing algorithm and the actual special effect processing intensity is less than the preset intensity difference threshold. The intensity difference threshold can be a numerical value such as 1%, etc., and the developer can set it according to actual usage; the preset intensity judgment condition can also be that the difference between the target special effect processing intensity corresponding to the image to be verified when it is processed by the special effect processing algorithm and the actual special effect processing intensity satisfies the preset intensity difference range. The intensity difference range can be 1% to 2%, -1% to 1%, etc.

[0172] The reference special effect processing strength is the processing strength when the reference original image is processed using the special effect processing algorithm to obtain the reference special effect image. The developer can make the reference special effect processing strength the same as the actual reference special effect processing strength of the reference original image by the special effect processing algorithm through manual review, multiple processing, etc. Specifically, the step of "performing special effect processing on the reference original image based on the special effect processing algorithm to obtain the reference special effect image" includes:

[0173] The reference special effect processing intensity is used as the actual reference special effect processing intensity of the special effect processing algorithm for the reference original image;

[0174] Based on the special effects processing algorithm and the reference special effects processing strength, special effects processing is performed on the reference original image to obtain a reference special effects image.

[0175] It is understandable that the reference special effect processing intensity can be any processing intensity that can be achieved by the special effect processing algorithm. Generally, the reference special effect processing intensity is set to the maximum processing intensity that can be achieved by the special effect processing algorithm, such as 100%, so that the special effect processing algorithm can maximize the processing area of ​​the reference original image and the pixel value change of the pixel point is most obvious.

[0176] Among them, when calculating the first color change information, the pixel value of each pixel point can be decomposed into components of four channels of cyan, magenta, yellow, and black in the CMYK mode, or the pixel value of each pixel point can be decomposed into components of three channels of red, blue, and green in the RGB mode. Therefore, the step of "calculating the first color change information between the original pixel point in the original image and the reference special effect effective pixel point in the reference special effect image, and calculating the second color change information between the original pixel point and the target pixel point" may include:

[0177] Decompose the pixel values ​​of the original pixel, the reference special effect effective pixel and the target pixel into red component, blue component and green component;

[0178] Based on the red component, blue component and green component of the original pixel and the reference special effect effective pixel, a first red component difference, a first blue component difference and a first green component difference between the original pixel at the same position and the reference special effect effective pixel are calculated, and the sum of the absolute values ​​of the first red component difference, the first blue component difference and the first green component difference are calculated to obtain first color change information of the original pixel at the same position and the reference special effect effective pixel;

[0179] Based on the red component, blue component and green component of the target pixel and the original pixel, the second red component difference, the second blue component difference and the second green component difference between the corresponding original pixel and the target pixel are calculated, and the sum of the absolute values ​​of the second red component difference, the second blue component difference and the second green component difference is calculated to obtain the second color change information of the corresponding original pixel and the target pixel.

[0180] It is easy to think that in order to improve calculation efficiency, the red component difference, the blue component difference and the green component difference can be directly added to obtain color difference information.

[0181] Specifically, the step of “determining the actual special effect processing intensity of the special effect processing algorithm for the verification image based on the first color change information, the second color change information and the reference special effect processing intensity” may include:

[0182] For each original pixel, based on the corresponding first color change information and second color change information, determine a comparison result of the color change degree of each original pixel in the reference special effect image and the image to be verified;

[0183] Based on the comparison result of the color change degree, the number of original pixels, and the reference special effect processing intensity, the actual special effect processing intensity of the special effect processing algorithm on the image to be verified is determined.

[0184] The color change comparison result is information obtained by comparing the color change degree of the original coordinate point relative to the corresponding pixel point in the reference special effect image with the color change degree of the original pixel point relative to the image to be verified.

[0185] The calculation process of the color change degree comparison result can be expressed by the following formula:

[0186]

[0187] in, Represents the red component of the pixel at the coordinate (w,h) of the original pixel in the coordinate system. Represents the red component of the pixel at the coordinate (w, h) of the target pixel in the coordinate system. Indicates the red component of the pixel at the coordinate (w, h) in the coordinate system where the reference special effect takes effect. S k Indicates the reference effect effective pixel point, |S k | represents the number of pixels where the reference special effect is effective, x r Indicates the reference special effect processing intensity, x k Indicates the actual special effect processing intensity.

[0188] When the reference special effect processing intensity is 100%, the ratio of the sum of the ratios of each first color difference information to each corresponding second color difference information to the number of reference special effect effective pixels can be directly used as the actual special effect processing intensity.

[0189] In another example, the color change degree comparison result can also be calculated by the following formula:

[0190]

[0191] Alternatively, the color change degree comparison result can also be obtained by any other method that can calculate the relationship between the color change degree of the original coordinate point relative to the corresponding pixel point in the reference special effect image, and the color change degree of the original pixel point relative to the image to be verified.

[0192] In actual application, when a user selects a special effect processing algorithm to process an image, the special effect intensity at different positions can be adjusted according to personal aesthetics. In order to determine whether different special effect processing intensities are correct, the effective areas corresponding to different special effect processing intensities can be determined first, and then the effective intensities in different effective areas can be confirmed respectively. That is, the original image includes at least two special effect processing areas, and the image to be verified is obtained by processing each special effect processing area of ​​the original image based on the special effect processing algorithm with the corresponding special effect processing intensity. The step of "obtaining the reference special effect processing intensity of the special effect processing algorithm for the reference special effect image, and the target special effect processing intensity of the special effect processing algorithm for the image to be verified" may include:

[0193] Obtaining a reference special effect processed area corresponding to the special effect processed area in the reference special effect image, and a reference special effect processing intensity of each reference special effect processed area;

[0194] The special effect processed area corresponding to the special effect processed area in the image to be verified and the target special effect processing intensity of each special effect processed area are obtained.

[0195] For example, when a user uses a special effects processing algorithm that can achieve facial makeup effects to process an original image containing a face, different special effects processing intensities can be set for the eyes, lips, eyebrows and other areas in the original image.

[0196] Among them, the special effect processing area in the original image can be as follows Figure 3 As shown, it includes forehead treatment area, eye shadow treatment area, and so on.

[0197] Accordingly, after determining the reference special effect processed area in the reference special effect image and the special effect processed area in the image to be verified, the step of "calculating the first color change information between the original pixel point in the original image and the reference special effect effective pixel point in the reference special effect image, and calculating the second color change information between the original pixel point and the target pixel point" includes:

[0198] For the corresponding special effect processing area and the reference special effect processed area, first color change information of the original pixel points and the reference special effect pixel points in the area is calculated;

[0199] For the corresponding special effect processing area and the area after special effect processing, the second color change information of the original pixel points and the target pixel points in the area is calculated.

[0200] By calculating the first color change information and the second color change information through the special effect processing area, the reference special effect processed area and the special effect processed area, the calculation efficiency can be improved and the calculation resources can be saved.

[0201] Accordingly, the step of “determining the actual special effect processing intensity of the special effect processing algorithm on the verification image based on the first color change information, the second color change information and the reference special effect processing intensity” may include:

[0202] For each special effects processed area, the actual special effects processing intensity of the special effects processed area by the special effects processing algorithm is determined based on the first color change information and the second color change information of the corresponding special effects processed area, and the reference special effects processing intensity of the reference special effects processed area corresponding to the special effects processed area.

[0203] For example, users can set the following through the terminal: Figure 3 The special effects processing intensity of the eye shadow processing area shown in the figure is 80%, the special effects processing intensity of the lip processing area is 60%, etc. However, due to algorithm errors and other reasons, the special effects processing intensity of the eye shadow processing area may be 78%, the special effects processing intensity of the lip processing area may be 65%, and so on.

[0204] In actual application, users can use different special effects in different parts of an image. For example, users can choose to use special effects processing algorithm A in the eye area of ​​an image containing a face, and choose to use special effects processing algorithm B in the lip area, or users can choose to add sticker images to the image, etc. When calculating color difference information, the color difference information of pixels in the processing areas of different special effects processing algorithms can be calculated separately. Optionally, the special effects processing algorithm includes at least two special effects processing sub-algorithms with different special effects, and the reference special effects image includes at least two reference special effects sub-images obtained by performing special effects processing on the reference original image based on the special effects processing sub-algorithms separately. Embodiments of the present invention may include:

[0205] Acquire the original image and the image to be verified obtained after the original image is processed by the special effect processing algorithm;

[0206] Based on the image to be verified and each special effect processing sub-algorithm, extracting the sub-image to be verified corresponding to each special effect processing sub-algorithm from the image to be verified, wherein one sub-image to be verified adopts one special effect processing sub-algorithm;

[0207] Calculate the color difference information between the original image and each sub-image to be checked, and determine the special effect effective pixel point in each sub-image to be checked according to the color difference information;

[0208] Obtaining reference special effect sub-images corresponding to each special effect processing sub-algorithm, and position information of reference special effect effective pixel points in the reference special effect sub-images;

[0209] According to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the reference special effect sub-image and the sub-image to be verified corresponding to the same special effect processing sub-algorithm, determining the target special effect effective pixel point that is correctly effective among the special effect effective pixels of the sub-image to be verified;

[0210] If the number of target special effect effective pixel points in each sub-image to be verified meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0211] When it is determined that the number of target special effect effective pixels in each sub-image to be checked meets the preset special effect effective condition, it can be determined that the image to be checked has passed the special effect verification. If the number of target special effect effective pixels in a sub-image to be checked does not meet the preset special effect effective condition, the target special effect effective pixels in the sub-image to be checked can be re-determined, or it can be determined that the image to be checked has not passed the special effect verification.

[0212] In one example, when a user selects a special effects processing algorithm, multiple special effects processing algorithms may be used to process the original image or original video in sequence. When verifying the special effects, the special effects corresponding to the special effects processing algorithm can be directly verified after each special effects processing algorithm takes effect, or the effective effects can be verified collectively after multiple special effects processing algorithms take effect, thereby improving image processing efficiency.

[0213] Optionally, in order to save computing resources and improve computing efficiency, an area in each image that needs to be processed with special effects may be determined, and the area may be processed with special effects and verified with special effects. Before the step of "extracting sub-images to be verified corresponding to each special effects processing sub-algorithm from the image to be verified based on the image to be verified and each special effects processing sub-algorithm", the following may also be included:

[0214] Performing special effect area detection on the original image to determine the special effect processing sub-areas corresponding to each special effect processing sub-algorithm in the original image;

[0215] According to the special effect processing sub-region in the original image, determine the region at the same position in the image to be verified as the special effect processing sub-region corresponding to each special effect processing sub-algorithm;

[0216] Accordingly, the step of “extracting sub-images to be verified corresponding to each special effect processing sub-algorithm from the image to be verified based on the image to be verified and each special effect processing sub-algorithm” may include:

[0217] Determine a target sub-algorithm from the special effect processing sub-algorithm selection, and determine the special effect processed sub-regions corresponding to other special effect processing sub-algorithms except the target sub-algorithm as the target inverse operation region corresponding to the target sub-algorithm;

[0218] Based on the inverse algorithms corresponding to other special effect processing sub-algorithms outside the target sub-algorithm, the target inverse operation area in the image to be verified is processed to obtain the sub-image to be verified corresponding to the target sub-algorithm.

[0219] The inverse algorithm may be an image processing method obtained by developers according to the rules of inverse operations and the special effects processing sub-algorithm.

[0220] In one example, after obtaining the sub-image to be checked, the step of "calculating color difference information between the original image and each sub-image to be checked, and determining the special effect effective pixel point in each sub-image to be checked according to the color difference information" may include:

[0221] For the special effects processed sub-region in the original image, and the special effects processed sub-region corresponding to the special effects processed sub-region in the sub-image to be verified, the color difference information between the pixels at the same position is calculated, and the special effects effective pixels in each special effects processed sub-region are determined based on the color difference information.

[0222] Among them, only the special effect effect of a certain special effect processing sub-algorithm can be verified; or multiple or all special effect processing sub-algorithms can be verified. If the special effect effect of a sub-algorithm to be verified is verified, one of the unverified special effect processing sub-algorithms can be selected as a new target sub-algorithm, and the step of returning to execute the special effect processing sub-regions corresponding to other special effect processing sub-algorithms except the target sub-algorithm is determined as the target inverse operation region corresponding to the target sub-algorithm, until the special effect effects of all special effect processing sub-algorithms that need to be verified are verified.

[0223] It is understandable that in actual application, users may have requirements for removing beauty effects, photo restoration, etc. For images that have been processed with special effects, if the special effects processing algorithm and the actual special effects processing strength used in the image are known, the special effects can be removed from the image that has been processed with special effects based on the reference original image that has been processed with the same special effects. Therefore, after the step of "determining the actual special effects processing strength of the special effects processing algorithm for the image to be verified based on the first color change information, the second color change information and the reference special effects processing strength", the embodiment of the present invention may also include:

[0224] Obtain a reference original image;

[0225] According to the special effect processing algorithm, the reference original image is subjected to special effect processing using the actual special effect processing intensity to obtain a special effect reference image;

[0226] Calculating first color difference information between pixels at the same position in the reference original image and the special effect restored reference image;

[0227] According to the first color difference information, the pixel values ​​of the pixels corresponding to the reference special effect effective pixels in the image bearing object of the image to be verified are adjusted and determined to obtain a special effect restored image corresponding to the image to be verified.

[0228] The image to be verified may be an image obtained by processing the original image using a special effect processing algorithm on the terminal, or may be an image selected by the user from stored images, which includes a special effect processing algorithm and actual special effect processing intensity.

[0229] In actual application, in order to improve user experience, if the special effect fails to pass the verification, the image can be processed again according to the special effect processing algorithm directly or according to the user's instruction, that is, the method of the embodiment of the present invention can also include:

[0230] If the number of target special effect effective pixel points does not meet the preset special effect effective condition, obtain the special effect processing algorithm corresponding to the image to be verified;

[0231] Through the special effect processing algorithm, the original image is re-processed with special effects to obtain a new image to be verified;

[0232] Return to the step of calculating the color difference information between the pixel points at the same position of the original image and the image to be verified.

[0233] It is easy to imagine that if the actual special effect processing strength does not meet the preset special effect strength validation condition, the original image can also be re-processed with special effects until the image to be verified passes the special effect processing strength verification.

[0234] From the above, it can be seen that the embodiments of the present invention can reduce the reliance on manual labor in the special effects verification process, save human resources, verify the special effects from the image level on the basis of ensuring accuracy, and improve the efficiency of judging the accuracy of special effects processing functions.

[0235] The method described in the above embodiments is further described in detail below with examples.

[0236] The special effects verification method in this embodiment will be completed in the server. The following explanation will be given by taking the special effects processing algorithm as a way to make up a face and using the same original image and reference original image to test the special effects processing algorithm.

[0237] like Figure 6 As shown, the special effect verification method of this embodiment may have the following specific process:

[0238] 301. Obtain an original image and a special effect processing algorithm, and perform special effect processing on the original image based on the special effect processing algorithm and using a reference special effect processing intensity to obtain a reference special effect image.

[0239] The server may process the original image using different special effect processing algorithms to obtain reference special effect images corresponding to the different special effect processing algorithms.

[0240] In actual application, the reference special effect processing intensity is generally set to 100%.

[0241] In one example, the server may store the original image and the reference special effect image in a preset storage area. If the special effect needs to be verified, the server may obtain the original image and the reference special effect image corresponding to the special effect processing algorithm from the storage area.

[0242] 302. Calculate color difference information between pixels at the same position of the original image and the reference special effect image, determine reference special effect effective pixels in the reference special effect image according to the color difference information, and obtain position information of reference special effect effective pixels in the reference special effect image.

[0243] Among them, the position information of the reference special effect effective pixel point can be to adjust the pixel value corresponding to the reference special effect effective pixel point in the reference special effect image to (255, 255, 255), and adjust the pixel value of the pixel point other than the reference special effect effective pixel point to (0, 0, 0).

[0244] Optionally, the reference special effect image with adjusted pixel values ​​may be used as a reference special effect template image and stored in a preset storage area corresponding to the reference special effect image with unadjusted pixel values.

[0245] 303. Process the original image according to the special effect processing algorithm and the preset special effect effectiveness strength to obtain the image to be verified.

[0246] Among them, the intensity of special effects is essentially an adjustment of the parameters in the special effects processing algorithm. Developers can set the parameters in the special effects processing algorithm according to actual test needs and then process the original image.

[0247] 304. Calculate the color difference information between the pixels at the same position of the original image and the image to be verified, and determine the special effect effective pixel in the image to be verified according to the color difference information.

[0248] Optionally, the original image and the image to be verified can be set in the same preset coordinate system. The original image and the image to be verified occupy the same area. When looking for pixels in the same position, the coordinates of the pixels in the original image and the pixels in the image to be verified can be directly compared. If the coordinates are the same, they are regarded as pixels in the same position and the color difference information is calculated.

[0249] 305. Determine a correctly effective target special effect effective pixel among the special effect effective pixels according to the position information of the reference special effect effective pixel and the position of the special effect effective pixel in the image to be verified.

[0250] In one example, the position information of the reference special effect effective pixel point may be obtained first, and the reference special effect template image is used to determine the target special effect effective pixel point that is correctly effective among the special effect effective pixel points.

[0251] It can be understood that both the image to be verified and the reference special effect image are obtained by processing the original image using a special effect processing algorithm, so the resolutions of the original image, the image to be verified and the reference special effect image are the same.

[0252] In an example, the original image, the image to be verified, and the reference special effect image may be set in the same preset coordinate system, and the original image, the image to be verified, and the reference special effect image occupy the same area.

[0253] Among them, when determining the target special effect effective pixel point that is correctly effective among the special effect effective pixel points, the coordinates of the reference special effect effective pixel point in the reference special effect image and the special effect effective pixel point in the image to be verified can be compared. If the coordinates are the same, the special effect effective pixel point in the image to be verified is considered to be the target special effect effective pixel point.

[0254] 306. If the number of target special effect effective pixel points meets a preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0255] Specifically, the ratio between the number of target special effect effective pixels and the number of all special effect effective pixels in the image to be verified can be calculated. If the ratio is greater than a preset first threshold, it is determined that the image to be verified passes the special effect verification.

[0256] 307 . Obtain a reference special effect processing intensity of the special effect processing algorithm for the reference special effect image, and a target special effect processing intensity of the special effect processing algorithm for the image to be verified.

[0257] The reference special effect processing intensity and the target special effect processing intensity may be any special effect processing intensity that can be achieved by the special effect processing algorithm.

[0258] In step 311, the absolute value of the difference between the actual special effect processing intensity and the target special effect processing intensity can be calculated, and the obtained absolute value can be compared with the preset intensity threshold. If the absolute value is less than the preset intensity threshold, it can be considered that the image to be verified has passed the special effect intensity verification.

[0259] 308. According to the position information of the reference special effect effective pixel point, obtain the first position information of the reference special effect effective pixel point on the image bearing object in the reference special effect image, and based on the first position information, determine the original pixel point in the image bearing object of the original image corresponding to the reference special effect effective pixel point, and determine the target pixel point in the image bearing object of the image to be verified corresponding to the reference special effect effective pixel point.

[0260] Optionally, based on the reference special effect effective area, the area at the same position is determined in the reference original image, and all pixels in the area are used as original pixels. The method for determining the target pixels is similar and will not be described in detail here.

[0261] In actual application, since the special effect processing intensity when the special effect processing algorithm processes the original image to obtain the image to be verified is generally not greater than the processing intensity when the reference special effect image is obtained, the number of reference special effect effective pixels is generally not less than the number of special effect effective pixels, such as Figure 4 and Figure 5 As shown, Figure 5 The area formed by the white pixels is obviously smaller than Figure 4 The area formed by the white pixels in the image. Therefore, in addition to the special effect effective pixels, the target pixels may also include other pixels.

[0262] 309. Calculate first color change information between an original pixel in the original image and a reference special effect effective pixel in the reference special effect image, and calculate second color change information between the original pixel and a target pixel.

[0263] The method for calculating the first color change information and the second color change information is similar to the method for calculating the color difference information, which will not be described in detail here.

[0264] 310. Determine actual special effect processing intensity of the special effect processing algorithm on the image to be verified based on the first color change information, the second color change information, and the reference special effect processing intensity.

[0265] In an example, the calculation can be performed by the following formula:

[0266]

[0267] For example, if there are 100 pixels in the reference special effect effective area, then the number of original pixels and target pixels is also 100. The ratio between the first color change information and the second color change information of the 100 pixels can be calculated respectively, and then the ratio can be summed and divided by 100 to obtain the actual special effect processing intensity of the special effect processing algorithm.

[0268] 311. If the difference information between the actual special effect processing intensity and the target special effect processing intensity is less than a preset intensity difference threshold, it is determined that the image to be verified passes the special effect processing intensity verification.

[0269] If the absolute value of the difference between the actual special effect processing intensity and the target special effect processing intensity is smaller than a preset intensity threshold, it can be considered that the image to be verified has passed the special effect processing intensity verification.

[0270] For example, if the target special effects processing intensity is 80%, the actual special effects processing intensity is 79%, and the preset intensity threshold is 2%, the image to be verified passes the special effects processing intensity verification; if the actual special effects processing intensity is 75%, the image to be verified fails the special effects processing intensity verification.

[0271] It can be seen from the above that the embodiments of the present invention can reduce the reliance on manual labor in the special effect verification process, save human resources, and improve the efficiency of judging the accuracy of special effect processing functions while ensuring accuracy.

[0272] In order to better implement the above method, accordingly, an embodiment of the present invention also provides a special effect verification device.

[0273] refer to Figure 7 , the device comprises:

[0274] The image acquisition unit 701 is used to acquire the original image and the image to be verified obtained by processing the original image with a special effect processing algorithm;

[0275] The pixel point determination unit 702 is used to calculate the color difference information between the pixel points at the same position of the original image and the image to be verified, and determine the special effect effective pixel points in the image to be verified according to the color difference information;

[0276] The reference image acquisition unit 703 is used to acquire a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image. The reference special effect image is an image obtained after the reference original image corresponding to the original image is processed by a special effect processing algorithm.

[0277] The target pixel point determination unit 704 is used to determine the target special effect effective pixel point that is correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified;

[0278] The target pixel point verification unit 705 is used to determine whether the image to be verified passes the special effect verification if the number of target special effect effective pixel points meets a preset special effect effective condition.

[0279] In an optional example, the pixel determination unit 702 is used to obtain the red component, blue component and green component of the pixel value corresponding to each pixel in the original image, and the red component, blue component and green component of the pixel value corresponding to each pixel in the image to be verified;

[0280] Calculate the red component difference, blue component difference and green component difference between the pixels at the same position in the original image and the image to be verified, calculate the sum of the absolute values ​​of the red component difference, blue component difference and green component difference of the pixels at the same position, and obtain the color difference information of the pixels at the same position;

[0281] The pixels in the image to be verified whose color difference information is greater than a preset color difference threshold are determined as special effect effective pixels.

[0282] In an alternative example, Figure 8 As shown, before the image acquisition unit 701, a reference image acquisition unit 706 is also included, which is used to acquire a reference original image and a special effect processing algorithm;

[0283] Performing special effects processing on the reference original image based on a special effects processing algorithm to obtain a reference special effects image;

[0284] Calculate the color difference information between the pixel points at the same position of the reference original image and the reference special effect image, determine the reference special effect effective pixel points in the reference special effect image according to the color difference information, and obtain the position information of the reference special effect effective pixel points in the reference special effect image.

[0285] In an optional example, the apparatus of the embodiment of the present invention further includes a special effect strength verification unit 707, which is used to obtain a reference special effect processing strength of the special effect processing algorithm for the reference special effect image, and a target special effect processing strength of the special effect processing algorithm for the image to be verified;

[0286] According to the position information of the reference special effect effective pixel point, obtain the first position information of the reference special effect effective pixel point on the image bearing object in the reference special effect image, and determine the original pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the original image based on the first position information, and determine the target pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the image to be verified;

[0287] Calculating first color change information between an original pixel in the original image and a reference special effect effective pixel in the reference special effect image, and calculating second color change information between the original pixel and a target pixel;

[0288] Determine, based on the first color change information, the second color change information and the reference special effect processing intensity, an actual special effect processing intensity of the special effect processing algorithm to be used for the verification image;

[0289] If the difference information between the actual special effect processing intensity and the target special effect processing intensity is less than the preset intensity difference threshold, it is determined that the image to be verified passes the special effect processing intensity verification.

[0290] In an optional example, the special effect strength checking unit 707 includes a color change calculation subunit, which is used to decompose the pixel values ​​of the original pixel, the reference special effect effective pixel and the target pixel into a red component, a blue component and a green component;

[0291] Based on the red component, blue component and green component of the original pixel and the reference special effect effective pixel, a first red component difference, a first blue component difference and a first green component difference between the original pixel at the same position and the reference special effect effective pixel are calculated, and the sum of the absolute values ​​of the first red component difference, the first blue component difference and the first green component difference are calculated to obtain first color change information of the original pixel at the same position and the reference special effect effective pixel;

[0292] Based on the red component, blue component and green component of the target pixel and the original pixel, the second red component difference, the second blue component difference and the second green component difference between the corresponding original pixel and the target pixel are calculated, and the sum of the absolute values ​​of the second red component difference, the second blue component difference and the second green component difference is calculated to obtain the second color change information of the corresponding original pixel and the target pixel.

[0293] Correspondingly, the special effect intensity verification unit 707 includes an intensity determination subunit, which is used to determine, for each original pixel, a comparison result of the color change degree of each original pixel in the reference special effect image and the image to be verified based on the corresponding first color change information and second color change information;

[0294] Based on the comparison result of the color change degree, the number of original pixels, and the reference special effect processing intensity, the actual special effect processing intensity of the special effect processing algorithm on the image to be verified is determined.

[0295] In an optional example, the image acquisition unit 701 further includes a region processing unit 708, which is used to perform special effect region detection on the original image and determine the special effect processing region in the original image;

[0296] Based on the special effect processing algorithm, special effect processing is performed on the special effect processing area in the original image to obtain the image to be verified.

[0297] The pixel point determination unit 702 may be used to determine, based on the special effect processing area in the original image, an area at the same position in the image to be verified as a special effect processed area in the image to be verified;

[0298] Calculate the color difference information between the pixels at the same position in the special effect processing area and the area after special effect processing.

[0299] In an optional example, the original image includes at least two special effect processing areas, and the image to be verified is obtained by processing each special effect processing area of ​​the original image based on a special effect processing algorithm and using a corresponding special effect processing intensity. The special effect intensity verification unit 707 includes an intensity acquisition subunit, which can be used to obtain a reference special effect processed area corresponding to the special effect processing area in the reference special effect image, and a reference special effect processing intensity of each reference special effect processing area;

[0300] The special effect processed area corresponding to the special effect processed area in the image to be verified and the target special effect processing intensity of each special effect processed area are obtained.

[0301] A color change calculation subunit, for calculating first color change information of original pixels and reference special effect pixels in a corresponding special effect processing area and a reference special effect processed area;

[0302] For the corresponding special effect processing area and the area after special effect processing, the second color change information of the original pixel points and the target pixel points in the area is calculated.

[0303] The intensity determination subunit can also be used to determine, for each special effect processed area, the actual special effect processing intensity of the special effect processed area by the special effect processing algorithm based on the first color change information and the second color change information of the corresponding special effect processed area, and the reference special effect processing intensity of the reference special effect processed area corresponding to the special effect processed area.

[0304] In an optional example, the special effect processing algorithm includes at least two special effect processing sub-algorithms with different special effect effects, the reference special effect image includes at least two reference special effect sub-images obtained by performing special effect processing on the reference original image based on the special effect processing sub-algorithms respectively, and the pixel point determination unit 702 can be used to extract the sub-images to be verified corresponding to each special effect processing sub-algorithm from the image to be verified based on the image to be verified and each special effect processing sub-algorithm, wherein one special effect processing sub-algorithm used for one sub-image to be verified is one;

[0305] The color difference information between the original image and each sub-image to be checked is calculated, and the special effect effective pixel points in each sub-image to be checked are determined according to the color difference information.

[0306] Correspondingly, the reference image acquisition unit 706 may be used to acquire the reference special effect sub-image corresponding to each special effect processing sub-algorithm, and the position information of the reference special effect effective pixel point in the reference special effect sub-image.

[0307] Correspondingly, the target pixel point determination unit 704 can be used to determine the correctly effective target special effect effective pixel points among the special effect effective pixel points of the sub-image to be verified based on the position information of the reference special effect effective pixel points in the reference special effect sub-image and the sub-image to be verified corresponding to the same special effect processing sub-algorithm, as well as the position of the special effect effective pixel points.

[0308] Correspondingly, the target pixel point verification unit 705 can be used to determine that the image to be verified passes the special effect verification if the number of target special effect effective pixel points in each sub-image to be verified meets the preset special effect effective condition.

[0309] In an optional example, the pixel point determination unit 702 further includes a region determination unit 709, which is used to perform special effect region detection on the original image and determine the special effect processing sub-region corresponding to each special effect processing sub-algorithm in the original image;

[0310] According to the special effect processing sub-region in the original image, the region at the same position in the image to be verified is determined as the special effect processed sub-region corresponding to each special effect processing sub-algorithm.

[0311] Correspondingly, the pixel point determination unit 702 may also be used to determine a target sub-algorithm from the special effect processing sub-algorithm selection, and determine the special effect processed sub-regions corresponding to other special effect processing sub-algorithms except the target sub-algorithm as the target inverse operation region corresponding to the target sub-algorithm;

[0312] Based on the inverse algorithms corresponding to other special effect processing sub-algorithms outside the target sub-algorithm, the target inverse operation area in the image to be verified is processed to obtain the sub-image to be verified corresponding to the target sub-algorithm;

[0313] For the special effects processed sub-region in the original image, and the special effects processed sub-region corresponding to the special effects processed sub-region in the sub-image to be verified, the color difference information between the pixels at the same position is calculated, and the special effects effective pixels in each special effects processed sub-region are determined based on the color difference information.

[0314] In an alternative example, Figure 8 As shown, the special effect verification device of the embodiment of the present invention further includes an image restoration unit after the intensity determination subunit, which is used to obtain a reference original image;

[0315] According to the special effect processing algorithm, the reference original image is subjected to special effect processing using the actual special effect processing intensity to obtain a special effect reference image;

[0316] Calculating first color difference information between pixels at the same position in the reference original image and the special effect restored reference image;

[0317] According to the first color difference information, the pixel values ​​of the pixels corresponding to the reference special effect effective pixels in the image bearing object of the image to be verified are adjusted and determined to obtain a special effect restored image corresponding to the image to be verified.

[0318] From the above, it can be seen that through the special effects verification device, the reliance on manual labor in the special effects verification process can be reduced, human resources can be saved, and on the basis of ensuring accuracy, the special effects can be verified from the image level to improve the efficiency of judging the accuracy of special effects processing functions.

[0319] In addition, an embodiment of the present invention further provides an electronic device, which may be a terminal or a server. Fig. 9 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:

[0320] The electronic device may include a radio frequency (RF) circuit 901, a memory 902 including one or more computer-readable storage media, an input unit 903, a display unit 904, a sensor 905, an audio circuit 906, a wireless fidelity (WiFi) module 907, a processor 908 including one or more processing cores, and a power supply 909. Those skilled in the art will appreciate that Fig. 9 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0321] The RF circuit 901 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 908 for processing; in addition, the data related to the uplink is sent to the base station. Usually, the RF circuit 901 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 901 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0322] The memory 902 can be used to store software programs and modules, and the processor 908 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 908 and the input unit 903 with access to the memory 902.

[0323] The input unit 903 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 903 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, 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 the touch point coordinates, and then sends it to the processor 908, and can receive and execute the command sent by the processor 908. In addition, the touch-sensitive surface can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 903 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0324] The display unit 904 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 904 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 908 to determine the type of touch event. Subsequently, the processor 908 provides a corresponding visual output on the display panel according to the type of touch event. Although in Fig. 9 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.

[0325] The terminal may also include at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that verify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration verification related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the terminal, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0326] The audio circuit 906, the speaker, and the microphone can provide an audio interface between the user and the terminal. The audio circuit 906 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 906 and converted into audio data, and then the audio data is processed by the output processor 908 and sent to, for example, another terminal through the RF circuit 901, or the audio data is output to the memory 902 for further processing. The audio circuit 906 may also include an earplug jack to provide communication between an external headset and the terminal.

[0327] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 907. It provides users with wireless broadband Internet access. Fig. 9 A WiFi module 907 is shown, but it is understandable that it is not an essential component of the terminal and can be omitted as needed without changing the essence of the invention.

[0328] The processor 908 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it executes various functions of the terminal and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 908 may include one or more processing cores; preferably, the processor 908 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 908.

[0329] The terminal also includes a power supply 909 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 908 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 909 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0330] Although not shown, the terminal may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the processor 908 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 902 according to the following instructions, and the processor 908 will run the applications stored in the memory 902 to implement various functions, as follows:

[0331] Acquire the original image and the image to be verified obtained after the original image is processed by the special effect processing algorithm;

[0332] Calculate the color difference information between the pixels at the same position of the original image and the image to be verified, and determine the special effect effective pixel in the image to be verified according to the color difference information;

[0333] Obtain a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is an image obtained after the reference original image corresponding to the original image is processed by a special effect processing algorithm;

[0334] According to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified, determine the target special effect effective pixel point that is correctly effective among the special effect effective pixels;

[0335] If the number of target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0336] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0337] To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the special effect verification methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:

[0338] Acquire the original image and the image to be verified obtained after the original image is processed by the special effect processing algorithm;

[0339] Calculate the color difference information between the pixels at the same position of the original image and the image to be verified, and determine the special effect effective pixel in the image to be verified according to the color difference information;

[0340] Obtain a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is an image obtained after the reference original image corresponding to the original image is processed by a special effect processing algorithm;

[0341] According to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified, determine the target special effect effective pixel point that is correctly effective among the special effect effective pixels;

[0342] If the number of target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

[0343] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0344] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0345] Since the instructions stored in the storage medium can execute the steps in any special effect verification method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any special effect verification method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0346] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0347] The above is a detailed introduction to a special effects verification method, device and storage medium provided in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A special effect verification method, characterized in that: include: Acquire an original image and an image to be verified obtained by processing the original image with a special effects processing algorithm; Calculating color difference information between pixels at the same position of the original image and the image to be verified, and determining special effect effective pixels in the image to be verified according to the color difference information; Acquire a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is a reference original image corresponding to the original image, and is obtained after being processed by the special effect processing algorithm; Determine a target special effect effective pixel point that is correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified; If the number of target special effect effective pixel points meets the preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

2. The method according to claim 1, characterized in that The calculating color difference information between the pixel points at the same position of the original image and the image to be verified, and determining the special effect effective pixel points in the image to be verified according to the color difference information comprises: Obtaining the red component, blue component and green component of the pixel value corresponding to each pixel point in the original image, and the red component, blue component and green component of the pixel value corresponding to each pixel point in the image to be verified; Calculate the red component difference, blue component difference and green component difference between the pixels at the same position in the original image and the image to be verified, calculate the sum of the absolute values ​​of the red component difference, blue component difference and green component difference of the pixels at the same position, and obtain color difference information of the pixels at the same position; The pixel points in the image to be verified whose color difference information is greater than a preset color difference threshold are determined as special effect effective pixel points.

3. The method according to claim 1, characterized in that Before obtaining the reference special effect image and the position information of the reference special effect effective pixel point in the reference special effect image, the method further includes: Acquire the reference original image and the special effects processing algorithm; Performing special effects processing on the reference original image based on the special effects processing algorithm to obtain the reference special effects image; Calculate color difference information between pixels at the same position of the reference original image and the reference special effect image, determine reference special effect effective pixel points in the reference special effect image according to the color difference information, and obtain position information of reference special effect effective pixel points in the reference special effect image.

4. The method according to claim 1, characterized in that: The reference original image and the original image include the same type of image bearing objects, the special effect processing algorithm is an algorithm for performing special effect processing on the image bearing objects, and further includes: Acquire a reference special effect processing intensity of the special effect processing algorithm on the reference special effect image, and a target special effect processing intensity of the special effect processing algorithm on the image to be verified; According to the position information of the reference special effect effective pixel point, obtain the first position information of the reference special effect effective pixel point on the image bearing object in the reference special effect image, and determine the original pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the original image based on the first position information, and determine the target pixel point corresponding to the reference special effect effective pixel point in the image bearing object of the image to be verified; Calculating first color change information between the original pixel in the original image and the reference special effect effective pixel in the reference special effect image, and calculating second color change information between the original pixel and the target pixel; Determining an actual special effect processing intensity of the special effect processing algorithm on the image to be verified based on the first color change information, the second color change information and the reference special effect processing intensity; If the difference information between the actual special effect processing intensity and the target special effect processing intensity is less than a preset intensity difference threshold, it is determined that the image to be verified passes the special effect processing intensity verification.

5. The method according to claim 4, characterized in that The calculating of first color change information between the original pixel in the original image and the reference special effect effective pixel in the reference special effect image, and the calculating of second color change information between the original pixel and the target pixel include: Decomposing the pixel values ​​of the original pixel, the reference special effect effective pixel and the target pixel into a red component, a blue component and a green component; Based on the red component, blue component and green component of the original pixel and the reference special effect effective pixel, a first red component difference, a first blue component difference and a first green component difference between the original pixel and the reference special effect effective pixel at the same position are calculated, and the sum of the absolute values ​​of the first red component difference, the first blue component difference and the first green component difference are calculated to obtain first color change information of the original pixel and the reference special effect effective pixel at the same position; Based on the red component, blue component and green component of the target pixel and the original pixel, a second red component difference, a second blue component difference and a second green component difference between the corresponding original pixel and the target pixel are calculated, and the sum of the absolute values ​​of the second red component difference, the second blue component difference and the second green component difference are calculated to obtain second color change information of the corresponding original pixel and the target pixel; The determining, based on the first color change information, the second color change information and the reference special effect processing intensity, an actual special effect processing intensity of the special effect processing algorithm on the image to be verified includes: For each of the original pixels, based on the corresponding first color change information and second color change information, determine a comparison result of the color change degree of each of the original pixels in the reference special effect image and the image to be verified; Based on the color change degree comparison result, the number of the original pixels, and the reference special effect processing intensity, the actual special effect processing intensity of the special effect processing algorithm on the image to be verified is determined.

6. The method according to claim 4, characterized in that The original image includes at least two special effect processing areas, and the image to be verified is obtained by processing each special effect processing area of ​​the original image based on the special effect processing algorithm and using the corresponding special effect processing intensity; The obtaining of the reference special effect processing intensity of the special effect processing algorithm on the reference special effect image and the target special effect processing intensity of the special effect processing algorithm on the image to be verified includes: Acquire a reference special effect processed area corresponding to the special effect processed area in the reference special effect image, and a reference special effect processing intensity of each reference special effect processed area; Acquire a special effect processed region corresponding to the special effect processed region in the image to be verified, and a target special effect processing intensity of each special effect processed region; The calculating of first color change information between the original pixel in the original image and the reference special effect effective pixel in the reference special effect image, and the calculating of second color change information between the original pixel and the target pixel include: For the corresponding special effect processing area and the reference special effect processed area, first color change information of the original pixel points and the reference special effect pixel points in the area is calculated; For the corresponding special effect processing area and the area after special effect processing, calculate the second color change information of the original pixel points and the target pixel points in the area; The determining, based on the first color change information, the second color change information and the reference special effect processing intensity, an actual special effect processing intensity of the special effect processing algorithm on the image to be verified includes: For each special effect processed area, the actual special effect processing intensity of the special effect processed area by the special effect processing algorithm is determined based on the first color change information and the second color change information of the corresponding special effect processed area, and the reference special effect processing intensity of the reference special effect processed area corresponding to the special effect processed area.

7. The method according to claim 1, characterized in that The special effect processing algorithm includes at least two special effect processing sub-algorithms with different special effect effects, and the reference special effect image includes at least two reference special effect sub-images obtained by performing special effect processing on the reference original image based on the special effect processing sub-algorithms respectively; The calculating color difference information between the pixel points at the same position of the original image and the image to be verified, and determining the special effect effective pixel points in the image to be verified according to the color difference information, comprises: Based on the image to be verified and each of the special effect processing sub-algorithms, extracting the sub-image to be verified corresponding to each special effect processing sub-algorithm from the image to be verified, wherein one sub-image to be verified adopts one special effect processing sub-algorithm; Calculating color difference information between the original image and each of the sub-images to be checked, and determining a special effect effective pixel point in each of the sub-images to be checked according to the color difference information; The obtaining of the reference special effect image and the position information of the reference special effect effective pixel point in the reference special effect image includes: Acquire reference special effect sub-images corresponding to each of the special effect processing sub-algorithms, and position information of reference special effect effective pixel points in the reference special effect sub-images; The determining, based on the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified, a correctly effective target special effect effective pixel point among the special effect effective pixels, comprises: According to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the reference special effect sub-image and the sub-image to be verified corresponding to the same special effect processing sub-algorithm, determining the target special effect effective pixel point that is correctly effective among the special effect effective pixels of the sub-image to be verified; If the number of the target special effect effective pixel points meets the preset special effect effective condition, determining that the image to be verified passes the special effect verification includes: If the number of target special effect effective pixel points in each of the sub-images to be verified meets a preset special effect effective condition, it is determined that the image to be verified passes the special effect verification.

8. The method according to claim 7, characterized in that Before extracting the sub-images to be checked corresponding to the respective special effect processing sub-algorithms from the image to be checked based on the image to be checked and the respective special effect processing sub-algorithms, the method further comprises: Performing special effect area detection on the original image to determine the special effect processing sub-areas corresponding to each of the special effect processing sub-algorithms in the original image; According to the special effect processing sub-region in the original image, determining the region at the same position in the image to be verified as the special effect processing sub-region corresponding to each of the special effect processing sub-algorithms; The extracting, from the image to be verified, sub-images to be verified corresponding to each special effect processing sub-algorithm based on the image to be verified and each special effect processing sub-algorithm, comprises: Determine a target sub-algorithm from the special effect processing sub-algorithm selection, and determine the special effect processed sub-regions corresponding to other special effect processing sub-algorithms except the target sub-algorithm as the target inverse operation region corresponding to the target sub-algorithm; Based on the inverse algorithms corresponding to the other special effect processing sub-algorithms other than the target sub-algorithm, the target inverse operation area in the image to be verified is processed to obtain the sub-image to be verified corresponding to the target sub-algorithm; The calculating color difference information between the original image and each of the sub-images to be checked, and determining the special effect effective pixel point in each of the sub-images to be checked according to the color difference information, comprises: For the special effect processed sub-region in the original image, and the special effect processed sub-region corresponding to the special effect processed sub-region in the sub-image to be verified, color difference information between pixel points at the same position is calculated, and special effect effective pixel points in each of the special effect processed sub-regions are determined based on the color difference information.

9. A special effect verification device, characterized in that: include: An image acquisition unit, used to acquire an original image and an image to be verified obtained by processing the original image with a special effect processing algorithm; A pixel point determination unit, used to calculate color difference information between the pixel points at the same position of the original image and the image to be verified, and determine the special effect effective pixel points in the image to be verified according to the color difference information; A reference image acquisition unit, used to acquire a reference special effect image and position information of reference special effect effective pixel points in the reference special effect image, wherein the reference special effect image is an image obtained after the reference original image corresponding to the original image is processed by the special effect processing algorithm; a target pixel point determination unit, configured to determine a target special effect effective pixel point that is correctly effective among the special effect effective pixels according to the position information of the reference special effect effective pixel point and the position of the special effect effective pixel point in the image to be verified in the image to be verified; The target pixel point verification unit is used to determine that the image to be verified passes the special effect verification if the number of the target special effect effective pixel points meets the preset special effect effective condition.

10. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to execute the steps in the special effect verification method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for checking image processing effect, and mobile terminal

    CN106484614A

  • Color tracking method and device

    CN109299711A