CN107274442A - A kind of image-recognizing method and device - Google Patents
A kind of image-recognizing method and device Download PDFInfo
- Publication number
- CN107274442A CN107274442A CN201710536756.1A CN201710536756A CN107274442A CN 107274442 A CN107274442 A CN 107274442A CN 201710536756 A CN201710536756 A CN 201710536756A CN 107274442 A CN107274442 A CN 107274442A
- Authority
- CN
- China
- Prior art keywords
- image
- standard picture
- feature point
- determined
- standard
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000012360 testing method Methods 0.000 claims abstract description 108
- 238000013515 script Methods 0.000 claims abstract description 43
- 238000004422 calculation algorithm Methods 0.000 claims description 32
- 238000012545 processing Methods 0.000 claims description 28
- 238000003860 storage Methods 0.000 claims description 22
- 238000003909 pattern recognition Methods 0.000 claims description 10
- 230000005055 memory storage Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 14
- 230000009977 dual effect Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 8
- 230000006872 improvement Effects 0.000 description 7
- 239000000203 mixture Substances 0.000 description 7
- 238000010606 normalization Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000004549 pulsed laser deposition Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
This application discloses a kind of image-recognizing method and device, this method includes:By testing results script, the position coordinates of standard picture and the standard picture is obtained;According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;By carrying out characteristic matching to described first image and the standard picture, the second image is determined in described first image;By carrying out image comparison to second image and the standard picture, target image corresponding with the standard picture is recognized.The method and apparatus of the embodiment of the present application, by characteristic matching and the dual identification process of image comparison, effectively improve image recognition accuracy rate when testing results script carries out APP automatic tests in different test terminal devices.
Description
Technical field
The application is related to field of computer technology, more particularly to a kind of image-recognizing method and device.
Background technology
With developing rapidly for third party application (Application, APP), in order to ensure APP performance, for
APP testing requirement also more and more higher.
At present, automatic test is carried out to APP by means of Software Testing Tool to be increasingly widely applied.
In APP automatic test, recording and playback technology is generally used, is specifically included:Tester records tool records by script
To APP test operation, test script is generated, then test script is played back in test terminal device, realized to APP
Automatic test in test terminal device.
Test script in testing terminal device when being played back, for being recorded in test script in APP interfaces
Pictorial element carries out the event of test operation (for example, in game《The bird of indignation》In, to the point that certain bird performs in interface
Hit operation), it is necessary to the pictorial element is identified in the APP interfaces of test terminal device first, then the pictorial element is held
The corresponding test operation of row.
But, because the screen resolution of different test terminal devices is not necessarily identical, cause in different terminal equipment
It is relatively low for the recognition accuracy of pictorial element when playing back APP test scripts progress automatic test.
The content of the invention
In view of this, the embodiment of the present application provides a kind of image-recognizing method and device, to solve existing automation
The problem of recognition accuracy of image recognition is relatively low in test.
The embodiment of the present application provides a kind of method of image recognition, including:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, second is determined in described first image
Image;
By carrying out image comparison to second image and the standard picture, recognize corresponding with the standard picture
Target image.
Alternatively, by carrying out characteristic matching to described first image and the standard picture, in described first image
The second image is determined, including:
By carrying out characteristic matching to described first image and the standard picture, the standard picture and described the are determined
The characteristic point matched between one image;
According to the characteristic point matched, the 3rd image is determined in described first image, and determine the described 3rd
Scaling and/or the anglec of rotation of the image relative to the standard picture;
According to the scaling and/or the anglec of rotation, scaling processing is performed to the 3rd image and/or is rotated
Processing, obtains second image.
Optionally it is determined that scaling and/or the anglec of rotation of the 3rd image relative to the standard picture, bag
Include:
The fisrt feature point and second feature point being located in the standard picture are chosen in the characteristic point matched;
Chosen in the characteristic point matched and be located at what is matched in described first image with the fisrt feature point
Third feature point, and the fourth feature point matched with the second feature point;
According to the fisrt feature point, second feature point, third feature point and fourth feature point, it is determined that
Scaling and/or the anglec of rotation of 3rd image relative to the standard picture.
Alternatively, the fisrt feature point and second being located in the standard picture is chosen in the characteristic point matched
Characteristic point, including:
Determine the matching degree of characteristic point matched between the standard picture and described first image;
According to the matching degree, the characteristic point being pointed in the standard picture carries out the descending sequence of matching degree;
The characteristic point made number one is defined as the fisrt feature point, and deputy characteristic point determination will be come
For the second feature point.
Alternatively, by carrying out image comparison, identification and the standard drawing to second image and the standard picture
As corresponding target image, including:
By carrying out image comparison to second image and the standard picture, second image and the mark are determined
Similarity between quasi- image;
When the similarity is more than preset value, it is the target image to recognize second image.
Alternatively, image comparison is carried out to second image and the standard picture, including:
Image comparison is carried out to second image and the standard picture by following at least one algorithms:With fault-tolerant
Pixel comparison algorithm, intensity contrast algorithm, histogram contrast algorithm.
Alternatively, the fault-tolerant pixel comparison algorithm of the band includes:
The serious forgiveness that pixel color changes between second image and the standard picture is set;And/or,
The serious forgiveness of pixel-shift between second image and the standard picture is set.
The embodiment of the present application also provides a kind of device of image recognition, including:Acquiring unit, determining unit and identification are single
Member, wherein:
Acquiring unit, for by testing results script, obtaining the position coordinates of standard picture and the standard picture;
Determining unit, for according to the position coordinates, the first image of pre-set dimension to be determined in test terminal screen;
The determining unit, is additionally operable to by carrying out characteristic matching to described first image and the standard picture, in institute
State and the second image is determined in the first image;
Recognition unit, for by carrying out image comparison to second image and the standard picture, identification with it is described
The corresponding target image of standard picture.
The embodiment of the present application also provides a kind of device of image recognition, including:Memory and processor, wherein:
Memory, for depositing program;
Processor, the program for performing the memory storage, and specifically perform:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, second is determined in described first image
Image;
By carrying out image comparison to second image and the standard picture, recognize corresponding with the standard picture
Target image.
The embodiment of the present application also provides a kind of computer-readable recording medium, the computer-readable recording medium storage one
Individual or multiple programs, one or more of programs are when the electronic equipment for being included multiple application programs is performed so that described
Electronic equipment performs following methods:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, second is determined in described first image
Image;
By carrying out image comparison to second image and the standard picture, recognize corresponding with the standard picture
Target image.
At least one above-mentioned technical scheme that the embodiment of the present application is used can reach following beneficial effect:
By the testing results script in test terminal, the position coordinates of standard picture and standard picture, Jin Ergen are obtained
According to position coordinates, the first image of pre-set dimension is determined in test terminal screen, by entering to the first image and standard picture
Row characteristic matching, determines the second image in the first image, by carrying out image comparison, identification to the second image and standard picture
Go out target image corresponding with standard picture so that by characteristic matching and the dual identification process of image comparison, effectively improve
Image recognition accuracy rate when testing results script carries out APP automatic tests in different test terminal devices.
Brief description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes the part of the application, this Shen
Schematic description and description please is used to explain the application, does not constitute the improper restriction to the application.In the accompanying drawings:
A kind of schematic flow sheet for image-recognizing method that Fig. 1 provides for the embodiment of the present application;
Fig. 2 records the page schematic diagram of instrument for the script that the embodiment of the present application is provided;
The schematic diagram that Fig. 3 records for the test script that the embodiment of the present application is provided;
The schematic diagram of the position coordinates for the standard picture that Fig. 4 provides for the embodiment of the present application;
The schematic diagram for the determination scaling that Fig. 5 provides for the embodiment of the present application;
The schematic diagram for the determination anglec of rotation that Fig. 6 provides for the embodiment of the present application;
The schematic configuration diagram for a kind of electronic equipment that Fig. 7 provides for the embodiment of the present application;
A kind of structural representation for pattern recognition device that Fig. 8 provides for the embodiment of the present application;
A kind of structural representation for pattern recognition device that Fig. 9 provides for the embodiment of the present application.
Embodiment
In order to realize the purpose of the application, the embodiment of the present application provides a kind of image-recognizing method and device, this method bag
Include:By the testing results script in test terminal, the position coordinates of standard picture and standard picture is obtained, and then according to position
Coordinate, determines the first image of pre-set dimension in test terminal screen, by carrying out feature to the first image and standard picture
Matching, determines the second image in the first image, by carrying out image comparison to the second image and standard picture, identifies and marks
The corresponding target image of quasi- image so that by characteristic matching and the dual identification process of image comparison, effectively improve in difference
Test image recognition accuracy rate when testing results script in terminal device carries out APP automatic tests.
Technical scheme is clearly and completely retouched with reference to the application specific embodiment and corresponding accompanying drawing
State.Obviously, described embodiment is only some embodiments of the present application, rather than whole embodiments.Based in the application
Embodiment, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made,
Belong to the scope of the application protection.
Below in conjunction with accompanying drawing, the technical scheme that each embodiment of the application is provided is described in detail.
Embodiment 1
A kind of schematic flow sheet for image-recognizing method that Fig. 1 provides for the embodiment of the present application.Methods described can be as follows
It is shown.
Step 102:By testing results script, standard picture and the position coordinates of the standard picture are obtained.
, it is necessary to carry out the recording of test script to APP before the automatic test to APP is realized.In APP test scripts
Recording process in, tester PC ends installation script record instrument (for example, iTestin of Yun Ce companies), and by one record
Terminal device (for example, a smart mobile phone) processed is connected to the PC ends.Tester records instrument by the script installed in PC ends
And the recording terminal equipment being connected is set up with PC ends, complete the recording to APP test scripts.
Fig. 2 records the page schematic diagram of instrument for the script that the embodiment of the present application is provided.As shown in Fig. 2 being recorded in script
In the interface of instrument, left side is the mapping screen of recording terminal equipment, and right side is test event posting field.Tester passes through mouse
Mark and keyboard carry out test operation to the APP interfaces in mapping screen, and to test operation correspondence in test event posting field
Test event recorded.
The schematic diagram that Fig. 3 records for the test script that the embodiment of the present application is provided.
As shown in figure 3, first, what tester clicked on the upper right corner in mapping screen takes figure button, or, pin keyboard Ctrl
Key, and left mouse button is operated simultaneously, choose the region (square frame in such as Fig. 3) for needing to be operated;Secondly, the mouse in selected areas
Right button is marked, an operation is chosen in display mode of operation list (for example, click, double-click);Then, in the test event on right side
The test event is recorded in posting field, including:The corresponding image of selected areas (i.e. standard picture), the position of standard picture are sat
Mark, the size of standard picture, the corresponding test operation of standard picture (for example, click);Finally, according to all test things of record
Part generates test script.
In the embodiment of the present application, APP is full screen display in test terminal screen, and the position coordinates of standard picture is to survey
Try the position coordinates under corresponding normalization coordinate system in terminal device screen interface (hereinafter referred to as screen interface).
The schematic diagram of the position coordinates for the standard picture that Fig. 4 provides for the embodiment of the present application.
As shown in figure 4, setting up normalization coordinate system using screen interface top left corner apex as origin, i.e., by the length and width of screen
It is respectively as the unit length of horizontal, axis of ordinates in coordinate system, i.e., the unit of screen width as axis of abscissas (x-axis) is long
Degree, using screen length as ordinate value (y-axis) unit length, positions of the standard picture A in screen interface as illustrated,
Determine at least one coordinate value of point in the coordinate system in standard picture A.
For example, the coordinate of standard picture A top left corner apex is (0.2,0.15), the coordinate of central point is (0.4,0.2),
Or the coordinate of bottom right angular vertex is (0.6,0.25).
Position coordinates of the standard picture under the corresponding normalization coordinate system of screen interface, can clearly show that the standard
Relative position of the image in screen interface, the resolution ratio with screen interface is unrelated, enabling according to the position of standard picture
Coordinate, finds the position range of target image corresponding with standard picture in the screen interface of different resolution.
In the embodiment of the present application, the size of standard picture is the chi under the corresponding normalization coordinate system of above-mentioned screen interface
It is very little.
Still by taking above-mentioned Fig. 4 as an example, standard picture A length is 0.4, and width is 0.1, i.e., standard picture A length is screen
0.4 times of curtain interface length, standard picture A width is 0.1 times of screen interface width.
After APP corresponding test scripts are recorded, the test script is carried out in different test terminal devices
Playback, you can to realize APP automatic test in different test terminals.
In test terminal device, by testing results script, standard master drawing and the position coordinates of the standard master drawing are obtained.
Still by taking above-mentioned Fig. 4 as an example, testing results script gets standard master drawing A and standard master drawing A position coordinates:It is left
The coordinate value (0.2,0.15) of upper angular vertex.
It should be noted that at least including the coordinate value of a location point in standard master drawing A position coordinates.
Step 104:According to position coordinates, the first image of pre-set dimension is determined in test terminal screen.
Wherein, the first image can represent the search pair target image corresponding with standard picture in test terminal screen
Scope.
For test terminal screen, normalization coordinate system, Ji Jiangping are set up using screen interface top left corner apex as origin
The length and width of curtain regard screen width as axis of abscissas (x-axis) respectively as the unit length of horizontal, axis of ordinates in coordinate system
Unit length, using screen length as ordinate value (y-axis) unit length.
In the corresponding normalization coordinate system of test terminal screen, the position included with the position coordinates of standard picture is found
Put the corresponding source location of coordinate value a little.
Still by taking above-mentioned Fig. 4 as an example, standard picture A position coordinates is:Center point coordinate is (0.4,0.2), therefore, is being surveyed
Try in the corresponding normalization coordinate system of terminal screen, coordinate is and the source location to be found for the point of (0.4,0.2).
According to the source location, the first image of pre-set dimension is determined in terminal screen.
In order to expand hunting zone to ensure the accuracy rate of image recognition, the pre-set dimension should be not less than standard picture
Size.
It should be noted that pre-set dimension is not less than the size of standard picture, specific value can be according to actual feelings
Condition is determined, is not specifically limited here.
Still by taking above-mentioned Fig. 4 as an example, the coordinate of standard picture A central point is (0.6,0.25), and length is 0.4, and width is
0.1, at this point it is possible to pre-set dimension is set as that length is 0.8, and width is 0.2 using coordinate as (0.6,0.25) central point, with
This image of determination first, that is, determine the hunting zone of target image.
Step 106:By carrying out characteristic matching to the first image and standard picture, the second figure is determined in the first image
Picture.
Wherein, the second image can represent image most like with standard picture in the first image.
Specifically, including:By carrying out characteristic matching to the first image and standard picture, standard picture and the first figure are determined
The characteristic point matched as between;
According to the characteristic point matched, the 3rd image is determined in the first image, and determine the 3rd image relative to mark
The scaling and/or the anglec of rotation of quasi- image;
According to scaling and/or the anglec of rotation, scaling processing and/or rotation processing are performed to the 3rd image, the is obtained
Two images.
Wherein, the 3rd image can be represented by characteristic matching, and determined after scaling processing and/or rotation processing
The most like image with standard picture.
It should be noted that the first image and standard picture, which carry out characteristic matching, can use SURF Feature Correspondence Algorithms,
SIFT feature matching algorithm can also be used, other Feature Correspondence Algorithms can also be used, be not specifically limited here.
In actual applications, because test terminal screen may be different from the resolution ratio of recording terminal screen, therefore, the 3rd
Image there may be certain scaling relative to standard picture;And/or, with the standard picture phase in recording terminal screen
Than the 3rd image in test terminal screen there may be certain anglec of rotation relative to standard picture and (appear in game more
In class APP).
In order to improve the image recognition accuracy rate in APP automatic tests, it is thus necessary to determine that the 3rd image is relative to standard drawing
The scaling and/or the anglec of rotation of picture.
In the embodiment of the present application, scaling and/or the anglec of rotation of the 3rd image relative to standard picture are determined, is wrapped
Include:
The fisrt feature point and second feature point being located in standard picture are chosen in the characteristic point matched;
The third feature point for being located at and matching in the first image with fisrt feature point is chosen in the characteristic point matched, with
And the fourth feature point matched with second feature point;
According to fisrt feature point, second feature point, third feature point, fourth feature point, determine the 3rd image relative to mark
The scaling and/or the anglec of rotation of quasi- image.
In the embodiment of the present application, the fisrt feature point and second being located in standard picture is chosen in the characteristic point matched
Characteristic point, including:
Determine the matching degree of characteristic point matched between standard picture and the first image;
According to matching degree, the characteristic point being pointed in standard picture carries out the descending sequence of matching degree;
The characteristic point made number one is defined as into fisrt feature point, and deputy characteristic point will be come be defined as
Two characteristic points.
Pass through characteristic matching, it is determined that some characteristic points matched between standard picture and the first image, still, each
Matching degree between characteristic point is not quite similar.
For the scaling and/or the anglec of rotation that are more accurately obtained between the 3rd image and standard picture, choose
The higher characteristic point of matching degree carries out subsequent treatment.
Following two methods can be used by choosing the method for the higher characteristic point of matching degree:
Method one:
First, the matching degree of each characteristic point matched between standard picture and the first image is determined;
Secondly, according to the matching degree of each characteristic point, the characteristic point being pointed in standard picture carry out matching degree by greatly to
Small sequence;
Then, the characteristic point made number one is defined as fisrt feature point, deputy characteristic point will be come and be defined as
Second feature point.
Finally, in the first image, third feature point is defined as with the characteristic point of fisrt feature Point matching, and with second
The characteristic point of Feature Points Matching is defined as fourth feature point.
Because the characteristic point matched in standard picture and the first image all exists in pairs, and hence it is also possible to adopt
The higher characteristic point of matching degree is chosen with following methods two.
Method two:
First, the matching degree of each characteristic point matched between standard picture and the first image is determined;
Secondly, according to the matching degree of each characteristic point, the characteristic point being pointed in the first image carry out matching degree by greatly to
Small sequence;
Then, the characteristic point made number one is defined as third feature point, deputy characteristic point will be come and be defined as
Fourth feature point;
Finally, in standard picture, fisrt feature point is defined as with the characteristic point of third feature Point matching, and with the 4th
The characteristic point of Feature Points Matching is defined as second feature point.
In the embodiment of the present application, according to fisrt feature point, second feature point, third feature point, fourth feature point, is determined
Three images relative to standard picture scaling, including:
Determine first length of the line segment in the first preset coordinate system of fisrt feature point and second feature point composition;
Determine second length of the line segment in the first preset coordinate system of third feature point and fourth feature point composition;
The ratio of the second length and the first length is determined, and the ratio is defined as scaling.
The schematic diagram for the determination scaling that Fig. 5 provides for the embodiment of the present application.
As shown in figure 5, using fisrt feature point a as origin, the first preset coordinate system is set up, in first coordinate system,
Fisrt feature point a coordinate is (0,0), and second feature point b coordinate is (x, y), therefore, fisrt feature point a and second feature
First length of the line segment in the first preset coordinate system of point b compositions is
As shown in figure 5, using third feature point a' as origin, the first preset coordinate system is set up, in first preset coordinate
In system, third feature point a' coordinate is (0,0), and fourth feature point b' coordinate is (x', y'), therefore, third feature point a'
Second length of the line segment in the first preset coordinate system constituted with fourth feature point b' is
Second length L' and the first length L ratio are K=L'/L, therefore, contracting of the 3rd image relative to standard picture
Ratio is put for K.
It should be noted that the first preset coordinate system can be conventional coordinates, or other coordinate systems, here not
It is specifically limited.
In the embodiment of the present application, according to fisrt feature point, second feature point, third feature point, fourth feature point, is determined
Three images relative to standard picture the anglec of rotation, including:
Determine fisrt feature point and second feature point composition line segment in the second preset coordinate system between preset direction
The first angle;
Determine third feature point and fourth feature point composition line segment in the second preset coordinate system between preset direction
The second angle;
The differential seat angle between the second angle and the first angle is determined, and the differential seat angle is defined as the anglec of rotation.
The schematic diagram for the determination anglec of rotation that Fig. 6 provides for the embodiment of the present application.
As shown in fig. 6, using fisrt feature point a as origin, the second preset coordinate system is set up, in second coordinate system,
Fisrt feature point a coordinate is (0,0), and second feature point b coordinate is (m, n), therefore, fisrt feature point a and second feature
First angle of the line segment in the second preset coordinate system between preset direction y directions of point b compositions be
As shown in fig. 6, using third feature point a' as origin, the second preset coordinate system is set up, in second preset coordinate
In system, third feature point a' coordinate is (0,0), and fourth feature point b' coordinate is (m', n'), therefore, third feature point a'
And second angle of the line segment of fourth feature point b' compositions in the second preset coordinate system between preset direction y directions is
Second angle α ' and the first angle α differential seat angle be Δ α=α '-α, therefore, the 3rd image is relative to standard picture
The anglec of rotation be Δ α.
It should be noted that the first preset coordinate system and the second preset coordinate system can be identical coordinate system, can also
For the coordinate system differed, it is not specifically limited here.
According to the scaling and/or the anglec of rotation of determination, scaling processing and/or rotation processing are performed to the 3rd image,
It can obtain that and size the most similar with standard picture be identical and/or the image of angle identical second.
Step 108:By carrying out image comparison to the second image and standard picture, target corresponding with standard picture is recognized
Image.
In actual applications, for second by being obtained after characteristic matching, and scaling processing and/or rotation processing
Image, due to being limited by the characteristic matching degree of accuracy, second image may not be the standard picture correspondence for needing to obtain
Target image.
For example, for two images differed, it is possible to can have subregion similar so that enter to two images
After row characteristic matching, it is believed that two images are similar.
In order to further verify whether the second image of identification is target image corresponding with standard picture, to the second image and
Standard picture carries out image comparison.
Specifically, by carrying out image comparison to the second image and standard picture, determine the second image and standard picture it
Between similarity;
It is target image that the second image is recognized when similarity is more than preset value.
It should be noted that preset value can be determined according to actual conditions, it is not specifically limited here.
In the embodiment of the present application, image comparison is carried out to the second image and standard picture, including:
Image comparison is carried out to the second image and standard picture by following at least one algorithms:With fault-tolerant pixel comparison
Algorithm, intensity contrast algorithm, histogram contrast algorithm.
In the embodiment of the present application, include with fault-tolerant pixel comparison algorithm:
The serious forgiveness that pixel color changes between second image and standard picture is set;And/or,
The serious forgiveness of pixel-shift between second image and standard picture is set.
In actual applications, due to the resolution ratio and/or display parameter information of test terminal screen and recording terminal screen
May be different, therefore, the second image there may be certain pixel color relative to standard picture to be changed and/or pixel-shift.
In order to improve the image recognition accuracy rate in APP automatic tests, using be provided with pixel color change it is fault-tolerant
The pixel comparison algorithm that the band of rate and/or the serious forgiveness of pixel-shift is fault-tolerant carries out image pair to the second image and standard picture
Than the recognition accuracy of target image can be effectively improved.
In the embodiment of the present application, in order to further improve the recognition accuracy of target image, it can use with fault-tolerant picture
One or more modes combined in element contrast algorithm, intensity contrast algorithm, histogram contrast algorithm are to the second image and mesh
Logo image carries out image comparison.
By characteristic matching, and scaling processing and/or rotation processing, recognized in the first image (i.e. hunting zone)
To second image similar to standard picture, and then by carrying out image recognition to the second image and standard picture, further know
Whether be target image, by dual identification process if not determining second image, is effectively improved in image recognition accuracy rate.
After identifying target image, according to the corresponding test operation of the standard picture recorded in test script, to the mesh
Logo image performs corresponding test operation, finally realizes APP automatic test.
For example, when the corresponding test operation of standard picture is clicking operation, determining the corresponding operating point of the clicking operation
Coordinate, wherein, the coordinate be the operating point relative to standard picture relative coordinate.According to the coordinate of operating point, in target
Object run point is determined in image, and then clicking operation is performed to object run point.
, can be true when the similarity between the second image and standard picture is not more than preset value in the embodiment of the present application
It is fixed it is unidentified go out target image.
In actual applications, when carrying out target image identification to test terminal screen, target image may be in screen
In curtain interface, for example, situations such as screen interface is loaded, can't after being identified using above-mentioned image-recognizing method
Identify target image.
Therefore, when it is unidentified go out target image after, repeated after prefixed time interval step 102-108 progress
Target image is again identified that;And/or, when the identification number of times of target image is more than preset times, determine that None- identified goes out mesh
Logo image.
The technical scheme that the embodiment of the present application is recorded, by the testing results script in test terminal, obtains standard picture
With the position coordinates of standard picture, and then according to position coordinates, the first image of pre-set dimension is determined in test terminal screen,
By carrying out characteristic matching to the first image and standard picture, the second image is determined in the first image, by the second image
Image comparison is carried out with standard picture, target image corresponding with standard picture is identified so that pass through characteristic matching and image
The dual identification process of contrast, effectively improves the testing results script in different test terminal devices and carries out APP automatic tests
When image recognition accuracy rate.
Embodiment 2
The schematic configuration diagram for a kind of electronic equipment that Fig. 7 provides for the embodiment of the present application.As shown in fig. 7, in hardware view,
The electronic equipment includes processor, internal bus, network interface, internal memory and nonvolatile memory, is also possible that certainly
Hardware required for other business.Then processor reads corresponding computer program into internal memory from nonvolatile memory
Operation, forms pattern recognition device on logic level.Certainly, in addition to software realization mode, the application is not precluded from it
His implementation, such as mode of logical device or software and hardware combining etc., that is to say, that the execution master of following handling process
Body is not limited to each logic unit or hardware or logical device.
A kind of structural representation for pattern recognition device that Fig. 8 provides for the embodiment of the present application.Device 800 includes:Obtain
Unit 801, determining unit 802 and recognition unit 803, wherein:
Acquiring unit 801, for by testing results script, obtaining the position coordinates of standard picture and standard picture;
Determining unit 802, for according to position coordinates, the first image of pre-set dimension to be determined in test terminal screen;
Determining unit 802, is additionally operable to
By carrying out characteristic matching to the first image and standard picture, the second image is determined in the first image;
Recognition unit, for by carrying out image comparison to the second image and standard picture, recognizing corresponding with standard picture
Target image.
Optionally it is determined that unit 802 to the first image and standard picture by carrying out characteristic matching, in the first image really
Fixed second image, including:
By carrying out characteristic matching to the first image and standard picture, determine to match between standard picture and the first image
Characteristic point;
According to the characteristic point matched, the 3rd image is determined in the first image, and determine the 3rd image relative to mark
The scaling and/or the anglec of rotation of quasi- image;
According to scaling and/or the anglec of rotation, scaling processing and/or rotation processing are performed to the 3rd image, the is obtained
Two images.
Optionally it is determined that unit 802 determines scaling and/or the anglec of rotation of the 3rd image relative to standard picture,
Including:
The fisrt feature point and second feature point being located in standard picture are chosen in the characteristic point matched;
The third feature point for being located at and matching in the first image with fisrt feature point is chosen in the characteristic point matched, with
And the fourth feature point matched with second feature point;
According to fisrt feature point, second feature point, third feature point and fourth feature point, determine the 3rd image relative to mark
The scaling and/or the anglec of rotation of quasi- image.
Optionally it is determined that unit 802 chosen in the characteristic point matched fisrt feature point in the standard picture and
Second feature point, including:
Determine the matching degree of characteristic point matched between standard picture and the first image;
According to matching degree, the characteristic point being pointed in standard picture carries out the descending sequence of matching degree;
The characteristic point made number one is defined as into fisrt feature point, and deputy characteristic point will be come be defined as
Two characteristic points.
Alternatively, recognition unit 803 to the second image and standard picture by carrying out image comparison, identification and standard picture
Corresponding target image, including:
By carrying out image comparison to the second image and standard picture, determine similar between the second image and standard picture
Degree;
When similarity is more than preset value, the second image of identification is target image.
Alternatively, 803 pair of second image of recognition unit and standard picture carry out image comparison, including:
Image comparison is carried out to the second image and standard picture by following at least one algorithms:With fault-tolerant pixel comparison
Algorithm, intensity contrast algorithm, histogram contrast algorithm.
Alternatively, include with fault-tolerant pixel comparison algorithm:
The serious forgiveness that pixel color changes between second image and standard picture is set;And/or,
The serious forgiveness of pixel-shift between second image and standard picture is set.
According to pattern recognition device, acquiring unit is used to, by testing results script, obtain standard picture and the standard
The position coordinates of image;Determining unit is used for according to position coordinates, and the first figure of pre-set dimension is determined in test terminal screen
Picture;Determining unit is additionally operable to, by carrying out characteristic matching to the first image and standard picture, the second figure be determined in the first image
Picture;Recognition unit, for by carrying out image comparison to the second image and standard picture, recognizing target corresponding with standard picture
Image so that by characteristic matching and the dual identification process of image comparison, effectively improves and is transported in different test terminal devices
Row test script carries out image recognition accuracy rate during APP automatic tests.
A kind of structural representation for pattern recognition device that Fig. 9 provides for the embodiment of the present application.Device 900 may include:It is logical
Pipeline joint 901 and processor 902, alternatively, including memory 903.
Channel interface 901, processor 902 and memory 903 can be connected with each other by the system of bus 904.Bus 404 can
To be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, EISA) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..For ease of representing, only represented in Fig. 9 with a four-headed arrow, it is not intended that only one bus or a type of
Bus.
Alternatively, including memory 903, for depositing program.Specifically, program can include program code, the journey
Sequence code includes computer-managed instruction.Memory 903 can include read-only storage and random access memory, and to processing
Device 902 provides instruction and data.Memory 903 may comprising high-speed random access memory (Random-Access Memory,
RAM), it is also possible to also including nonvolatile memory (non-volatile memory), for example, at least 1 magnetic disk storage.
Processor 902, for performing following operation, alternatively, performs the program that memory 903 is deposited, and specifically use
Operated below performing:
By testing results script, the position coordinates of standard picture and standard picture is obtained;
According to position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, second is determined in described first image
Image;
By carrying out image comparison to second image and the standard picture, recognize corresponding with the standard picture
Target image.
Pattern recognition device or manager (Master) section disclosed in above-mentioned Fig. 1 and Fig. 7-8 illustrated embodiments such as the application
The method that point is performed can apply in processor 902, or be realized by processor 902.Processor 902 is probably a kind of integrated
Circuit chip, the disposal ability with signal.In implementation process, each step of the above method can be by processor 902
Hardware integrated logic circuit or software form instruction complete.Above-mentioned processor 902 can be general processor, bag
Include central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;
It can also be digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application
Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate
Array, FPGA) or other PLDs, discrete gate or transistor logic, discrete hardware components.Can be with
Realize or perform disclosed each method, step and the logic diagram in the embodiment of the present application.General processor can be micro- place
It can also be any conventional processor etc. to manage device or the processor.The step of method with reference to disclosed in the embodiment of the present application
Hardware decoding processor can be embodied directly in and perform completion, or held with the hardware in decoding processor and software module combination
Row is completed.Software module can be located at random access memory, flash memory, read-only storage, programmable read only memory or electrically erasable
Write in the ripe storage medium in this areas such as programmable storage, register.The storage medium is located at memory 903, processor
902 read the information in memory 903, the step of completing the above method with reference to its hardware.
Pattern recognition device 900 can also carry out Fig. 1 method, and realize the method that manager's node is performed.
Embodiment 3
The embodiment of the present application also proposed a kind of computer-readable recording medium, the computer-readable recording medium storage one
Individual or multiple programs, one or more programs include instruction, and the instruction is when the portable electronic for being included multiple application programs
When equipment is performed, the method that the portable electric appts can be made to perform embodiment 1.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the order in embodiment
Perform and still can realize desired result.In addition, the process described in the accompanying drawings not necessarily requires show specific suitable
Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can
With or be probably favourable.
In the 1990s, for a technology improvement can clearly distinguish be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (for the improvement of method flow).So
And, with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, PLD
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, its logic function is determined by user to device programming.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, without asking chip maker to design and make
Special IC chip.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly " patrols
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should
This understands, it is only necessary to slightly programming in logic and be programmed into method flow in integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method flow can be just readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
Device and storage can by the computer of the computer readable program code (such as software or firmware) of (micro-) computing device
Read medium, gate, switch, application specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but is not limited to following microcontroller
Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that except with
Pure computer readable program code mode is realized beyond controller, can be made completely by the way that method and step is carried out into programming in logic
Obtain controller and come real in the form of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc.
Existing identical function.Therefore this controller is considered a kind of hardware component, and various for realizing to including in it
The device of function can also be considered as the structure in hardware component.Or even, can be by for realizing that the device of various functions is regarded
For that not only can be the software module of implementation method but also can be the structure in hardware component.
System, device, module or unit that above-described embodiment is illustrated, can specifically be realized by computer chip or entity,
Or realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented
The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap
Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Also there is other identical element in process, method, commodity or the equipment of element.
The application can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by
Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with
Positioned at including in the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system
Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art
For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent
Replace, improve etc., it should be included within the scope of claims hereof.
Claims (16)
1. a kind of image-recognizing method, it is characterised in that including:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, the second figure is determined in described first image
Picture;
By carrying out image comparison to second image and the standard picture, target corresponding with the standard picture is recognized
Image.
2. the method as described in claim 1, it is characterised in that special by being carried out to described first image and the standard picture
Matching is levied, the second image is determined in described first image, including:
By carrying out characteristic matching to described first image and the standard picture, the standard picture and first figure are determined
The characteristic point matched as between;
According to the characteristic point matched, the 3rd image is determined in described first image, and determine the 3rd image
Relative to the scaling and/or the anglec of rotation of the standard picture;
According to the scaling and/or the anglec of rotation, the 3rd image is performed at scaling processing and/or rotation
Reason, obtains second image.
3. method as claimed in claim 2, it is characterised in that determine contracting of the 3rd image relative to the standard picture
Ratio and/or the anglec of rotation are put, including:
The fisrt feature point and second feature point being located in the standard picture are chosen in the characteristic point matched;
The 3rd for being located at and matching in described first image with the fisrt feature point is chosen in the characteristic point matched
Characteristic point, and the fourth feature point matched with the second feature point;
According to the fisrt feature point, second feature point, third feature point and fourth feature point, it is determined that described
Scaling and/or the anglec of rotation of 3rd image relative to the standard picture.
4. method as claimed in claim 3, it is characterised in that chosen in the characteristic point matched and be located at the standard
Fisrt feature point and second feature point in image, including:
Determine the matching degree of characteristic point matched between the standard picture and described first image;
According to the matching degree, the characteristic point being pointed in the standard picture carries out the descending sequence of matching degree;
The characteristic point made number one is defined as into the fisrt feature point, and deputy characteristic point will be come be defined as institute
State second feature point.
5. the method as described in claim 1, it is characterised in that by scheming to second image and the standard picture
As contrast, target image corresponding with the standard picture is recognized, including:
By carrying out image comparison to second image and the standard picture, second image and the standard drawing are determined
Similarity as between;
When the similarity is more than preset value, it is the target image to recognize second image.
6. method as claimed in claim 5, it is characterised in that image pair is carried out to second image and the standard picture
Than, including:
Image comparison is carried out to second image and the standard picture by following at least one algorithms:With fault-tolerant pixel
Contrast algorithm, intensity contrast algorithm, histogram contrast algorithm.
7. method as claimed in claim 6, it is characterised in that the fault-tolerant pixel comparison algorithm of the band includes:
The serious forgiveness that pixel color changes between second image and the standard picture is set;And/or,
The serious forgiveness of pixel-shift between second image and the standard picture is set.
8. a kind of pattern recognition device, it is characterised in that including:Acquiring unit, determining unit and recognition unit, wherein:
Acquiring unit, for by testing results script, obtaining the position coordinates of standard picture and the standard picture;
Determining unit, for according to the position coordinates, the first image of pre-set dimension to be determined in test terminal screen;
The determining unit, is additionally operable to
By carrying out characteristic matching to described first image and the standard picture, the second figure is determined in described first image
Picture;
Recognition unit, for by carrying out image comparison, identification and the standard to second image and the standard picture
The corresponding target image of image.
9. device as claimed in claim 8, it is characterised in that the determining unit passes through to described first image and the mark
Quasi- image carries out characteristic matching, and the second image is determined in described first image, including:
By carrying out characteristic matching to described first image and the standard picture, the standard picture and first figure are determined
The characteristic point matched as between;
According to the characteristic point matched, the 3rd image is determined in described first image, and determine the 3rd image
Relative to the scaling and/or the anglec of rotation of the standard picture;
According to the scaling and/or the anglec of rotation, the 3rd image is performed at scaling processing and/or rotation
Reason, obtains second image.
10. device as claimed in claim 9, it is characterised in that the determining unit determines the 3rd image relative to institute
The scaling and/or the anglec of rotation of standard picture are stated, including:
The fisrt feature point and second feature point being located in the standard picture are chosen in the characteristic point matched;
The 3rd for being located at and matching in described first image with the fisrt feature point is chosen in the characteristic point matched
Characteristic point, and the fourth feature point matched with the second feature point;
According to the fisrt feature point, second feature point, third feature point and fourth feature point, it is determined that described
Scaling and/or the anglec of rotation of 3rd image relative to the standard picture.
11. device as claimed in claim 10, it is characterised in that the determining unit is selected in the characteristic point matched
Fisrt feature point and second feature point of the fetch bit in the standard picture, including:
Determine the matching degree of characteristic point matched between the standard picture and described first image;
According to the matching degree, the characteristic point being pointed in the standard picture carries out the descending sequence of matching degree;
The characteristic point made number one is defined as into the fisrt feature point, and deputy characteristic point will be come be defined as institute
State second feature point.
12. device as claimed in claim 8, it is characterised in that the recognition unit passes through to second image and described
Standard picture carries out image comparison, recognizes target image corresponding with the standard picture, including:
By carrying out image comparison to second image and the standard picture, second image and the standard drawing are determined
Similarity as between;
When the similarity is more than preset value, it is the target image to recognize second image.
13. device as claimed in claim 12, it is characterised in that the recognition unit is to second image and the standard
Image carries out image comparison, including:
Image comparison is carried out to second image and the standard picture by following at least one algorithms:With fault-tolerant pixel
Contrast algorithm, intensity contrast algorithm, histogram contrast algorithm.
14. device as claimed in claim 13, it is characterised in that the fault-tolerant pixel comparison algorithm of the band includes:
The serious forgiveness that pixel color changes between second image and the standard picture is set;And/or,
The serious forgiveness of pixel-shift between second image and the standard picture is set.
15. a kind of pattern recognition device, it is characterised in that including:Memory and processor, wherein:
Memory, for depositing program;
Processor, the program for performing the memory storage, and specifically perform:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, the second figure is determined in described first image
Picture;
By carrying out image comparison to second image and the standard picture, target corresponding with the standard picture is recognized
Image.
16. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium storage is one or more
Program, one or more of programs are when the electronic equipment for being included multiple application programs is performed so that the electronic equipment
Perform following methods:
By testing results script, the position coordinates of standard picture and the standard picture is obtained;
According to the position coordinates, the first image of pre-set dimension is determined in test terminal screen;
By carrying out characteristic matching to described first image and the standard picture, the second figure is determined in described first image
Picture;
By carrying out image comparison to second image and the standard picture, target corresponding with the standard picture is recognized
Image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710536756.1A CN107274442B (en) | 2017-07-04 | 2017-07-04 | Image identification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710536756.1A CN107274442B (en) | 2017-07-04 | 2017-07-04 | Image identification method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107274442A true CN107274442A (en) | 2017-10-20 |
CN107274442B CN107274442B (en) | 2020-03-10 |
Family
ID=60070001
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710536756.1A Active CN107274442B (en) | 2017-07-04 | 2017-07-04 | Image identification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107274442B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108021346A (en) * | 2017-12-26 | 2018-05-11 | 歌尔科技有限公司 | VR helmets show method, VR helmets and the system of image |
CN108490011A (en) * | 2018-03-07 | 2018-09-04 | 燕山大学 | A kind of localization method of transmission electron microscope block sample detection zone |
CN108564082A (en) * | 2018-04-28 | 2018-09-21 | 苏州赛腾精密电子股份有限公司 | Image processing method, device, server and medium |
CN108648172A (en) * | 2018-03-30 | 2018-10-12 | 四川元匠科技有限公司 | A kind of CT figure Lung neoplasm detecting systems based on 3D-Unet |
CN109332192A (en) * | 2018-08-03 | 2019-02-15 | 小黄狗环保科技有限公司 | A kind of image-recognizing method classified for pop can and beverage bottle |
CN109472279A (en) * | 2018-08-31 | 2019-03-15 | 杭州千讯智能科技有限公司 | Item identification method and device based on image procossing |
CN109901988A (en) * | 2017-12-11 | 2019-06-18 | 北京京东尚科信息技术有限公司 | A kind of page elements localization method and device for automatic test |
CN109919164A (en) * | 2019-02-22 | 2019-06-21 | 腾讯科技(深圳)有限公司 | The recognition methods of user interface object and device |
CN109934305A (en) * | 2019-04-01 | 2019-06-25 | 成都大学 | Image-recognizing method and device based on image recognition model |
CN110967350A (en) * | 2019-11-05 | 2020-04-07 | 北京地平线机器人技术研发有限公司 | Chip testing method and device based on image recognition and electronic equipment |
CN111079730A (en) * | 2019-11-20 | 2020-04-28 | 北京云聚智慧科技有限公司 | Method for determining area of sample image in interface image and electronic equipment |
CN112733862A (en) * | 2021-01-05 | 2021-04-30 | 卓望数码技术(深圳)有限公司 | Terminal image automatic matching method, system and storage medium |
CN114996122A (en) * | 2022-04-26 | 2022-09-02 | 北京达佳互联信息技术有限公司 | Automatic testing method and device, electronic equipment and storage medium |
CN117899496A (en) * | 2023-05-16 | 2024-04-19 | 上海屏云科技有限公司 | Game picture generation method and system with reality enhancement function |
CN117975045A (en) * | 2024-02-20 | 2024-05-03 | 蚂蚁云创数字科技(北京)有限公司 | Texture recognition processing method and device based on model |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102117412A (en) * | 2009-12-31 | 2011-07-06 | 北大方正集团有限公司 | Method and device for image recognition |
CN105513038A (en) * | 2014-10-20 | 2016-04-20 | 网易(杭州)网络有限公司 | Image matching method and mobile phone application test platform |
CN105740874A (en) * | 2016-03-04 | 2016-07-06 | 网易(杭州)网络有限公司 | Method and device for determining operation coordinate of automation test script during playback |
CN105868102A (en) * | 2016-03-22 | 2016-08-17 | 中国科学院软件研究所 | Computer vision based mobile terminal application testing system and method |
-
2017
- 2017-07-04 CN CN201710536756.1A patent/CN107274442B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102117412A (en) * | 2009-12-31 | 2011-07-06 | 北大方正集团有限公司 | Method and device for image recognition |
CN105513038A (en) * | 2014-10-20 | 2016-04-20 | 网易(杭州)网络有限公司 | Image matching method and mobile phone application test platform |
CN105740874A (en) * | 2016-03-04 | 2016-07-06 | 网易(杭州)网络有限公司 | Method and device for determining operation coordinate of automation test script during playback |
CN105868102A (en) * | 2016-03-22 | 2016-08-17 | 中国科学院软件研究所 | Computer vision based mobile terminal application testing system and method |
Non-Patent Citations (1)
Title |
---|
SONG FUHUA, LU BIN: "An Automatic Video Image Mosaic Algorithm Based on SIFT Feature Matching", 《PROCEEDINGS OF THE 2012 INTERNATIONAL CONFERENCE ON COMMUNICATION, ELECTRONICS AND AUTOMATION ENGINEERING》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109901988A (en) * | 2017-12-11 | 2019-06-18 | 北京京东尚科信息技术有限公司 | A kind of page elements localization method and device for automatic test |
CN108021346A (en) * | 2017-12-26 | 2018-05-11 | 歌尔科技有限公司 | VR helmets show method, VR helmets and the system of image |
CN108490011B (en) * | 2018-03-07 | 2020-08-14 | 燕山大学 | Method for positioning detected area of transmission electron microscope block sample |
CN108490011A (en) * | 2018-03-07 | 2018-09-04 | 燕山大学 | A kind of localization method of transmission electron microscope block sample detection zone |
CN108648172A (en) * | 2018-03-30 | 2018-10-12 | 四川元匠科技有限公司 | A kind of CT figure Lung neoplasm detecting systems based on 3D-Unet |
CN108564082A (en) * | 2018-04-28 | 2018-09-21 | 苏州赛腾精密电子股份有限公司 | Image processing method, device, server and medium |
CN109332192A (en) * | 2018-08-03 | 2019-02-15 | 小黄狗环保科技有限公司 | A kind of image-recognizing method classified for pop can and beverage bottle |
CN109472279A (en) * | 2018-08-31 | 2019-03-15 | 杭州千讯智能科技有限公司 | Item identification method and device based on image procossing |
CN109919164A (en) * | 2019-02-22 | 2019-06-21 | 腾讯科技(深圳)有限公司 | The recognition methods of user interface object and device |
CN109919164B (en) * | 2019-02-22 | 2021-01-05 | 腾讯科技(深圳)有限公司 | User interface object identification method and device |
CN109934305A (en) * | 2019-04-01 | 2019-06-25 | 成都大学 | Image-recognizing method and device based on image recognition model |
CN110967350B (en) * | 2019-11-05 | 2023-04-11 | 北京地平线机器人技术研发有限公司 | Chip testing method and device based on image recognition and electronic equipment |
CN110967350A (en) * | 2019-11-05 | 2020-04-07 | 北京地平线机器人技术研发有限公司 | Chip testing method and device based on image recognition and electronic equipment |
CN111079730A (en) * | 2019-11-20 | 2020-04-28 | 北京云聚智慧科技有限公司 | Method for determining area of sample image in interface image and electronic equipment |
CN111079730B (en) * | 2019-11-20 | 2023-12-22 | 北京云聚智慧科技有限公司 | Method for determining area of sample graph in interface graph and electronic equipment |
CN112733862A (en) * | 2021-01-05 | 2021-04-30 | 卓望数码技术(深圳)有限公司 | Terminal image automatic matching method, system and storage medium |
CN114996122A (en) * | 2022-04-26 | 2022-09-02 | 北京达佳互联信息技术有限公司 | Automatic testing method and device, electronic equipment and storage medium |
CN117899496A (en) * | 2023-05-16 | 2024-04-19 | 上海屏云科技有限公司 | Game picture generation method and system with reality enhancement function |
CN117975045A (en) * | 2024-02-20 | 2024-05-03 | 蚂蚁云创数字科技(北京)有限公司 | Texture recognition processing method and device based on model |
CN117975045B (en) * | 2024-02-20 | 2024-09-10 | 蚂蚁云创数字科技(北京)有限公司 | Texture recognition processing method and device based on model |
Also Published As
Publication number | Publication date |
---|---|
CN107274442B (en) | 2020-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107274442A (en) | A kind of image-recognizing method and device | |
CN109189682A (en) | A kind of script method for recording and device | |
CN109345553B (en) | Palm and key point detection method and device thereof, and terminal equipment | |
CN109034183B (en) | Target detection method, device and equipment | |
US10706530B2 (en) | Object detection | |
CN109389038A (en) | A kind of detection method of information, device and equipment | |
CN110096929A (en) | Target detection neural network based | |
CN109215037B (en) | Target image segmentation method and device and terminal equipment | |
CN107025480A (en) | Image generating method and its equipment | |
CN108345539A (en) | A kind of method and apparatus for carrying out AB tests | |
CN111539412A (en) | Image analysis method, system, device and medium based on OCR | |
CN109165657A (en) | A kind of image feature detection method and device based on improvement SIFT | |
US8248409B2 (en) | Point in polyhedron | |
CN112347512A (en) | Image processing method, device, equipment and storage medium | |
CN114090155A (en) | Robot process automation interface element positioning method and device and storage medium | |
CN107391540A (en) | A kind of small routine methods of exhibiting, device and grader | |
CN106484614A (en) | A kind of method of verification picture processing effect, device and mobile terminal | |
CN113516697B (en) | Image registration method, device, electronic equipment and computer readable storage medium | |
CN110968513B (en) | Recording method and device of test script | |
CN113971650A (en) | Product flaw detection method, computer device and storage medium | |
CN107368281A (en) | A kind of data processing method and device | |
CN111738290A (en) | Image detection method, model construction and training method, device, equipment and medium | |
CN117952941A (en) | Circuit board defect detection method and device | |
CN109542775A (en) | A kind of generation and execution method and device of test script | |
CN108803984A (en) | A kind of input control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |