CN106484614B - A kind of method, device and mobile terminal for checking picture treatment effect - Google Patents

A kind of method, device and mobile terminal for checking picture treatment effect Download PDF

Info

Publication number
CN106484614B
CN106484614B CN201610862348.0A CN201610862348A CN106484614B CN 106484614 B CN106484614 B CN 106484614B CN 201610862348 A CN201610862348 A CN 201610862348A CN 106484614 B CN106484614 B CN 106484614B
Authority
CN
China
Prior art keywords
picture
test script
processed
test
reference picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610862348.0A
Other languages
Chinese (zh)
Other versions
CN106484614A (en
Inventor
陈艺玲
詹萍萍
张伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Meitu Technology Co Ltd
Original Assignee
Xiamen Meitu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201610862348.0A priority Critical patent/CN106484614B/en
Publication of CN106484614A publication Critical patent/CN106484614A/en
Application granted granted Critical
Publication of CN106484614B publication Critical patent/CN106484614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of method for checking picture treatment effect, this method is suitable for executing in the terminal, comprising steps of importing picture to be processed and reference picture set;Selection of the tester to test script is received, wherein test script includes the test script based on version and the test script based on type;It executes selected test script and corresponding operation processing is carried out to picture to be processed;The comparison algorithm to match with selected test script is called to calculate the similarity for concentrating picture through treated picture to be checked and reference picture;And the result whether passed through according to similarity value calculation output verification.The present invention also discloses the device of corresponding verification picture treatment effect together and executes the mobile terminal of this method.

Description

A kind of method, device and mobile terminal for checking picture treatment effect
Technical field
The present invention relates to technical field of image processing, especially a kind of method, apparatus and shifting for checking picture treatment effect Dynamic terminal.
Background technique
In actually research and development, the treatment effect to application software (for example, image processing software) is often needed to test.One Kind of situation is, when the version iteration of application software, need picture effect after tester's collation process whether with design It is consistent;Another situation is that when application software does type adaptation, need to check be mounted in different type of machines using soft Whether the treatment effect of part is consistent.
Generally, original image is handled with application software to be tested, then tester will treated figure Piece is compared with reference picture, and whether verification effect is consistent.It does so other than labor intensive cost and time cost, also One problem is exactly that not can guarantee checked result completely errorless --- and on the one hand, error may be generated when handling picture, is difficult Guarantee that each processing is completely the same, such as the operation such as thin face, removing acne and freckle manually;On the other hand, artificial nucleus are to picture The precision of effect is limited, may omit details.
Therefore, it is necessary to a kind of schemes of energy automatic checking application software (for example, image processing software) treatment effect.
Summary of the invention
For this purpose, the present invention provides the scheme of verification picture treatment effect, to try hard to solve or at least alleviate deposit above At least one problem.
According to an aspect of the invention, there is provided a kind of method for checking picture treatment effect, method are suitable in movement It is executed in terminal, comprising steps of importing picture to be processed and reference picture set;Selection of the tester to test script is received, Wherein test script includes the test script based on version and the test script based on type;Execute selected test script pair Picture to be processed carries out corresponding operation processing;The comparison algorithm to match with selected test script is called to calculate through above-mentioned Treated, and picture to be checked concentrates the similarity of picture with reference picture;And whether verification is exported according to similarity value calculation By result.Wherein, reference picture set includes that same picture is handled through a certain application version and/or after the processing of a certain type Plurality of pictures.
Optionally, in the method for verification picture treatment effect according to the present invention, to the operation processing of picture to be processed It includes at least: entering processing picture, execute a certain processing task, save.
Optionally, in the method for verification picture treatment effect according to the present invention, in the test script based on version, Also comprising the self-defining operation to picture to be processed, also, when detecting the self-defining operation to picture to be processed, touching is obtained Touch a position coordinates.
It optionally, further include being write according to test case in the method for verification picture treatment effect according to the present invention The step of test script: the element on application interface is obtained;And the element injection event of acquisition is grasped to simulate real user Make.
Optionally, in the method for verification picture treatment effect according to the present invention, what calling matched with test script The step of comparison algorithm calculates similarity includes: that the test script based on version is called the first comparison algorithm: counted pixel-by-pixel Calculate the color difference of processed picture to be checked and reference picture;Similarity is calculated according to color difference and sum of all pixels.Or Person calls the second comparison algorithm: processed picture to be checked and reference picture is distinguished for the test script based on type Zoom to predetermined size;The picture after scaling is moved into alignment using optical flow method;Similarity is calculated according to the differences in motion opposite sex.
Optionally, in the method for verification picture treatment effect according to the present invention, core is exported according to similarity value calculation To whether pass through result the step of after, pass through if further comprising the steps of: comparing result for verification, it is logical to verification according to rule The picture renaming crossed;And it saves the picture after renaming as reference picture to reference picture set.
According to another aspect of the invention, a kind of device for checking picture treatment effect is provided, device is arranged in movement In terminal, comprising: receiving unit, suitable for receiving the picture to be processed imported and reference picture set, being further adapted for receiving tester Selection to test script, wherein test script includes the test script based on version and the test script based on type;Script Execution unit is adapted for carrying out selected test script and carries out corresponding operation processing to picture to be processed;Effect checks unit, Suitable for calling the comparison algorithm to match with selected test script to calculate through treated picture to be checked and reference The similarity of picture in pictures;And output unit, suitable for the result whether passed through according to similarity value calculation output verification. Wherein, reference picture set includes that same picture is handled through a certain application version and/or through a certain type treated plurality of pictures.
Optionally, in the device of verification picture treatment effect according to the present invention, script executing unit is configured as pair Picture to be processed carries out at least following operation processing: entering processing picture, executes a certain processing task, saves.
Optionally, in the device of verification picture treatment effect according to the present invention, script executing unit is further adapted for holding When the capable test script based on version, self-defining operation is carried out to picture to be processed;And it if detects to picture to be processed Self-defining operation then obtains touch point position coordinates.
Optionally, in the device of verification picture treatment effect according to the present invention, script executing unit further include: write Script module simulates real user operation suitable for obtaining the element on application interface and injecting event to the element of acquisition.
Optionally, in the device of verification picture treatment effect according to the present invention, effect verification unit is further adapted for base In the test script of version, calls the first comparison algorithm: calculating the face of processed picture to be checked and reference picture pixel-by-pixel Value of chromatism simultaneously calculates similarity according to color difference and sum of all pixels;Alternatively, effect verification unit is further adapted for based on type Test script calls the second comparison algorithm: processed picture to be checked and reference picture is zoomed to predetermined size, benefit respectively By the picture movement alignment after scaling and similarity is calculated according to the differences in motion opposite sex with optical flow method.
Optionally, in the device of verification picture treatment effect according to the present invention, further includes: storage unit, suitable for depositing Store up reference picture set, when output unit output verification passes through result, the picture that passes through of verification is renamed according to rule and incite somebody to action Picture after renaming is saved as reference picture to reference picture set.
According to another aspect of the invention, a kind of mobile terminal is provided, including checks picture processing effect as described above Fruit device.
It is according to the present invention verification picture treatment effect scheme, test script is executed by the way of automation, with The treatment effect of track picture, then complete effect verification by calling corresponding comparison algorithm, can greatly save manpower at Sheet and time cost.Meanwhile the accuracy of effect verification can be further ensured that avoid the error generated due to manual operation.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical Component or element.
Fig. 1 shows the organigram of mobile terminal 100 according to an embodiment of the invention;
Fig. 2 shows the flow charts of the method 200 of verification picture treatment effect according to an embodiment of the invention;
Fig. 3 (a) -3 (e) shows the interface schematic diagram of application software according to an embodiment of the invention;
Fig. 4 shows the schematic diagram of the device 400 of verification picture treatment effect according to an embodiment of the invention;And
Fig. 5 shows the schematic diagram of the device 400 of verification picture treatment effect in accordance with another embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 is 100 organigram of mobile terminal according to an embodiment of the invention.Referring to Fig.1, mobile terminal 100 include: memory interface 102, one or more data processor, image processor and/or central processing unit 104, with And peripheral interface 106.Memory interface 102, one or more processors 104 and/or peripheral interface 106 are either discrete member Part also can integrate in one or more integrated circuits.In the mobile terminal 100, various elements can pass through one or more Communication bus or signal wire couple.Sensor, equipment and subsystem may be coupled to peripheral interface 106, to help reality Existing multiple functions.For example, motion sensor 110, optical sensor 112 and range sensor 114 may be coupled to peripheral interface 106, to facilitate the functions such as orientation, illumination and ranging.Other sensors 116 can equally be connected with peripheral interface 106, such as fixed Position system (such as GPS receiver), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help reality Apply relevant function.
Camera sub-system 120 and optical sensor 122 can be used for the camera of convenient such as record photos and video clips The realization of function, wherein camera sub-system and optical sensor for example can be charge-coupled device (CCD) or complementary metal oxygen Compound semiconductor (CMOS) optical sensor.It can help to realize communication by one or more radio communication subsystems 124 Function, wherein radio communication subsystem may include radio-frequency transmitter and transmitter and/or light (such as infrared) receiver and hair Penetrate machine.The particular design and embodiment of radio communication subsystem 124 can depend on be supported one of mobile terminal 100 or Multiple communication networks.For example, mobile terminal 100 may include be designed to support GSM network, GPRS network, EDGE network, The communication subsystem 124 of Wi-Fi or WiMax network and BlueboothTM network.Audio subsystem 126 can be with loudspeaker 128 and microphone 130 be coupled, to help to implement to enable the function of voice, such as speech recognition, speech reproduction, number Record and telephony feature.
I/O subsystem 140 may include touch screen controller 142 and/or other one or more input controllers 144. Touch screen controller 142 may be coupled to touch screen 146.For example, the touch screen 146 and touch screen controller 142 can be with The contact carried out therewith and movement or pause are detected using any one of a variety of touch-sensing technologies, wherein sensing skill Art includes but is not limited to capacitive character, resistive, infrared and surface acoustic wave technique.Other one or more input controllers 144 May be coupled to other input/control devicess 148, for example, one or more buttons, rocker switch, thumb wheel, infrared port, The pointer device of USB port, and/or stylus etc.One or more button (not shown)s may include for controlling loudspeaking The up/down button of 130 volume of device 128 and/or microphone.
Memory interface 102 can be coupled with memory 150.The memory 150 may include that high random access is deposited Reservoir and/or nonvolatile memory, such as one or more disk storage equipments, one or more optical storage apparatus, and/ Or flash memories (such as NAND, NOR).Memory 150 can store an operating system 152, for example, Android, IOS or The operating system of Windows Phone etc.The operating system 152 may include for handling basic system services and execution The instruction of task dependent on hardware.Memory 150 can also be stored using 154.These applications in operation, can be from memory 150 are loaded on processor 104, and run on the operating system run via processor 104, and utilize operating system And the interface that bottom hardware provides realizes the various desired functions of user, such as instant messaging, web page browsing, pictures management. Using can be independently of operating system offer, it is also possible to what operating system carried.
More and more users can install the application software with image processing function (for example, U.S. figure on mobile terminals It is elegant), and research and development of software personnel need strictly to check the effect of this kind of image processing software, present invention provides certainly Dynamicization checks the scheme of picture treatment effect, in order to which treatment effect of the research staff to application software carries out automatic test. According to a kind of implementation, the signified mobile terminal 100 of the present invention can be mobile phone with above-mentioned construction, plate etc., pass through Arrangement checks the device 400 of picture treatment effect accordingly to realize above-mentioned function in the mobile terminal 100.
Fig. 2 shows the flow charts of the method 200 of verification picture treatment effect according to an embodiment of the invention.Such as figure Shown in 2, this method 200 starts from step S210, imports picture to be processed and reference picture set.If picture to be processed is a certain picture Original image, then, according to the solution of the present invention, for the test of application software different editions, reference picture set be can wrap It (need to be in same movement using the plurality of pictures after all effect process that need to be checked that the original image, which is included, through a certain application version The processing carried out in terminal);For the test of implementation effect of the application software in different type of machines, reference picture set then includes original Beginning picture uses the plurality of pictures after all effect process that need to be checked through a certain type.
Then in step S220, selection of the tester to test script is received, similarly, is needed for above-mentioned test It asks, test script is also classified into the test script based on version and the test script based on type.Tester is according to testing requirement It chooses one of them and is used as this test script.
According to a kind of implementation, method 200 should also include the steps that writing test script according to test case.For It is first the element (or control) obtained on application interface based on the automatic test of user's interaction, as shown in Fig. 3 (a), It is available to elements such as " return " " preservation/sharing " " revocation " " intelligent optimization " " editor " " enhancings " on this application interface.So Afterwards, event is injected separately into element obtained by writing code to simulate real user operation.Implementation according to the present invention Example, for Android operation system, writes test script using robotium automated test frame, java language;For IOS operating system writes test script using uiautomation frame, js language.By taking " preservation " as an example, when detecting at this When clicking operation on element, current image will be saved to specified path, and rename to the photo according to rule.
Below by taking " advanced U.S. face " function of U.S. face camera APP as an example, the test content that the test case is included is introduced.
1. advanced U.S. face is clicked, as shown in Fig. 3 (b);
2. clicking return push-button (" < ") returns to album list;
Specified photograph album is selected 3. clicking;
4. clicking the 1st sheet photo of selection;
5. advanced U.S. face button is clicked to enter, as shown in Fig. 3 (c), after as shown in Fig. 3 (d);
6. clicking a key U.S. face, find and click special efficacy: rococo, click switch to O-level, click and determine ("√");
Share button 7. clicking and saving, clicks and return, click revocation;
8. repeating step 6~7, extreme level, slight degree effect are saved respectively;
9. clicking U.S. face special efficacy button, find and click special efficacy: it is sweet can people, click and determine (" √ "), such as Fig. 3 (e) institute Show;
Share button 10. clicking and saving, clicks and return, click revocation;
11. repeating step 9~10, other special efficacys: woman, early summer etc. are saved again respectively;
12. clicking mill skin button, clicks automatically, click and determine (" √ ");
Share button 13. clicking and saving, clicks and return, click revocation;
14. clicking mill skin button, click manually, is applied to the lower right corner (fixed position) from the upper left corner, clicks and determine ("√");
Share button 15. clicking and saving, clicks and return, click revocation;
16. clicking colour of skin button, sliding whitening litter (that is, progress bar) to 50, sliding colour of skin litter to 50 slides wheat Color litter is clicked to 100 and determines (" √ ");
Share button 17. clicking and saving, clicks and return, click revocation;
18. repeat 16~17, litter is respectively set other numerical value and (e.g., 50, -50,100) saves again;
19. repeating step 12~15, speckle removing, acne removing, thin face, eyes amplification, bright eye, Vitamin K, whitening are saved respectively Tooth automatically and manually effect picture;
20. clicking face solid button, sliding litter to 60 is clicked and determines (" √ ");
Share button 21. clicking and saving, clicks and return, click revocation;
22. button is increased in click, sliding litter to maximum value is clicked and determines (" √ ");
Share button 23. clicking and saving.
In general, test case should as far as possible comprehensively, the function description comprising all submodules under the function, also, One function of every execution requires to save treated picture, so as to subsequent progress effect comparison.
The test script completed using the above method is guaranteed each by a series of effect process of analog manual operation The operation processing of picture is all consistent, so as to avoid manual operation error.
Then in step S230, the test script according to selected by tester executes the test script to be processed Picture carries out corresponding operation processing, and the picture generated after processing is as picture to be checked.As above to test case Description, at least will include the operation processing of picture to be processed: enter processing picture, execute a certain processing task, preservation etc..When So, in addition to above-mentioned necessary operation is outer, operation processing can also include revocation, return, for the mode of operation of each element on interface, It can be click selection, be also possible to sliding selection.
According to one embodiment of present invention, it is contemplated that the resolution ratio of different type of machines is different, therefore in the test based on type It only include the test function unrelated with photo resolution in script, such as: automatic U.S. face, filter, automatic thin face etc..And in base In the test script of version, also comprising the self-defining operation to picture to be processed, optionally, self-defining operation be can be manually Thin face smears operation manually.When detecting the self-defining operation to picture to be processed, touch point position coordinates are obtained.
Then in step S240, the comparison algorithm to match with selected test script is called to calculate after processing Picture to be checked and reference picture concentrate the similarity of picture.As it was noted above, the resolution ratio due to different type of machines is different, it is based on The photo resolution of the test script output of type also can be different.So different test scripts will choose different comparisons and calculate Method calculates similarity.
According to a kind of embodiment, for the test script based on version, the first comparison algorithm, the first comparison algorithm are called Point-to-point between the picture and reference picture of test output it can compare pixel-by-pixel operation.Specifically, it calculates pixel-by-pixel Color difference of the processed picture to be checked (that is, the picture for executing test script output) with reference picture, further according to color Difference and sum of all pixels calculate similarity.For example, calculate the distance values of above-mentioned two pictures corresponding pixel points as color difference, The difference hundred of two pictures can be obtained with the total sum number of distance value divided by the sum of all pixels of a picture in statistical distance value summation Divide ratio, then subtract the difference percentage value with 1, is exactly final similarity.Certainly, color difference can use any distance Value calculating method, such as Euclidean distance value, NBS color distance, any algorithm for calculating similarity using full reference mode all may be used To be combined with the embodiment of the present invention, the invention is not limited in this regard as the first comparison algorithm.
The second comparison algorithm is called for the test script based on type according to another embodiment, the second comparison is calculated Method does not have to the Pixel Dimensions problem for considering picture, such as based on optical flow method to the judgement detection algorithm of image motion.Specifically, will Processed picture to be checked and reference picture zoom to predetermined size respectively;Using optical flow method by after scaling picture movement pair Together;The difference ratio of two pictures is calculated as similarity further according to the differences in motion opposite sex.Equally, the present invention is to the specific of optical flow method Algorithm is with no restriction.
Then in step s 250, the result whether passed through according to similarity value calculation output verification.It is according to the present invention Embodiment exports verification and passes through if the similarity calculated in step S240 is 1 (or being infinitely close to 1);If similarity result It is not 1 (or being infinitely close to 1), then exports verification and do not pass through, and provides the processing function effect name and picture text of effect exception Part name, in order to which related personnel checks problem;In addition, it is also possible to it does not find and carries out effect verification with reference to figure accordingly, this When export the title of the effect process, so that related personnel checks whether the treatment effect is to run for the first time, if running for the first time Effect verification can refer to preservation reference picture described below, as initial reference picture set.
According to a kind of implementation, if the comparing result of output is that verification passes through, the figure that verification is passed through according to rule Piece renaming is saved the picture after renaming as reference picture to reference picture set again, using the ginseng as follow-up test Examine picture.Embodiment according to the present invention can be first carried out and be set when using this programme to carry out effect verification for the first time Good test script is to handle picture to be processed, and the errorless picture of verification effect is saved by rule by treated, as first The reference picture set of beginning.In carryover effect verification test, default closes the function of saving reference picture, when tester needs When saving picture, the update reference picture set that verification passes through, the function is opened.
Optionally, if verification does not pass through, tracking problem, in order to which research staff can correct application software in time.
It is according to the present invention verification picture treatment effect scheme, test script is executed by the way of automation, with The treatment effect of track picture, then complete effect verification by calling corresponding comparison algorithm, can greatly save manpower at Sheet and time cost.Furthermore with a series of effect process of test script analog manual operation, it is ensured that every time to picture Operation processing is all consistent, and avoids human error;In an adaptive way after the corresponding comparison algorithm calculation processing of selection Picture and reference picture similarity, further ensure the accuracy of checked result.
Fig. 4 shows the schematic diagram of the device 400 of verification picture treatment effect according to an embodiment of the invention.Device 400 include: receiving unit 410, script executing unit 420, effect verification unit 430 and output unit 440.
Receiving unit 410 is suitable for receiving the picture to be processed imported and reference picture set.If picture to be processed is a certain figure The original image of piece, then, according to the solution of the present invention, for the test of application software different editions, reference picture set can be with It through a certain application version the use of the plurality of pictures after all effect process that need to be checked (need to be in same shifting including the original image The processing carried out in dynamic terminal);For the test of implementation effect of the application software in different type of machines, reference picture set then includes The plurality of pictures after all effect process that need to be checked is used through a certain type.It is to be noted here that the effect based on type Test, since the resolution ratio of different type of machines will be different, therefore its corresponding reference picture is concentrated the size of reference picture and is divided Resolution would also vary from.
Receiving unit 410 is further adapted for receiving selection of the tester to test script, as described above, corresponding different reference Pictures, test script are also classified into the test script based on version and the test script based on type.Tester is according to this Test purpose chooses corresponding test script.
Script executing unit 420 is adapted for carrying out selected test script and carries out at corresponding operation to picture to be processed Reason, and using picture after processing as picture to be checked.Optionally, script executing unit 420 is configured as to figure to be processed Piece carries out at least following operation processing: entering processing picture, executes a certain processing task, saves.Certainly, in addition to above-mentioned necessary behaviour Outside making, operation processing can also include revocation, return, and for the mode of operation of each element on interface, can be click and select, It can be sliding selection.
Implementation according to the present invention, script executing unit 420 further include: write script module 422, as shown in Figure 5. This is write script module 422 and is suitable for writing test case according to the interaction of user and application software, to simulate real user operation. According to one embodiment, script executing unit 420 obtains the element (or control) on application interface, as shown in Fig. 3 (a), It is available to elements such as " return " " preservation " " revocation " " intelligent optimization " " editor " " enhancings " on this application interface.Script is held Row unit 420 is injected separately into event to element obtained by writing code again to simulate real user operation.According to this hair Bright embodiment writes test foot using robotium automated test frame, java language for Android operation system This;For iOS operating system, test script is write using uiautomation frame, js language.
It about test case, has been given specifically illustrate above, with reference to Fig. 3 (b) -3 (e), details are not described herein again.
Since the resolution ratio of different type of machines is different, therefore in the test script based on type, only include and photo resolution Unrelated test function, such as: automatic U.S. face, filter, automatic thin face etc..And in the test script based on version, in addition to comprising It further include customized operation processing outside operation identical with the test script based on type.An implementation according to the present invention Example, script executing unit 420 are suitable for when executing the test script based on version, carry out self-defining operation to picture to be processed. Optionally, self-defining operation can be manual thin face, the manually operation such as smearing.Script executing unit 420, which is further adapted for working as, to be detected When to the self-defining operation of picture to be processed, touch point position coordinates are obtained.For example, thin face operation manually, obtains touch point Position coordinates guarantee comparison in order to complete thin face processing manually at the same position coordinate of reference picture to avoid error As a result validity.
Effect verification unit 430 is suitable for that the comparison algorithm to match with selected test script is called to calculate after processing Picture to be checked and reference picture concentrate picture similarity.As it was noted above, the resolution ratio due to different type of machines is different, base It also can be different in the photo resolution that the test script of type exports.Therefore different test scripts, choose different comparison algorithms To calculate similarity.
According to a kind of embodiment, effect verification unit 430 is suitable for calling the first comparison to the test script based on version Algorithm: the color difference of processed picture to be checked and reference picture and total according to color difference and pixel is calculated pixel-by-pixel Number calculates the difference percentage of two pictures, then subtracts the difference percentage with 1, is exactly final similarity.
According to another embodiment, effect checks unit 420 and is suitable for calling second pair to the test script based on type Than algorithm: by it is processed wait check picture and reference picture zoom to respectively predetermined size, using optical flow method by scaling after Picture movement alignment simultaneously calculates similarity according to the differences in motion opposite sex.
It should be noted that specific algorithm employed in process is executed for the first comparison algorithm and the second comparison algorithm, The present invention is with no restriction.Any algorithm for meeting condition can be combined with the embodiment of the present invention.
Output unit 440 is suitable for the result whether passed through according to similarity value calculation output verification.Reality according to the present invention Example is applied, if the similarity calculated through effect verification unit 430 is 1 (or being infinitely close to 1), exports the result that verification passes through; If similarity result is not 1 (or being infinitely close to 1), output verification is unacceptable as a result, and providing the processing function of effect exception Energy effect name and picture file name, in order to which related personnel checks problem;In addition, it is also possible to not find corresponding with reference to figure Effect verification is carried out, at this point, output unit 440 exports the title of the effect process, so that related personnel checks the treatment effect Whether it is to run for the first time, optionally, if running effect verification for the first time, can be saved by storage unit with reference to described below The reference picture, as initial reference picture set.
As shown in figure 5, device 400 further includes storage unit 450.Storage unit 450 is suitable for storage reference picture set, defeated The output of unit 440 verification is when passing through result out, the picture renaming passed through according to rule to verification and by the picture after renaming It saves as reference picture to reference picture set, using the reference picture as follow-up test.Embodiment according to the present invention, When executing the progress effect verification of the present apparatus 400 for the first time, it is to be processed to handle that the test script set can be first carried out Picture, and the picture (this verification can be by artificial nucleus to completion) that verification is passed through is saved by rule, as initial reference Pictures.In carryover effect verification test, default closes the function of saving reference picture, when tester needs to save verification By picture, update reference picture set when, open the function.
It should be appreciated that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, it is right above In the description of exemplary embodiment of the present invention, each feature of the invention be grouped together into sometimes single embodiment, figure or In person's descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. claimed hair Bright requirement is than feature more features expressly recited in each claim.More precisely, as the following claims As book reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows specific real Thus the claims for applying mode are expressly incorporated in the specific embodiment, wherein each claim itself is used as this hair Bright separate embodiments.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
The invention also discloses:
A6, the method as described in any one of A1-5 further include the steps that writing test script according to test case: obtaining Element on application interface;And the element injection event of acquisition is operated to simulate real user.
A7, the method as described in any one of A1-6, wherein the comparison algorithm to match with test script is called to calculate phase The step of seemingly spending includes: that the test script based on version is called the first comparison algorithm: calculated pixel-by-pixel processed to core To the color difference of picture and reference picture;Similarity is calculated according to color difference and sum of all pixels.
A8, the method as described in any one of A1-6, wherein the comparison algorithm to match with test script is called to calculate phase The step of seemingly spending further include: for the test script based on type, call the second comparison algorithm: by processed picture to be checked Predetermined size is zoomed to respectively with reference picture;The picture after scaling is moved into alignment using optical flow method;According to the differences in motion opposite sex Calculate similarity.
A9, the method as described in any one of A1-8, wherein the knot whether passed through according to similarity value calculation output verification After the step of fruit, passes through if further comprising the steps of: comparing result for verification, ordered again according to the picture that rule passes through verification Name;And it saves the picture after renaming as reference picture to reference picture set.
B14, the device as described in B13, wherein script executing unit is further adapted for executing the test script based on version When, if detecting the self-defining operation to picture to be processed, obtain touch point position coordinates.
B15, the device as described in any one of B10-14, script executing unit further include: script module is write, suitable for obtaining It takes the element on application interface and event is injected to the element of acquisition to simulate real user operation.
B16, the device as described in any one of B10-15, wherein effect verification unit is further adapted for the survey based on version Training sheet calls the first comparison algorithm: calculating the color difference and root of processed picture to be checked and reference picture pixel-by-pixel Similarity is calculated according to color difference and sum of all pixels.
B17, the device as described in any one of B10-15, wherein effect verification unit is further adapted for the survey based on type Training sheet, calls the second comparison algorithm: processed picture to be checked and reference picture being zoomed to predetermined size respectively, utilized Optical flow method by the picture movement alignment after scaling and calculates similarity according to the differences in motion opposite sex.
B18, the device as described in any one of B10-17, further includes: storage unit is suitable for storage reference picture set, When output unit output verification passes through result, the picture renaming that passes through according to rule to verification simultaneously will be after renaming Picture is saved as reference picture to reference picture set.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc. Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (13)

1. a kind of method for checking picture treatment effect, the method is suitable for executing in the terminal, and the method includes steps It is rapid:
Import picture to be processed and reference picture set, wherein for the test of different editions, reference picture set includes figure to be processed Piece is through a certain application version treated plurality of pictures, and for the test of different type of machines, reference picture set includes picture to be processed Through a certain type treated plurality of pictures;
Selection of the tester to test script is received, wherein the test script includes test script based on version and is based on The test script of type;
It executes selected test script and corresponding operation processing is carried out to picture to be processed;
For the test script based on version, calls the first comparison algorithm: calculating processed picture to be checked and ginseng pixel-by-pixel The color difference for examining picture calculates similarity according to color difference and sum of all pixels;For the test script based on type, call Second comparison algorithm: zooming to predetermined size for processed picture to be checked and reference picture respectively, will be contracted using optical flow method Picture after putting moves alignment, calculates similarity according to the differences in motion opposite sex;And
The result whether passed through according to similarity value calculation output verification.
2. the method for claim 1, wherein being included at least to the operation processing of picture to be processed: entrance processing picture, It executes a certain processing task, save.
3. method according to claim 2, wherein
In the test script based on version, also comprising the self-defining operation to picture to be processed.
4. method as claimed in claim 3, wherein
When detecting the self-defining operation to picture to be processed, touch point position coordinates are obtained.
5. further including the steps that writing test script according to test case such as method of any of claims 1-4:
Obtain the element on application interface;And
Real user operation is simulated to the element injection event of acquisition.
6. the method for claim 1, wherein described the result whether passed through checked according to similarity value calculation output After step, further comprise the steps of:
If comparing result is that verification passes through, the picture that verification passes through is renamed according to rule;And
It saves the picture after renaming as reference picture to reference picture set.
7. a kind of device for checking picture treatment effect, described device arranges that described device includes: in the terminal
Receiving unit, suitable for receiving the picture to be processed imported and reference picture set, being further adapted for receiving tester to test foot This selection, wherein the test script includes the test script based on version and the test script based on type, for difference The test of version, reference picture set includes picture to be processed through a certain application version treated plurality of pictures, for different machines The test of type, reference picture set include picture to be processed through a certain type treated plurality of pictures;
Script executing unit is adapted for carrying out selected test script and carries out corresponding operation processing to picture to be processed;
Effect checks unit, and the test script based on version is called the first comparison algorithm: calculated pixel-by-pixel through locating suitable for being suitable for The picture to be checked of reason and the color difference of reference picture simultaneously calculate similarity according to color difference and sum of all pixels, to being based on The test script of type calls the second comparison algorithm: processed picture to be checked being zoomed to reference picture respectively predetermined Size by the picture movement alignment after scaling and calculates similarity according to the differences in motion opposite sex using optical flow method;And
Output unit, suitable for the result whether passed through according to similarity value calculation output verification.
8. device as claimed in claim 7, wherein
The script executing unit is configured as carrying out at least following operation processing to picture to be processed: entering processing picture, holds The a certain processing task of row saves.
9. device as claimed in claim 8, wherein
The script executing unit is further adapted for when executing the test script based on version, carries out customized behaviour to picture to be processed Make.
10. device as claimed in claim 9, wherein
The script executing unit is further adapted for when executing test script based on version, if detect to picture to be processed from Defining operation then obtains touch point position coordinates.
11. the device as described in any one of claim 7-10, the script executing unit further include:
Script module is write, simulates true use suitable for obtaining the element on application interface and injecting event to the element of acquisition Family operation.
12. device as claimed in claim 7, described device further include:
Storage unit is suitable for storage reference picture set, when output unit output verification passes through result, according to rule to core The picture passed through is renamed and is saved the picture after renaming as reference picture to reference picture set.
13. a kind of mobile terminal, including the verification picture treatment effect device as described in any one of claim 7-12.
CN201610862348.0A 2016-09-29 2016-09-29 A kind of method, device and mobile terminal for checking picture treatment effect Active CN106484614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610862348.0A CN106484614B (en) 2016-09-29 2016-09-29 A kind of method, device and mobile terminal for checking picture treatment effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610862348.0A CN106484614B (en) 2016-09-29 2016-09-29 A kind of method, device and mobile terminal for checking picture treatment effect

Publications (2)

Publication Number Publication Date
CN106484614A CN106484614A (en) 2017-03-08
CN106484614B true CN106484614B (en) 2019-01-22

Family

ID=58268989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610862348.0A Active CN106484614B (en) 2016-09-29 2016-09-29 A kind of method, device and mobile terminal for checking picture treatment effect

Country Status (1)

Country Link
CN (1) CN106484614B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536597A (en) * 2018-04-11 2018-09-14 上海达梦数据库有限公司 A kind of terminal test method, device, terminal device and storage medium
CN108920368A (en) * 2018-06-29 2018-11-30 北京微播视界科技有限公司 The method, apparatus and electronic equipment of data test
CN113784138A (en) * 2019-09-23 2021-12-10 杭州海康威视数字技术股份有限公司 Encoding and decoding method, device and equipment
CN111338545A (en) 2020-02-24 2020-06-26 北京字节跳动网络技术有限公司 Image processing method, assembly, electronic device and storage medium
CN112732553A (en) * 2020-12-25 2021-04-30 北京百度网讯科技有限公司 Image testing method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314386A (en) * 2011-09-05 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for testing mobile terminal
KR20140046121A (en) * 2012-10-10 2014-04-18 에스케이플래닛 주식회사 System and method for testing application
CN104461888A (en) * 2014-12-11 2015-03-25 中国科学院声学研究所 Application testing method and system
CN104657994A (en) * 2015-02-13 2015-05-27 厦门美图之家科技有限公司 Image consistency judging method and system based on optical flow method
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN104978263A (en) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 Mobile terminal application program test method and mobile terminal application program test system
CN104978270A (en) * 2015-07-03 2015-10-14 上海触乐信息科技有限公司 Automatic software testing method and apparatus
CN105095083A (en) * 2015-08-24 2015-11-25 上海斐讯数据通信技术有限公司 Mobile phone interface screenshot test method and device used in Android system
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105824755A (en) * 2016-03-17 2016-08-03 厦门美图移动科技有限公司 Automation test method, automation test device and mobile terminal

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314386A (en) * 2011-09-05 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for testing mobile terminal
KR20140046121A (en) * 2012-10-10 2014-04-18 에스케이플래닛 주식회사 System and method for testing application
CN104765678A (en) * 2014-01-08 2015-07-08 阿里巴巴集团控股有限公司 Method and device for testing applications on mobile terminal
CN104978263A (en) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 Mobile terminal application program test method and mobile terminal application program test system
CN104461888A (en) * 2014-12-11 2015-03-25 中国科学院声学研究所 Application testing method and system
CN104657994A (en) * 2015-02-13 2015-05-27 厦门美图之家科技有限公司 Image consistency judging method and system based on optical flow method
CN104978270A (en) * 2015-07-03 2015-10-14 上海触乐信息科技有限公司 Automatic software testing method and apparatus
CN105095083A (en) * 2015-08-24 2015-11-25 上海斐讯数据通信技术有限公司 Mobile phone interface screenshot test method and device used in Android system
CN105302727A (en) * 2015-11-17 2016-02-03 小米科技有限责任公司 Testing method, device and system
CN105824755A (en) * 2016-03-17 2016-08-03 厦门美图移动科技有限公司 Automation test method, automation test device and mobile terminal

Also Published As

Publication number Publication date
CN106484614A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106484614B (en) A kind of method, device and mobile terminal for checking picture treatment effect
CN106934376B (en) A kind of image-recognizing method, device and mobile terminal
CN108399409B (en) Image classification method, device and terminal
CN108062526A (en) A kind of estimation method of human posture and mobile terminal
KR101795325B1 (en) Method, device and server for sensitive picture recognition
CN106295533B (en) A kind of optimization method, device and the camera terminal of self-timer image
CN108256549B (en) Image classification method, device and terminal
CN105512685B (en) Object identification method and device
CN107239535A (en) Similar pictures search method and device
CN107133576A (en) Age of user recognition methods and device
CN106845398B (en) Face key point positioning method and device
CN105426857A (en) Training method and device of face recognition model
CN107622483A (en) A kind of image combining method and terminal
CN106682736A (en) Image identification method and apparatus
CN106845377A (en) Face key independent positioning method and device
CN105654033A (en) Face image verification method and device
CN104991847B (en) A kind of RAM leakage automated detection method, device and mobile terminal
CN106339695A (en) Face similarity detection method, device and terminal
CN106778531A (en) Face detection method and device
CN107995500A (en) Video watermark recognition methods, device and terminal
CN106648063A (en) Gesture recognition method and device
CN109164972B (en) Control method, control device and mobile terminal
CN110366100A (en) Localization method, positioning device, readable storage medium storing program for executing and the terminal device of terminal
CN106294549A (en) A kind of image processing method and terminal
CN106651777A (en) Image processing method and apparatus and electronic device

Legal Events

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