CN106910207A - Method, device and terminal device for recognizing image local area - Google Patents

Method, device and terminal device for recognizing image local area Download PDF

Info

Publication number
CN106910207A
CN106910207A CN201710111788.7A CN201710111788A CN106910207A CN 106910207 A CN106910207 A CN 106910207A CN 201710111788 A CN201710111788 A CN 201710111788A CN 106910207 A CN106910207 A CN 106910207A
Authority
CN
China
Prior art keywords
region
matching
template image
area
interest
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
Application number
CN201710111788.7A
Other languages
Chinese (zh)
Other versions
CN106910207B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710111788.7A priority Critical patent/CN106910207B/en
Publication of CN106910207A publication Critical patent/CN106910207A/en
Application granted granted Critical
Publication of CN106910207B publication Critical patent/CN106910207B/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

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)
  • Image Analysis (AREA)

Abstract

The application is related to method, device and terminal device for recognizing image local area, and method includes:Obtain at least one of template image region and ignore region as at least one;The template image and source images are carried out into matching primitives, ignore described at least one when calculating and ignore region, the length of wherein described source images is more than or equal to the length of the template image, the width of the width more than or equal to the template image of the source images;Recognition result is determined according to the result that the matching primitives are obtained.The technical scheme of the application can be when identification includes correspondence position of the sectional drawing of extraneous background in screen, it is possible to increase matching confidence and efficiency such that it is able to improve the quality of identification.

Description

Method, device and terminal device for recognizing image local area
Technical field
The application is related to automatization testing technique field, in particular to the method for recognizing image local area, Device and terminal device.
Background technology
In correlation technique, the process of automatic recording script is:User records instrument automatic identification and uses to equipment operation, script The operation at family, generates corresponding operation script in real time, while the image of automatic intercept operation position is saved in script, by sectional drawing File path as script argument, as shown in Figure 1.
Returning the principle of script is, in testing results script, it is necessary to by the sectional drawing in script and the current picture of equipment Scripts match is carried out, position of the sectional drawing in script in screen is identified, so that positioning action position, holds with the position Travel far and wide the operation of this definition, so as to reach the purpose of Automation regression testing.
Wherein, correspondence position of the identification sectional drawing in screen is very crucial step, and correlation technique is credible by setting Whether degree threshold value is correct to determine the result of image recognition, and operated as position foundation.Under normal conditions, in script The sectional drawing of generation typically can all have some unnecessary extraneous backgrounds (such as surrounding scene of gaming controls, under different scenes or The background of menu is different under the different enlargement ratios of Same Scene), these extraneous backgrounds can be made to the confidence level calculating for recognizing Into adverse effect, such as Fig. 3 is the confidence level of recognition target image when script sectional drawing includes extraneous background for 0.825, Fig. 4 is pin The confidence level of recognition target image is 0.989 when this sectional drawing removes extraneous background.
In actually test script is recorded, it is impossible to ensure that producing the sectional drawing obtained during script does not include extraneous background.Therefore The image matching effect of the sectional drawing that raising includes extraneous background is the big problem that script regression test faces.
The content of the invention
Disclosure is used for the method for recognizing image local area, is recognizing the sectional drawing for including extraneous background in screen In correspondence position when so that matching confidence improve.
Other characteristics of the invention and advantage will be apparent from by following detailed description, or partially by the present invention Practice and acquistion.
According to an aspect of the present invention, there is provided a kind of method for recognizing image local area, including:
Obtain at least one of template image region and ignore region as at least one;
The template image and source images are carried out into matching primitives, are ignored described at least one when calculating and is ignored region, , more than or equal to the length of the template image, the width of the source images is more than or equal to institute for the length of wherein described source images State the width of template image;
Recognition result is determined according to the result that the matching primitives are obtained.
According to some embodiments, at least one of acquisition template image region ignores region as at least one to be included: Response user's operation obtains at least one region set on the template image and ignores region as described at least one.
According to some embodiments, at least one of acquisition template image region ignores region as at least one to be included: At least one region is automatically identified from the template image according to sets requirement and ignores region as described at least one.
According to some embodiments, at least one region conduct is automatically identified from the template image according to sets requirement Described at least one ignores region includes:Background area is automatically identified from the template image to be neglected as described at least one Omit region.
According to some embodiments, the template image and source images are carried out into matching primitives includes:By the template image Correlation coefficient matching method is normalized with the source images to calculate.
According to some embodiments, the template image and source images are carried out into matching primitives, ignore when calculating it is described extremely Few one is ignored region and included:
Wherein T is the template image;
I is the source images;
R (x, y) is reliability matrix of the upper left corner of the template image T at (x, y) position of the source images I;
(x ', y ') is the pixel in the template image T;
S ignores region for described at least one.According to some embodiments, determined according to the result that the matching primitives are obtained Recognition result includes:
Matching result matrix is obtained according to the matching primitives, if the maximum confidence in the matching result matrix reaches It is pre-conditioned, then using the corresponding region of the maximum confidence as matching area.
According to some embodiments, methods described also includes obtaining at least one of template image region as at least One region-of-interest;
The result obtained according to the matching primitives determines that recognition result includes:
Using the matching primitives as the first matching primitives, determined at least according to the result that first matching primitives are obtained One primary election matching area;
At least one region-of-interest is carried out into second with least one primary election matching area respectively respectively to match Calculate, recognition result is determined according to the result that second matching primitives are obtained.
According to some embodiments, obtain at least one region-of-interest and/or described at least one ignore region and include: Response user operation obtain on the template image set at least one region as at least one region-of-interest and/ Or described at least one ignore region, or at least one region is automatically identified from the template image according to sets requirement Ignore region as at least one region-of-interest and/or described at least one.According to some embodiments, first matching Calculate and/or second matching primitives are normalizated correlation coefficient matching primitives.
According to some embodiments, determine that recognition result includes according to the result that second matching primitives are obtained:
Calculate the final confidence of each primary election matching area at least one primary election matching area;
Using the maximum primary election matching area of the final confidence as matching area;
The final confidence for wherein calculating primary election matching area uses below equation:
Wherein C is a final confidence for primary election matching area at least one primary election matching area;
S1 is the area of the first region-of-interest at least one region-of-interest;
C1 is that the maximum that first region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
S2 is the area of the second region-of-interest at least one region-of-interest;
C2 is that the maximum that second region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
SN is the area of N region-of-interests at least one region-of-interest;
CN is the N region-of-interests maximum credible with what one second matching primitives of primary election matching area were obtained Degree.
According to another aspect of the present invention, there is provided a kind of device for recognizing image local area, it includes:
Ignore area acquisition unit, area is ignored as at least one for obtaining at least one of template image region Domain;
Matching primitives unit, for the template image and source images to be carried out into matching primitives, ignores described when calculating At least one ignores the pixel in region, wherein length of the length of the source images more than or equal to the template image, institute State the width of the width more than or equal to the template image of source images;
As a result determining unit, the result for being obtained according to the matching primitives determines recognition result.
According to some embodiments, the area acquisition unit of ignoring is additionally operable to:Response user's operation is obtained in the template Ignore region as described at least one at least one region set on image.
According to some embodiments, the area acquisition unit of ignoring is additionally operable to:According to sets requirement from the template image On automatically identify at least one region and ignore region as described at least one.
According to some embodiments, the area acquisition unit of ignoring is additionally operable to:Automatically identified from the template image Ignore region as described at least one in background area.
According to some embodiments, the matching primitives unit is additionally operable to:The template image is carried out with the source images Normalizated correlation coefficient matching primitives.According to some embodiments, the matching primitives unit is used for the template image and institute Stating source images carries out matching primitives, and ignoring described at least one and ignore region when calculating includes:
Wherein T is the template image;
I is the source images;
R (x, y) is reliability matrix of the upper left corner of the template image T at (x, y) position of the source images I;
(x ', y ') is the pixel in the template image T;
S ignores region for described at least one.
According to some embodiments, the result determining unit is used for:Matching result matrix is obtained according to the matching primitives, If the maximum confidence in the matching result matrix reach it is pre-conditioned, using the corresponding region of the maximum confidence as Matching area.
According to some embodiments, described device also includes region-of-interest acquiring unit and the second matching primitives unit;
The region-of-interest acquiring unit is used for:At least one of template image region is obtained as at least one Region-of-interest;
The second matching primitives unit is used for:Using the matching primitives as the first matching primitives, according to described first The result that matching primitives are obtained determines at least one primary election matching area, respectively by least one region-of-interest respectively with institute Stating at least one primary election matching area carries out the second matching primitives;
The result determining unit is used for:Recognition result is determined according to the result that second matching primitives are obtained.
According to some embodiments, the area acquisition unit of ignoring is used for:Response user's operation is obtained in the Prototype drawing As region is ignored at least one region of upper setting as described at least one, or according to sets requirement from the template image On automatically identify at least one region and ignore region as described at least one.According to some embodiments, the region-of-interest Acquiring unit is used for:Response user's operation obtains at least one region set on the template image as described at least one Individual region-of-interest, or according to sets requirement automatically identified from the template image at least one region as it is described at least One region-of-interest.
According to some embodiments, in the matching primitives unit, first matching primitives and/or second matching are counted It is normalizated correlation coefficient matching primitives to calculate.
According to some embodiments, the result determining unit is used for:
Calculate the final confidence of each primary election matching area at least one primary election matching area;
Using the maximum primary election matching area of the final confidence as matching area;
The final confidence for wherein calculating primary election matching area uses below equation:
Wherein C is a final confidence for primary election matching area at least one primary election matching area;
S1 is the area of the first region-of-interest at least one region-of-interest;
C1 is that the maximum that first region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
S2 is the area of the second region-of-interest at least one region-of-interest;
C2 is that the maximum that second region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
SN is the area of N region-of-interests at least one region-of-interest;
CN is the N region-of-interests maximum credible with what one second matching primitives of primary election matching area were obtained Degree.
According to another aspect of the present invention, there is provided a kind of terminal device, including:Processor;Memory, stores for processing The instruction of the following operation of device control:
Obtain at least one of template image region and ignore region as at least one;
The template image and source images are carried out into matching primitives, are ignored described at least one when calculating and is ignored region, , more than or equal to the length of the template image, the width of the source images is more than or equal to institute for the length of wherein described source images State the width of template image;
Recognition result is determined according to the result that the matching primitives are obtained.
The technical scheme that embodiments herein is provided can include the following benefits:
The sectional drawing that the technical scheme that embodiments herein is provided can include extraneous background in identification is in screen During correspondence position, it is possible to increase matching confidence and efficiency such that it is able to improve the quality of identification.It should be appreciated that more than General description and detailed description hereinafter be only exemplary, the present invention can not be limited.
Brief description of the drawings
Its example embodiment is described in detail by referring to accompanying drawing, above and other feature of the invention and advantage will become more Plus substantially.
Fig. 1 shows the test script exemplary plot in correlation technique;
Fig. 2 identifies the schematic diagram of Pictures location when showing testing results script in correlation technique
The schematic diagram of confidence level is calculated when Fig. 3 shows that template image is comprising extraneous background in correlation technique;
Fig. 4 calculates the schematic diagram of confidence level when showing that template image does not include extraneous background in correlation technique;
Fig. 5 shows the method for recognizing image local area according to an embodiment of the invention;
Fig. 6 shows the method for recognizing image local area according to another embodiment of the present invention;
Fig. 7 shows the template image example in the application scenario schematic diagram shown in example according to an embodiment of the invention Figure;
In the application scenario schematic diagram that Fig. 8 shows shown in example according to an embodiment of the invention by template image not Relevant range is with the exemplary plot after black signal;
Fig. 9 shows the source images example in the application scenario schematic diagram shown in example according to an embodiment of the invention Figure;
Figure 10 shows that the template image in the application scenario schematic diagram shown in example according to an embodiment of the invention shows Illustration;
Figure 11 shows the source images example in the application scenario schematic diagram shown in example according to an embodiment of the invention Figure;
Figure 12 shows that the template image shown in example according to an embodiment of the invention carries out first and matches with source images The result figure of calculating;
Figure 13 shows that the first concern area shown in example according to an embodiment of the invention carries out the second matching primitives Result figure;
Figure 14 shows that the second concern area shown in example according to an embodiment of the invention carries out the second matching primitives Result figure;
Figure 15 shows that the 3rd concern area shown in example according to an embodiment of the invention carries out the second matching primitives Result figure;
Figure 16 shows the block diagram for recognizing the device of image local area according to an embodiment of the invention;
Figure 17 shows the block diagram for recognizing the device of image local area according to another embodiment of the present invention;
Figure 18 shows terminal device according to an embodiment of the invention.
Specific embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be real in a variety of forms Apply, and be not understood as limited to embodiment set forth herein;Conversely, thesing embodiments are provided so that the present invention will be comprehensively and complete It is whole, and the design of example embodiment is comprehensively conveyed into those skilled in the art.Identical reference is represented in figure Same or similar part, thus repetition thereof will be omitted.
Additionally, described feature, structure or characteristic can be combined in one or more implementations in any suitable manner In example.In the following description, there is provided many details fully understand so as to be given to embodiments of the invention.However, It will be appreciated by persons skilled in the art that it is one or more during technical scheme can be put into practice without specific detail, Or can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known square Method, device, realization operate to avoid fuzzy each aspect of the present invention.
Block diagram shown in accompanying drawing is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in accompanying drawing is merely illustrative, it is not necessary to including all of content and operation/step, It is not required to be performed by described order.For example, some operation/steps can also be decomposed, and some operation/steps can be closed And or part merge, therefore the actual order for performing is possible to be changed according to actual conditions.
Fig. 5 shows the method for recognizing image local area according to an embodiment of the invention, and the present embodiment can be fitted For identifying the situation consistent with regional area content in template image from source images, as shown in figure 5, described in the present embodiment For recognizing that the method for image local area includes:
In step S510, obtain at least one of template image region and ignore region as at least one.
Region of ignoring described in the present embodiment is set by template image, can be the enclosed area of arbitrary shape Domain.Can in several ways obtain, for example, by responding user acquisition can be operated to be set extremely on the template image Region is ignored in a few region as described at least one, or can also be automatic from the template image according to sets requirement Ignore region, the background area for for example being obtained by automatic identification as described at least one at least one region identified.
In step S520, the template image and source images are carried out into matching primitives, ignore when calculating it is described at least One is ignored region.
The length of wherein described source images is more than or equal to the length of the template image, and the width of the source images is more than Or equal to the width of the template image.
When carrying out matching confidence calculating, do not consider that described at least one ignores the pixel in region.
In step S530, recognition result is determined according to the result that the matching primitives are obtained.
When the template image is identified from source images, carry out template image carries out matching meter the present embodiment with source images That ignores setting during calculation ignores region, and recognition result is determined according to the result that the matching primitives are obtained.Can be included in identification When having correspondence position of the sectional drawing of extraneous background in screen, it is possible to increase matching confidence and efficiency such that it is able to improve and know Other quality.
Fig. 6 shows the method for recognizing image local area according to another embodiment of the present invention, as shown in fig. 6, Described in the present embodiment for recognizing that the method for image local area includes:
In step S610, response user's operation obtains at least one region set on the template image as institute State at least one and ignore region.
Region of ignoring described in the present embodiment can be set by template image, can be the envelope of arbitrary shape Closed region.Can in several ways obtain, for example, by responding user acquisition can be operated to be set on the template image At least one region ignore region as described at least one, or can also be according to sets requirement from the template image Ignore region as described at least one at least one region for automatically identifying.
For example using Fig. 7 as template image, Fig. 9 as source images, with identify in fig .9 comprising " culinary art ", " refining medicine ", And as a example by " setting up a stall " three menu bars of submenu.Can frame selects portion outside the menu bar in the figure 7 by obtaining user It is allocated as to ignore region, as shown in figure 8, this ignores area illustrated with black, and when computer performs algorithm, this region is not involved in Matching operation.
In step S620, response user's operation obtains at least one region set on the template image as institute State at least one region-of-interest.
Identical with step S610, the region-of-interest described in the present embodiment is set by template image, Ke Yishi The closed area of arbitrary shape.Can in several ways obtain, for example, can operate acquisition in the mould by responding user At least one region set on plate image, or can also be according to sets requirement from institute used as at least one region-of-interest At least one region automatically identified on template image is stated as at least one region-of-interest.
For example using Figure 10 as template image, Figure 11 includes Figure 10 as source images with the identification in Figure 11 described images As a example by three blocks of button in described image.Can by obtain user in Fig. 10 frame select " culinary art ", " refining medicine " and Region where " setting up a stall " word segment is respectively as the first concern area, the second concern area and the 3rd concern area.
In step S630, the template image and source images are normalized correlation coefficient matching method and calculate determination at least One primary election matching area, ignores described at least one and ignores region when calculating.
When carrying out matching primitives, do not consider that described at least one ignores the pixel in region.
When carrying out template matches, the method for matching primitives include it is various, for example:Squared difference and matching (CV_TM_ SQDIFF), normalization squared difference and matching (CV_TM_SQDIFF_NORMED), relevant matches (CV_TM_CCORR), normalizing Change relevant matches (CV_TM_CCORR_NORMED), correlation coefficient matching method (CV_TM_CCOEFF) and normalizated correlation coefficient Matching (CV_TM_CCOEFF_NORMED) etc..The present embodiment is not construed as limiting to this.
Can for example be matched using normalizated correlation coefficient, finally return that at least one most like result position and the result The corresponding matching similarity in position.Result screening is carried out by threshold value set in advance, if matching similarity is higher than default threshold Value, then recognition result is gained, if similarity abandons recognition result less than predetermined threshold value.
Figure 12 shows that the template image according to Figure 10 carries out the first matching primitives with the source images shown in Figure 11 Result figure, the result is that template image described in Figure 10 and the source images described in Figure 11 are carried out into the first normalizated correlation coefficient to match Calculate, obtain a primary election matching area shown in Figure 12 the right, the confidence level that both match is 0.637.
In step S640, respectively by least one region-of-interest respectively with least one primary election matching area Carry out the second matching primitives.
Figure 13 shows the result figure for carrying out the second matching primitives with the primary election matching area according to the first concern area, its Confidence level is 0.984, is designated as C1;Figure 14 shows that carrying out second with the primary election matching area according to the second concern area matches meter The result figure of calculation, its confidence level is 0.984, is designated as C2;Figure 15 is shown according to the 3rd concern area and the primary election matching area It is 0.981 to carry out its confidence level of the result figure of the second matching primitives, is designated as C3.
First concern area's area is S1, and the confidence level obtained is C1;Second concern area's area is S2, and the confidence level obtained is C2;3rd concern area's area is S3, and the confidence level obtained is C3.Then final confidence C asks for as follows:
Above-mentioned example, the confidence level of first template matches is asked for being 0.637.After secondary confidence level is asked for, Minimum support4 0.981, maximum confidence 0.984, then final confidence level one is scheduled in [0.981,0.984] interval, is much better than first template Matching.
In step S650, recognition result is determined according to the result that second matching primitives are obtained.
It should be noted that above-mentioned example only obtains a primary election matching area.If after matching for the first time, existing and being more than One confidence level of matching area is more than default believability threshold, then be both needed to as primary election matching area.Now occur as soon as just Select situation of the matching area number more than 1.In this case, it is necessary to being directed to each primary election matching area carries out above-mentioned calculating, The final confidence C of each primary election matching area is obtained, finally using final confidence C maximum primary election matching area as most Whole matching result.
The present embodiment can identify that regional area content is consistent but position is inconsistent with template image from source images Image, it is possible to increase matching confidence and efficiency such that it is able to improve identification quality.For including phase in template image Like but distinguishing element and source images in each element dislocation situation, can greatly improve identification using this method can Reliability, is very beneficial for the screening of image recognition result.
The present embodiment can significantly expand the practical model of template matches by ignoring being used in combination for region and region-of-interest Enclose, be exemplified below:
In template image with source images in target area contrast in have following four classes region:Regional area A contents and Position corresponds to consistent;The content of regional area B is consistent but position is inconsistent;But the inconsistent position of regional area C contents Unanimously;The content of regional area D and position are inconsistent.
So in the matching of the present embodiment, ignore the region that needs are ignored when region is matching for the first time, it is therefore desirable to will The region inconsistent with source images target area is shielded in template image, by regional area B, regional area C, regional area D is set to ignore region.Again because region-of-interest is regional area A and regional area B, regional area A and regional area B are set to Region-of-interest.
In first template matches, the target area in source images can be pin-pointed to by regional area A;Secondary mould In plate matching, localized region A and regional area B carry out secondary template matching respectively, and are obtained by confidence level ranking operation Corresponding confidence level.
By above step, it is possible to have the matching case of certain change to source images, image is carried out using template matches Matching operation.
Include more extraneous background in template image, and part effective coverage has one with the target area of source images During fixed position deviation, conventional template matches can only be by carrying out template respectively to effective coverage in whole source images respectively , then be weighted recognition credibility averagely by matching.In the present embodiment, region is ignored by adding so that if can be by The content of dry effective coverage carries out first template matches in the lump, it is to avoid cause because introducing more extraneous background in template image The too low problem of similarity;And by respectively by the region-of-interest in template image, the source figure obtained with first template matches As target area, secondary template matching is carried out, can rapidly obtain the confidence level of each region-of-interest, and then carry out confidence level weighting Averagely (according to Area-weighted).
Technical scheme described in the present embodiment at least includes advantages below:
First, relative to existing correlation technique, the method in the present embodiment can greatly save match time.
Than if any in the case of region-of-interest, conventional method needs to perform the mould of 5 region-of-interests and source images respectively at 5 Plate is matched.In template matches, amount of calculation and source images are proportional relations.
In the present embodiment, only first template matches need to carry out to be matched with source images, are source figure in Secondary Match Target area (and template image is in the same size) as in is used as " source images ", the source images that 5 times are paid close attention to computing in Secondary Match Size is the size of template image.
In general application scenarios, template image is more much smaller than source images (a small magnitude), if setting template herein Image is 1/10 size of source images, and it is T to be taken in the template matches of whole source images every time, is taken in secondary template matching big The about rank of 0.1T.About 5T ranks are then taken in conventional method, and the matching in the present embodiment takes about 1.5T ranks.
Secondly, relative to existing correlation technique, the method in the present embodiment can obtain more reliable confidence level higher. In ins and outs description above, region-of-interest is specified by accurate, the confidence level of interest region can be obtained, it is to avoid nothing The interference that background is likely to result in is closed, be it also avoid because the mistake of the confidence level calculating that the displacement of effective content is caused.
Figure 16 shows the block diagram for recognizing the device of image local area according to an embodiment of the invention, such as Figure 16 Shown, the device by recognizing image local area described in the present embodiment includes ignoring area acquisition unit 1610, based on matching Calculate unit 1620 and result determining unit 1630.
This is ignored area acquisition unit 1610 and is configured to obtain at least one of template image region as extremely Few one is ignored region;
The matching primitives unit 1620 is configured to for the template image and source images to carry out matching primitives, Ignore described at least one during calculating and ignore region, wherein length of the length of the source images more than or equal to the template image Degree, the width of the width more than or equal to the template image of the source images;
The result that the result determining unit 1630 is configured to be obtained according to the matching primitives determines identification knot Really.
Some embodiments of the invention, the area acquisition unit 1610 of ignoring is additionally operable to:Response user's operation is obtained Take at least one region set on the template image and ignore region as described at least one.
Some embodiments of the invention, the area acquisition unit 1610 of ignoring is additionally operable to:According to sets requirement from At least one region is automatically identified on the template image and ignores region as described at least one.
Some embodiments of the invention, the area acquisition unit 1610 of ignoring is additionally operable to:From the template image On automatically identify background area and ignore region as described at least one.
Some embodiments of the invention, the matching primitives unit 1620 is additionally operable to:By the template image and institute State source images and be normalized correlation coefficient matching method calculating.
Some embodiments of the invention, the matching primitives unit 1620 is used for the template image and the source Image carries out matching primitives, and ignoring described at least one and ignore region when calculating includes:
Wherein T is the template image;
I is the source images;
R (x, y) is reliability matrix of the upper left corner of the template image T at (x, y) position of the source images I;
(x ', y ') is the pixel in the template image T;
S ignores region for described at least one.It should be noted that the template image and the source images are carried out It is corresponding with, it is necessary to the traversal that template image T and source images I carry out matching degree is calculated, asking for traveling through position every time when calculating Reliability matrix R (x, y) of the upper left corner of the template image T at (x, y) position of the source images I.
R (x, y) need each pixel value T (x ', y ') by the template image T in addition to region is ignored with described in it The I (x+x ', y+y ') overlapped in source images carries out matching degree calculating, traverse template image T traversed in source images I (x, Matching degree matrix when y) is R (x, y).
Some embodiments of the invention, the result determining unit 1630 is used for:Obtained according to the matching primitives Matching result matrix, if the maximum confidence in the matching result matrix reach it is pre-conditioned, by the maximum confidence Corresponding region is used as matching area.
On the device in above-described embodiment, wherein unit performs the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
The device for recognizing the image local area executable embodiment of the present invention one and embodiment that the present embodiment is provided Two methods for recognizing image local area for being provided, possess the corresponding functional module of execution method and beneficial effect.
Figure 17 shows the block diagram for recognizing the device of image local area according to another embodiment of the present invention, such as schemes Shown in 17, described in the present embodiment for recognizing that the device of image local area includes:Ignore area acquisition unit 1710, concern Area acquisition unit 1720, matching primitives unit 1730, the second matching primitives unit 1740 and result determining unit 1750.
This is ignored area acquisition unit 1710 and is configured to obtain at least one of template image region as extremely Few one is ignored region;
The region-of-interest acquiring unit 1720 is configured as, and obtains at least one of template image region as extremely A few region-of-interest;
The matching primitives unit 1730 is configured to for the template image and source images to carry out matching primitives, Ignore described at least one during calculating and ignore region, wherein length of the length of the source images more than or equal to the template image Degree, the width of the width more than or equal to the template image of the source images;
The second matching primitives unit 1740 is configured as, using the matching primitives as the first matching primitives, according to institute State the result that the first matching primitives obtain and determine at least one primary election matching area, respectively by least one region-of-interest point The second matching primitives are not carried out with least one primary election matching area;
The result determining unit 1750 is configured as, and the result obtained according to second matching primitives determines identification knot Really.
Some embodiments of the invention, the area acquisition unit 1710 of ignoring is used for:Response user's operation is obtained Region is ignored at least one region set on the template image as described at least one, or according to sets requirement from At least one region is automatically identified on the template image and ignores region as described at least one;And/or
The region-of-interest acquiring unit 1720 is used for:Response user's operation is obtained and set extremely on the template image A few region is used as at least one region-of-interest, or is automatically identified from the template image according to sets requirement At least one region is used as at least one region-of-interest.
Some embodiments of the invention, in the matching primitives unit 1730, first matching primitives and/or institute The second matching primitives are stated for normalizated correlation coefficient matching primitives.
Some embodiments of the invention, the result determining unit 1750 is used for:
Calculate the final confidence of each primary election matching area at least one primary election matching area;
Using the maximum primary election matching area of the final confidence as matching area;
The final confidence for wherein calculating primary election matching area uses below equation:
Wherein C is a final confidence for primary election matching area at least one primary election matching area;
S1 is the area of the first region-of-interest at least one region-of-interest;
C1 is that the maximum that first region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
S2 is the area of the second region-of-interest at least one region-of-interest;
C2 is that the maximum that second region-of-interest is obtained with one second matching primitives of primary election matching area can Reliability;
SN is the area of N region-of-interests at least one region-of-interest;
CN is the N region-of-interests maximum credible with what one second matching primitives of primary election matching area were obtained Degree.
Some embodiments of the invention, the matching primitives unit 1730 is used for the template image and the source Image carries out matching primitives, and ignoring described at least one and ignore region when calculating includes:
Wherein T is the template image;
I is the source images;
R (x, y) is reliability matrix of the upper left corner of the template image T at (x, y) position of the source images I;
(x ', y ') is the pixel in the template image T;
S ignores region for described at least one.The device for recognizing image local area that the present embodiment is provided can be held The method for recognizing image local area that the row embodiment of the present invention one and embodiment two are provided, possesses execution method corresponding Functional module and beneficial effect.
Figure 18 shows terminal device according to an embodiment of the invention, and as shown in figure 18, terminal device 1800 may include Processor 1810, memory 1820, transmitter 1830 and receiver 1840.
Memory 1820 can store the instruction for the treatment of the control operation of processor 1810.Memory 1820 may include volatile Property or nonvolatile memory, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only storage (ROM) Deng the present invention is not limited in this respect.
Processor 1810 can call the instruction control associative operation stored in memory 1820.According to an embodiment, storage Device 1820 stores the instruction that following operation is controlled for processor 1810:
Obtain at least one of template image region and ignore region as at least one;
The template image and source images are carried out into matching primitives, are ignored described at least one when calculating and is ignored region, , more than or equal to the length of the template image, the width of the source images is more than or equal to institute for the length of wherein described source images State the width of template image;
Recognition result is determined according to the result that the matching primitives are obtained.
It can be readily appreciated that memory 1820 can also be stored controls other behaviour according to embodiments of the present invention for processor 1810 The instruction of work, repeats no more here.
Processor 1810 also can control transmitter 1830 and receiver 1840 and carry out signal transmitting and receiving etc..
According to some embodiments, the present invention also provides a kind of non-transitorycomputer readable storage medium, such as including referring to The memory of order, above-mentioned instruction can be by the computing device of device completing the above method.For example, non-transitory computer-readable Storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..When depositing Instruction in storage media by terminal computing device when so that terminal is able to carry out following methods:In acquisition template image Ignore region as at least one at least one region;The template image and source images are carried out into matching primitives, when calculating Ignore described at least one and ignore region, wherein length of the length of the source images more than or equal to the template image, institute State the width of the width more than or equal to the template image of source images;Identification is determined according to the result that the matching primitives are obtained As a result.
It will be understood by those skilled in the art that accompanying drawing is the schematic diagram of example embodiment, module or flow in accompanying drawing Not necessarily implement the present invention necessary, therefore cannot be used for limiting the scope of the invention.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, also may be used Uniquely it is different from one or more devices of the present embodiment with carrying out respective change.The module of above-described embodiment can be merged into One module, it is also possible to be further split into multiple submodule.
More than it is particularly shown and described exemplary embodiment of the invention.It should be understood that public the invention is not restricted to institute The embodiment opened, on the contrary, it is intended to cover comprising various modifications in the spirit and scope of the appended claims and wait Effect arrangement.

Claims (13)

1. a kind of method for recognizing image local area, it is characterised in that including:
Obtain at least one of template image region and ignore region as at least one;
The template image and source images are carried out into matching primitives, is ignored described at least one when calculating and is ignored region, wherein , more than or equal to the length of the template image, the width of the source images is more than or equal to the mould for the length of the source images The width of plate image;
Recognition result is determined according to the result that the matching primitives are obtained.
2. the method for claim 1, it is characterised in that obtain at least one of template image region as at least Individual region of ignoring includes:Response user operation obtain on the template image set at least one region as it is described at least One is ignored region.
3. the method for claim 1, it is characterised in that obtain at least one of template image region as at least Individual region of ignoring includes:According to sets requirement automatically identified from the template image at least one region as it is described at least One is ignored region.
4. method as claimed in claim 3, it is characterised in that automatically identified from the template image according to sets requirement Ignore region as described at least one and include at least one region:Background area work is automatically identified from the template image Ignore region for described at least one.
5. the method for claim 1, it is characterised in that the template image and source images are carried out into matching primitives bag Include:The template image and the source images are normalized into correlation coefficient matching method to calculate.
6. method as claimed in claim 5, it is characterised in that the template image and source images are carried out into matching primitives, Ignoring described at least one during calculating and ignoring region includes:
R ( x , y ) = Σ ( x ′ , y ′ ) ∉ S ∈ T ( T ( x ′ , y ′ ) · I ( x + x ′ , y + y ′ ) ) Σ ( x ′ , y ′ ) ∉ S ∈ T T ( x ′ , y ′ ) 2 · Σ ( x ′ , y ′ ) ∉ S ∈ T I ( x + x ′ , y + y ′ ) 2
Wherein T is the template image;
I is the source images;
R (x, y) is reliability matrix of the upper left corner of the template image T at (x, y) position of the source images I;
(x ', y ') is the pixel in the template image T;
S ignores region for described at least one.
7. method as claimed in claim 6, it is characterised in that recognition result is determined according to the result that the matching primitives are obtained Including:
Obtain matching result matrix according to the matching primitives, if the maximum confidence in the matching result matrix reach it is default Condition, then using the corresponding region of the maximum confidence as matching area.
8. method as claimed in claim 6, it is characterised in that methods described also includes obtaining in the template image at least One region is used as at least one region-of-interest;
The result obtained according to the matching primitives determines that recognition result includes:
Using the matching primitives as the first matching primitives, at least one is determined according to the result that first matching primitives are obtained Primary election matching area;
At least one region-of-interest is carried out into the second matching primitives with least one primary election matching area respectively respectively, Recognition result is determined according to the result that second matching primitives are obtained.
9. method as claimed in claim 8, it is characterised in that obtain at least one region-of-interest and/or it is described at least Ignoring region for one includes:Response user operation obtain on the template image set at least one region as it is described extremely A few region-of-interest and/or described at least one ignore region, or it is automatic from the template image according to sets requirement Identify that region is ignored at least one region as at least one region-of-interest and/or described at least one.
10. method as claimed in claim 8, it is characterised in that first matching primitives and/or second matching primitives It is normalizated correlation coefficient matching primitives.
11. methods as claimed in claim 8, it is characterised in that the result obtained according to second matching primitives determines to know Other result includes:
Calculate the final confidence of each primary election matching area at least one primary election matching area;
Using the maximum primary election matching area of the final confidence as matching area;
The final confidence for wherein calculating primary election matching area uses below equation:
C = S 1 · C 1 + S 2 · S 2 + ... + S N · C N S 1 + S 2 + ... + S N
Wherein C is a final confidence for primary election matching area at least one primary election matching area;
S1 is the area of the first region-of-interest at least one region-of-interest;
C1 is the maximum confidence that first region-of-interest is obtained with one second matching primitives of primary election matching area;
S2 is the area of the second region-of-interest at least one region-of-interest;
C2 is the maximum confidence that second region-of-interest is obtained with one second matching primitives of primary election matching area;
SN is the area of N region-of-interests at least one region-of-interest;
CN is the maximum confidence that the N region-of-interests are obtained with one second matching primitives of primary election matching area.
A kind of 12. devices for recognizing image local area, it is characterised in that including:
Ignore area acquisition unit, region is ignored as at least one for obtaining at least one of template image region;
Matching primitives unit, for the template image and source images to be carried out into matching primitives, ignore when calculating it is described at least One pixel ignored in region, wherein length of the length of the source images more than or equal to the template image, the source Width of the width of image more than or equal to the template image;
As a result determining unit, the result for being obtained according to the matching primitives determines recognition result.
A kind of 13. terminal devices, it is characterised in that including:Processor;Memory, stores for processor control as weighed Profit requires the instruction operated described in any one of 1-11.
CN201710111788.7A 2017-02-27 2017-02-27 Method and device for identifying local area of image and terminal equipment Active CN106910207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710111788.7A CN106910207B (en) 2017-02-27 2017-02-27 Method and device for identifying local area of image and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710111788.7A CN106910207B (en) 2017-02-27 2017-02-27 Method and device for identifying local area of image and terminal equipment

Publications (2)

Publication Number Publication Date
CN106910207A true CN106910207A (en) 2017-06-30
CN106910207B CN106910207B (en) 2020-12-08

Family

ID=59208585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710111788.7A Active CN106910207B (en) 2017-02-27 2017-02-27 Method and device for identifying local area of image and terminal equipment

Country Status (1)

Country Link
CN (1) CN106910207B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408384A (en) * 2018-10-16 2019-03-01 网易(杭州)网络有限公司 Test method, device, processor and the electronic device of software application
WO2019140880A1 (en) * 2018-01-22 2019-07-25 深圳壹账通智能科技有限公司 Screen recording method, computer readable storage medium, terminal apparatus, and device
CN111754505A (en) * 2020-06-30 2020-10-09 创新奇智(成都)科技有限公司 Auxiliary material detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604125A (en) * 2004-11-11 2005-04-06 上海交通大学 Target image automatic identification and rapid tracking method
US20150278614A1 (en) * 2014-03-31 2015-10-01 Thinkware Corporation Electronic apparatus and control method thereof
CN105426926A (en) * 2016-01-04 2016-03-23 京东方科技集团股份有限公司 Method and device for performing detection and classification on active-matrix organic light emitting diode (AMOLED)
CN105701766A (en) * 2016-02-24 2016-06-22 网易(杭州)网络有限公司 Image matching method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604125A (en) * 2004-11-11 2005-04-06 上海交通大学 Target image automatic identification and rapid tracking method
US20150278614A1 (en) * 2014-03-31 2015-10-01 Thinkware Corporation Electronic apparatus and control method thereof
CN105426926A (en) * 2016-01-04 2016-03-23 京东方科技集团股份有限公司 Method and device for performing detection and classification on active-matrix organic light emitting diode (AMOLED)
CN105701766A (en) * 2016-02-24 2016-06-22 网易(杭州)网络有限公司 Image matching method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019140880A1 (en) * 2018-01-22 2019-07-25 深圳壹账通智能科技有限公司 Screen recording method, computer readable storage medium, terminal apparatus, and device
CN109408384A (en) * 2018-10-16 2019-03-01 网易(杭州)网络有限公司 Test method, device, processor and the electronic device of software application
CN111754505A (en) * 2020-06-30 2020-10-09 创新奇智(成都)科技有限公司 Auxiliary material detection method and device, electronic equipment and storage medium
CN111754505B (en) * 2020-06-30 2024-03-15 创新奇智(成都)科技有限公司 Auxiliary material detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106910207B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN106898017B (en) The method, apparatus and terminal device of image local area for identification
CN109409517B (en) The training method and device of object detection network
CN107392091B (en) Agricultural artificial intelligence crop detection method, mobile terminal and computer readable medium
EP3637320A1 (en) Computer program, learning apparatus, detecting apparatus, learning method, and detecting method
KR20200100806A (en) Analysis of captured images to determine test results
CN110781976B (en) Extension method of training image, training method and related device
CN106910207A (en) Method, device and terminal device for recognizing image local area
CN111429482A (en) Target tracking method and device, computer equipment and storage medium
CN109948637A (en) Object test equipment, method for checking object and computer-readable medium
CN106326120B (en) Regression testing method and device for application software and electronic equipment
CN111666922A (en) Video matching method and device, computer equipment and storage medium
CN109901996A (en) Method, apparatus, electronic equipment and the readable storage medium storing program for executing of subtest
CN108052929A (en) Parking space state detection method, system, readable storage medium storing program for executing and computer equipment
CN110969200A (en) Image target detection model training method and device based on consistency negative sample
CN112633341A (en) Interface testing method and device, computer equipment and storage medium
CN117372416B (en) High-robustness digital pathological section diagnosis system and method for countermeasure training
CN112989768B (en) Method and device for correcting connection questions, electronic equipment and storage medium
KR102337687B1 (en) Artificial neural network-based target region extraction apparatus, method and learning method thereof
CN113190444A (en) Test method, test device and storage medium
KR20180076020A (en) Apparatus and method for application test automation
US20220222813A1 (en) Method for determining plant growth curve and electronic device
KR102398006B1 (en) Self improving object recognition method and system through image capture
CN111353330A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112819859B (en) Multi-target tracking method and device applied to intelligent security
CN115083355A (en) Display control method, electronic paper display device, electronic apparatus, and readable storage medium

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