CN107153848A - Instrument image automatic identifying method based on OpenCV - Google Patents
Instrument image automatic identifying method based on OpenCV Download PDFInfo
- Publication number
- CN107153848A CN107153848A CN201710450877.4A CN201710450877A CN107153848A CN 107153848 A CN107153848 A CN 107153848A CN 201710450877 A CN201710450877 A CN 201710450877A CN 107153848 A CN107153848 A CN 107153848A
- Authority
- CN
- China
- Prior art keywords
- msup
- mrow
- prime
- template
- image
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/48—Extraction of image or video features by mapping characteristic values of the pattern into a parameter space, e.g. Hough transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/02—Recognising information on displays, dials, clocks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a kind of Instrument image automatic identifying method based on OpenCV, comprise the steps of:Read the Instrument image of camera collection, carry out template matches, known template and existing image are subjected to template matches, the each pixel of input picture is compared with template, and a value is calculated for each pixel, similarity degree after it is compared with template is recorded, the point closest to template is selected, and template associative mode is chosen, carry out next step identification;Instrumented data is read, simple image procossing is carried out to image, respective reading passage is subsequently entered and carries out Recognition of Reading, finally show reading.Fast and accurately the registration in instrument can be identified by the present invention, and the result recognized has higher stability, accuracy and repeatability.
Description
Technical field
The present invention relates to a kind of recognition methods, particularly a kind of Instrument image automatic identifying method based on OpenCV.
Background technology
With the development of domestic and international intelligent monitoring industry and security protection industry, machine vision is increasingly used in human body row
For and Expression Recognition, PCB printed circuits detection, numeral and pointer meters identification, product appearance detection, logistic article classification etc. it is all
Many-side, machine vision substitution artificial vision enters various fields, substantially increases the production and living efficiency of people.
At present, the running status of many equipment shows the pointer instrument for employing many in power system transformer substation, such as
Voltmeter, ammeter, air gauge, thermometer, power meter, oil temperature gauge, oil pressure gauge, arrester table etc..These instrument are general all
Function without data line interface, it is impossible to real-time monitoring, record and the analysis of the parameter measured by instrument are realized, so that can not
The Automated condtrol run to intelligent substation is realized, can not break down or there is a situation where in equipment major safety risks
Under quickly alarmed.In addition, the data of recording apparatus mainly lean on the observation of human eye closely, manually remember
Record, artificial data analysis, the registration precision detected is low, repeatability, poor reliability, and the labor intensity of people is big, is repeated several times
Work easily causes human visual fatigue, easily causes identification data, record data and mistake occurs.
Based on above reason, it is necessary to a kind of technology of instrumented data automatically identifying and reading, it is desirable to which being can be fast and accurately to instrument
Registration on table is identified, and the result recognized has certain stability, accuracy and repeatability, and such result is
There is confidence level, the data that could be run as instrument, the state of the real reaction kit operation of ability.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of Instrument image automatic identifying method based on OpenCV.
In order to solve the above technical problems, the technical solution adopted in the present invention is:
A kind of Instrument image automatic identifying method based on OpenCV, it is characterised in that comprise the steps of:
Step one:The Instrument image of camera collection is read, template matches are carried out, by known template and existing image
Carry out template matches, each pixel of input picture is compared with template, and for each pixel calculate one be worth, record its with
The relatively rear similarity degree of template, selects the point closest to template, and chooses template associative mode, carries out next step identification;
Step 2:Instrumented data is read, simple image procossing is carried out to image, respective reading passage is subsequently entered and carries out
Recognition of Reading, finally shows reading.
Further, in the step one template matches specifically, in the imgproc function libraries provided using OpenCV
MatchTemplate functions, input picture is matched with template image, for each pixel correspondence one in image
Value, shows its similarity with template image, and similarity highest point is preserved with array matchPoint [], used respectively
The six kinds of match pattern matchings of matchTemplate functions, six numerical value in array matchPoint [] are compared, more than three
Point is identical, it is determined that being same quasi-instrument, into next recognition mode.
Further, the matching template, according to the different angles of different demands selection, the picture of brightness, accurately selection
Correspondence instrument;Same instrument, is matched with multiple template.
Further, simple image procossing includes filtering, threshold operation, contour detecting and acquisition in the step 2
ROI is operated.
Further, the acquisition ROI operations, according to the optimal region of the stencil-chosen of template matches, choose ROI region
It is used as the research object of identification.
Further, respective reading passage includes digital instrument and pointer meters, instrument automatic identification in the step 2
Process is that image filtering, using self adaptive threshold operation and contour detecting, obtains suitable frame, further determines that meter location,
External interference is further excluded, is operated followed by line pointer or digital instrument is entered.
Further, the digital instrument identification is known comprising being contrasted using the difference binary map of digital instrument image
Other result, and return to numerical value;Pointer meters identification, comprising the deflection angle using pointer meters image cursor and zero point and
Range, wherein calculating deflection angle using Hough transform algorithm, range is given data, finally gives recognition result, and return to number
Value.
Further, six kinds of match pattern matching algorithms are included,
1) difference of two squares matching method=CV_TM_SQDIFF, is matched using the difference of two squares, and preferably matching is 0,
With poorer, matching value is bigger:
2) standard deviation matching method=CV_TM_SQDIFF_NORMED
3) relevant matches method=CV_TM_CCORR, is operated using the multiplication between template and image, larger number expression
Matching degree is higher, the worst matching effect of 0 mark:
4) standard relevant matches method=CV_TM_CCORR_NORMED
5) correlation coefficient matching method method=CV_TM_CCOEFF, masterplate is equal to its to the relative value and image of its average
The correlation of value is matched, and 1 represents perfect matching, and -1 represents 6, bad matching, the no any correlation of 0 expression:
Wherein
T ' (x ', y ')=T (x ', y ') -1/ (wh) ∑X ", y "T (x ", y ")
The ∑s of I ' (x+x ', y+y ')=I (x+ χ ', y+y ') -1//(wh)X ", y "I (x+x ", y+y ")
6) canonical correlation coefficient matching method=CV_TM_CCOEFF_NORMED
The present invention compared with prior art, with advantages below and effect:
(1) template matching technique is utilized, it is only necessary to which increasing template and its data just can make the more instrument of system identification
Data.Template matching technique, there is greater advantage on same plane diverse location, the picture recognition of different brightness, more different
Angle template, also can further improve identification accuracy.
(2) image processing techniques is utilized, numeral and the automatic identification of pointer meters, and existing simple pointer or single digital is realized
Compared with table identification, improve operating efficiency.
(3) reading is carried out using image processing techniques, reduces human error, improved reading precision, improve operating efficiency.
(4) threshold value, contour detecting and ROI technologies are utilized, facilitates program to adapt to all kinds of pictures, automatic identification contour area,
Exact localization operation is interval, excludes interference during reading.
(5) increased income function library using OpenCV, can more easily call various API, simplify writing for program.C++
Program write more flexibly, inheritance makes calling program more to stablize.
Brief description of the drawings
Fig. 1 is a kind of flow chart of Instrument image automatic identifying method based on OpenCV of the present invention.
Fig. 2 is a kind of template matches flow chart of Instrument image automatic identifying method based on OpenCV of the present invention.
Embodiment
Below in conjunction with the accompanying drawings and the present invention is described in further detail by embodiment, following examples are to this hair
Bright explanation and the invention is not limited in following examples.
As illustrated, a kind of Instrument image automatic identifying method based on OpenCV of the present invention, it is characterised in that include
Following steps:
Step one:The Instrument image of camera collection is read, template matches are carried out, by known template and existing image
Carry out template matches, each pixel of input picture is compared with template, and for each pixel calculate one be worth, record its with
The relatively rear similarity degree of template, selects the point closest to template, and chooses template associative mode, carries out next step identification;
Template matches, will specifically, matchTemplate functions in the imgproc function libraries provided using OpenCV
Input picture is matched with template image, for one value of each pixel correspondence in image, shows itself and template image
Similarity, similarity highest point is preserved with array matchPoint [], respectively with matchTemplate functions six kinds
With pattern match, six numerical value in array matchPoint [] are compared, more than three put it is identical, it is determined that be same quasi-instrument,
Into next recognition mode.
Matching template, according to the different angles of different demands selection, the picture of brightness, accurately selects correspondence instrument;It is same
Instrument, is matched with multiple template.Single template matches, can be in same plane, rate that different brightness improve that the match is successful, many-one,
Increase the picture of different angles, multi-angle matching accuracy can be improved.
Step 2:Instrumented data is read, simple image procossing is carried out to image, respective reading passage is subsequently entered and carries out
Recognition of Reading, finally shows reading.
Simple image procossing includes filtering, threshold operation, contour detecting and acquisition ROI operations.Obtain ROI operations, root
According to the optimal region of the stencil-chosen of template matches, ROI region is chosen as the research object of identification.
Gaussian filtering is used to eliminate Gaussian noise in OpenCV, is linear smoothing filtering, is image to be weighted averagely
Process.One-dimensional Gaussian function formula is as follows:
Two-dimensional Gaussian function formula is as follows:
Function declaration is as follows:
C++:void GaussianBlur(InputArray src,OutputArray dst,Size ksize,
Double sigmaX, double sigmaY=0, int borderType=BORDER_DEFAULT);
Above parameter is respectively, input picture, output image, Gaussian kernel size, X-direction standard deviation, Y-direction standard
Difference, boundary scheme.
Adaptive threshold handling function in specific OpenCV, function declaration is as follows:
C++:void adaptiveThreshold(InputArray src,OutputArray dst,double
maxValue,int adaptiveMethod,int thresholdType,int blockSize,double C);
Above parameter is respectively input picture, and output image uses CV_THRESH_BINARY and CV_THRESH_
BINARY_INV maximum, algorithms selection CV_ADAPTIVE_THRESH_MEAN_C or CV_ADAPTIVE_THRESH_
GAUSSIAN_C), threshold type (CV_THRESH_BINARY or CV_THRESH_BINARY_INV), the field size of pixel,
Value is 3,5,7 etc., and last is the constant after plus-minus power.Adaptively operation is the amendment to threshold operation therewith.
Specifically, the contour detecting and profile drafting function in OpenCV are supported the use, function declaration is as follows:
C++:void findContours(InputArray image,OutputAarrayOfArrays contours,
OutputArray hierarchy, int mode, int method, Point offset=Point ());
Above parameter is respectively, input picture, the profile of output, output vector, profile search modes (4 kinds), and profile is near
Like method (3 kinds), the optional offset of profile point (acquiescence).
C++:void drawContours(InputArray image,InputArrayOfArrays contours,
Int contourIdx, const Scalar&color, int thickness=1, int lineType=8, InputArray
Hierarchy=noArray (), int maxLevel=INT_MAX, Point offset=Point ());
Above parameter point is than being, it is necessary to which the image drawn, inputs profile, indicator variable (being negative, draw all profiles), wheel
Wide color, lines of outline thickness, the line style of type, hierarchy information, the greatest level of profile, offset parameter.
Edge indicator function in specific OpenCV, Canny function principles are as follows:
Formula used in convolution:
Its x to, y to first-order partial derivative matrix, the mathematic(al) representation of gradient magnitude and gradient direction is:
P [i, j]=(f [i, j+1]-f [i, j]+f [i+1, j+1]-f [i+1, j])/2Q [i, j]=(f [i, j]-f [i+1,
J]+f [i, j+1]-f [i+1, j+1])/2
θ [i, j]=arctan (Q [i, j]/p [i, j])
Function declaration is as follows:
C++:Void Canny (InputArray image, OutputArray edges, double threshold1,
Double threshold2, int apertureSize=3, bool L2gradient=false):
Above parameter is respectively input picture, output image, hysteresis threshold 1, hysteresis threshold 2, Sobel operators aperture
Size, calculates the mark of image gradient amplitude.
Respective reading passage includes digital instrument and pointer meters, and instrument automatic identification process is that image filtering utilizes oneself
Adaptive threshold operation and contour detecting, obtain suitable frame, further determine that meter location, further exclude external interference, then
Then line pointer or digital instrument operation are entered.
Digital instrument identification is identified result, and return comprising being contrasted using the difference binary map of digital instrument image
Numerical value;The pointer meters identification, comprising the deflection angle and range using pointer meters image cursor and zero point, wherein utilizing
Hough transform algorithm calculates deflection angle, and range is given data, finally gives recognition result, and return to numerical value.Digital instrument is known
Not, pointer meters are recognized.Once-through operation recognizes a kind of instrument, and multi-pass operation can enter numeral or the respective identification of pointer meters
Operation.According to required picture, automatic discrimination numeral or pointer image, and the numerical value after being quickly identified, show recognition result.
Six kinds of match pattern matching algorithms are included,
1) difference of two squares matching method=CV_TM_SQDIFF, is matched using the difference of two squares, and preferably matching is 0,
With poorer, matching value is bigger:
2) standard deviation matching method=CV_TM_SQDIFF_NORMED
3) relevant matches method=CV_TM_CCORR, is operated using the multiplication between template and image, larger number expression
Matching degree is higher, the worst matching effect of 0 mark:
4) standard relevant matches method=CV_TM_CCORR_NORMED
T ' (x ', y ')=T (x ', y ') -1/ (wh) ∑X ", y "T (x ", y ")
I ' (x+x ', y+y ')=I (x+x ', y+y ') -1/ (wh) ∑X ", y "I (x+x ", y+y ")
5) correlation coefficient matching method method=CV_TM_CCOEFF, masterplate is equal to its to the relative value and image of its average
The correlation of value is matched, and 1 represents perfect matching, and -1 represents 6, bad matching, the no any correlation of 0 expression:
Wherein
T ' (x ', y ')=T (x ', y ') -1/ (wh) ∑X ", y "T (x ", y ")
I ' (x+x ', y+y ')=I (x+x ', y+y ') -1/ (wh) ∑X ", y "I (x+x ", y+y ")
6) canonical correlation coefficient matching method=CV_TM_CCOEFF_NORMED
Function declaration is as follows:
C++:Void matchTemplate (const CvArr*image, const CvArr*templ, CvArr*
Result, int method);
Above parameter is respectively that image to be searched, search pattern, comparative result obtains mapping graph, matching algorithm selection.
Above content described in this specification is only illustration made for the present invention.Technology belonging to of the invention
The technical staff in field can be made various modifications or supplement to described specific embodiment or be substituted using similar mode, only
Will without departing from description of the invention content or surmount scope defined in the claims, all should belong to the present invention guarantor
Protect scope.
Claims (8)
1. a kind of Instrument image automatic identifying method based on OpenCV, it is characterised in that comprise the steps of:
Step one:The Instrument image of camera collection is read, template matches are carried out, known template and existing image are carried out
Template matches, each pixel of input picture is compared with template, and calculates a value for each pixel, records itself and template
Compare rear similarity degree, select the point closest to template, and choose template associative mode, carry out next step identification;
Step 2:Instrumented data is read, simple image procossing is carried out to image, respective reading passage is subsequently entered and carries out reading
Identification, finally shows reading.
2. according to the Instrument image automatic identifying method based on OpenCV described in claim 1, it is characterised in that:The step
Template matches in one are specifically, matchTemplate functions in the imgproc function libraries provided using OpenCV, will be inputted
Image is matched with template image, for one value of each pixel correspondence in image, shows its phase with template image
Like spending, similarity highest point is preserved with array matchPoint [], respectively with six kinds of matching moulds of matchTemplate functions
Formula is matched, and six numerical value in array matchPoint [] are compared, more than three put it is identical, it is determined that be same quasi-instrument, entrance
Next recognition mode.
3. according to the Instrument image automatic identifying method based on OpenCV described in claim 1, it is characterised in that:The matching
Template, according to the different angles of different demands selection, the picture of brightness, accurately selects correspondence instrument;Same instrument, uses multiple moulds
Plate is matched.
4. according to the Instrument image automatic identifying method based on OpenCV described in claim 1, it is characterised in that:The step
Simple image procossing includes filtering, threshold operation, contour detecting and acquisition ROI operations in two.
5. according to the Instrument image automatic identifying method based on OpenCV described in claim 4, it is characterised in that:It is described to obtain
ROI is operated, according to the optimal region of the stencil-chosen of template matches, chooses ROI region as the research object of identification.
6. according to the Instrument image automatic identifying method based on OpenCV described in claim 1, it is characterised in that:The step
Respective reading passage includes digital instrument and pointer meters in two, and instrument automatic identification process is, image filtering, using self adaptive
Threshold operation and contour detecting, obtain suitable frame, further determine that meter location, further exclude external interference, followed by
Enter line pointer or digital instrument operation.
7. according to the Instrument image automatic identifying method based on OpenCV described in claim 6, it is characterised in that:The numeral
Meter recognition is included to be contrasted using the difference binary map of digital instrument image, is identified result, and return to numerical value;The pointer
Meter recognition, comprising the deflection angle and range using pointer meters image cursor and zero point, wherein utilizing Hough transform algorithm
Deflection angle is calculated, range is given data, finally gives recognition result, and return to numerical value.
8. according to the Instrument image automatic identifying method based on OpenCV described in claim 2, it is characterised in that:Described six kinds
Match pattern matching algorithm is included,
1) difference of two squares matching method=CV_TM_SQDIFF, is matched using the difference of two squares, and preferably matching is 0, and matching is got over
Difference, matching value is bigger:
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<munder>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</munder>
<msup>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>-</mo>
<mi>I</mi>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mrow>
2) standard deviation matching method=CV_TM_SQDIFF_NORMED
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mfrac>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<msup>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>-</mo>
<mi>I</mi>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mrow>
<msqrt>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>T</mi>
<msup>
<mrow>
<mo>(</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>&CenterDot;</mo>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>I</mi>
<msup>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mrow>
</msqrt>
</mfrac>
</mrow>
3) relevant matches method=CV_TM_CCORR, is operated using the multiplication between template and image, and larger number represents matching
Degree is higher, the worst matching effect of 0 mark:
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<munder>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</munder>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>&CenterDot;</mo>
<mi>I</mi>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
</mrow>
4) standard relevant matches method=CV_TM_CCORR_NORMED
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mfrac>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>&CenterDot;</mo>
<msup>
<mi>I</mi>
<mo>&prime;</mo>
</msup>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
</mrow>
<msqrt>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>T</mi>
<msup>
<mrow>
<mo>(</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>&CenterDot;</mo>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>I</mi>
<msup>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mrow>
</msqrt>
</mfrac>
</mrow>
5) correlation coefficient matching method method=CV_TM_CCOEFF, by masterplate to the relative value and image of its average to its average
Correlation is matched, and 1 represents perfect matching, and -1 represents 6, bad matching, the no any correlation of 0 expression:
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<munder>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</munder>
<mrow>
<mo>(</mo>
<msup>
<mi>T</mi>
<mo>&prime;</mo>
</msup>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>&CenterDot;</mo>
<mi>I</mi>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
</mrow>
Wherein
T ' (x ', y ')=T (x ', y ') -1/ (wh) ∑X ", y "T (x ", y ")
I ' (x+x ', y+y ')=I (x+x ', y+y ') -1/ (wh) ∑X ", y "I (x+x ", y+y ")
6) canonical correlation coefficient matching method=CV_TM_CCOEFF_NORMED
<mrow>
<mi>R</mi>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>,</mo>
<mi>y</mi>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mfrac>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mo>(</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>&CenterDot;</mo>
<mi>I</mi>
<mo>(</mo>
<mrow>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
<mo>)</mo>
<mo>)</mo>
</mrow>
</mrow>
<msqrt>
<mrow>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>T</mi>
<msup>
<mrow>
<mo>(</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
<mo>&CenterDot;</mo>
<msub>
<mo>&Sigma;</mo>
<mrow>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
</mrow>
</msub>
<mi>I</mi>
<msup>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>+</mo>
<msup>
<mi>x</mi>
<mo>&prime;</mo>
</msup>
<mo>,</mo>
<mi>y</mi>
<mo>+</mo>
<msup>
<mi>y</mi>
<mo>&prime;</mo>
</msup>
<mo>)</mo>
</mrow>
<mn>2</mn>
</msup>
</mrow>
</msqrt>
</mfrac>
<mo>.</mo>
</mrow>
2
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710450877.4A CN107153848A (en) | 2017-06-15 | 2017-06-15 | Instrument image automatic identifying method based on OpenCV |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710450877.4A CN107153848A (en) | 2017-06-15 | 2017-06-15 | Instrument image automatic identifying method based on OpenCV |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107153848A true CN107153848A (en) | 2017-09-12 |
Family
ID=59796450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710450877.4A Pending CN107153848A (en) | 2017-06-15 | 2017-06-15 | Instrument image automatic identifying method based on OpenCV |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107153848A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108335296A (en) * | 2018-02-28 | 2018-07-27 | 中际山河科技有限责任公司 | A kind of pole plate identification device and method |
CN108345889A (en) * | 2018-02-27 | 2018-07-31 | 国网上海市电力公司 | A kind of application process carrying out registration identification to communication cabinet using Raspberry Pi |
CN108898187A (en) * | 2018-07-03 | 2018-11-27 | 国网福建晋江市供电有限公司 | A kind of method and device of automatic identification power distribution room indicating equipment image |
CN109409395A (en) * | 2018-07-29 | 2019-03-01 | 国网上海市电力公司 | Using the method for template matching method identification target object region electrical symbol in power monitoring |
CN109766809A (en) * | 2018-12-29 | 2019-05-17 | 山东财经大学 | A kind of improved human eye detection and tracking |
CN111028227A (en) * | 2019-12-17 | 2020-04-17 | 江西洪都航空工业集团有限责任公司 | Quick alignment method for numerical control machine tool |
CN111121637A (en) * | 2019-11-19 | 2020-05-08 | 广东工业大学 | Grating displacement detection method based on pixel coding |
CN111193860A (en) * | 2019-09-09 | 2020-05-22 | 浙江国自机器人技术有限公司 | One-frame calibration method for working point positions of inspection robot |
CN111260561A (en) * | 2020-02-18 | 2020-06-09 | 中国科学院光电技术研究所 | Rapid multi-graph splicing method for mask defect detection |
CN111862041A (en) * | 2020-07-21 | 2020-10-30 | 华夏天信(北京)智能低碳技术研究院有限公司 | Bottom shaft tail rope fracture detection method based on template matching |
CN112967258A (en) * | 2021-03-15 | 2021-06-15 | 歌尔科技有限公司 | Display defect detection method and device for watch and computer readable storage medium |
CN113609894A (en) * | 2021-06-21 | 2021-11-05 | 南京北新智能科技有限公司 | Intelligent meter reading algorithm based on neural network |
CN114047471A (en) * | 2021-11-02 | 2022-02-15 | 中国南方电网有限责任公司超高压输电公司贵阳局 | Electric energy meter calibration method and device, electronic equipment and storage medium |
CN115297253A (en) * | 2022-06-24 | 2022-11-04 | 浙江欣奕华智能科技有限公司 | Image acquisition and display method and device and computer equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103528617A (en) * | 2013-09-27 | 2014-01-22 | 中国人民解放军空军工程大学 | Cockpit instrument automatic recognizing and detecting method and device |
CN104331697A (en) * | 2014-11-17 | 2015-02-04 | 山东大学 | Method for positioning region of interest |
US20160179086A1 (en) * | 2011-12-21 | 2016-06-23 | Deka Products Limited Partnership | System, method, and apparatus for monitoring, regulating, or controlling fluid flow |
-
2017
- 2017-06-15 CN CN201710450877.4A patent/CN107153848A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160179086A1 (en) * | 2011-12-21 | 2016-06-23 | Deka Products Limited Partnership | System, method, and apparatus for monitoring, regulating, or controlling fluid flow |
CN103528617A (en) * | 2013-09-27 | 2014-01-22 | 中国人民解放军空军工程大学 | Cockpit instrument automatic recognizing and detecting method and device |
CN104331697A (en) * | 2014-11-17 | 2015-02-04 | 山东大学 | Method for positioning region of interest |
Non-Patent Citations (2)
Title |
---|
于向阳: "机器视觉在仪表监控识别系统中的应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
杨浩: "基于机器视觉的开关总成防错漏装系统设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108345889A (en) * | 2018-02-27 | 2018-07-31 | 国网上海市电力公司 | A kind of application process carrying out registration identification to communication cabinet using Raspberry Pi |
CN108345889B (en) * | 2018-02-27 | 2022-02-11 | 国网上海市电力公司 | Application method for performing reading identification on communication cabinet by utilizing raspberry party |
CN108335296B (en) * | 2018-02-28 | 2021-10-01 | 中际山河科技有限责任公司 | Polar plate identification device and method |
CN108335296A (en) * | 2018-02-28 | 2018-07-27 | 中际山河科技有限责任公司 | A kind of pole plate identification device and method |
CN108898187A (en) * | 2018-07-03 | 2018-11-27 | 国网福建晋江市供电有限公司 | A kind of method and device of automatic identification power distribution room indicating equipment image |
CN109409395A (en) * | 2018-07-29 | 2019-03-01 | 国网上海市电力公司 | Using the method for template matching method identification target object region electrical symbol in power monitoring |
CN109766809A (en) * | 2018-12-29 | 2019-05-17 | 山东财经大学 | A kind of improved human eye detection and tracking |
CN111193860A (en) * | 2019-09-09 | 2020-05-22 | 浙江国自机器人技术有限公司 | One-frame calibration method for working point positions of inspection robot |
CN111193860B (en) * | 2019-09-09 | 2021-05-11 | 浙江国自机器人技术有限公司 | One-frame calibration method for working point positions of inspection robot |
CN111121637A (en) * | 2019-11-19 | 2020-05-08 | 广东工业大学 | Grating displacement detection method based on pixel coding |
CN111028227A (en) * | 2019-12-17 | 2020-04-17 | 江西洪都航空工业集团有限责任公司 | Quick alignment method for numerical control machine tool |
CN111260561A (en) * | 2020-02-18 | 2020-06-09 | 中国科学院光电技术研究所 | Rapid multi-graph splicing method for mask defect detection |
CN111862041A (en) * | 2020-07-21 | 2020-10-30 | 华夏天信(北京)智能低碳技术研究院有限公司 | Bottom shaft tail rope fracture detection method based on template matching |
CN112967258A (en) * | 2021-03-15 | 2021-06-15 | 歌尔科技有限公司 | Display defect detection method and device for watch and computer readable storage medium |
CN112967258B (en) * | 2021-03-15 | 2023-01-24 | 歌尔科技有限公司 | Display defect detection method and device for watch and computer readable storage medium |
CN113609894A (en) * | 2021-06-21 | 2021-11-05 | 南京北新智能科技有限公司 | Intelligent meter reading algorithm based on neural network |
CN114047471A (en) * | 2021-11-02 | 2022-02-15 | 中国南方电网有限责任公司超高压输电公司贵阳局 | Electric energy meter calibration method and device, electronic equipment and storage medium |
CN115297253A (en) * | 2022-06-24 | 2022-11-04 | 浙江欣奕华智能科技有限公司 | Image acquisition and display method and device and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107153848A (en) | Instrument image automatic identifying method based on OpenCV | |
CN106529559A (en) | Pointer-type circular multi-dashboard real-time reading identification method | |
CN109948469A (en) | The automatic detection recognition method of crusing robot instrument based on deep learning | |
CN103034838B (en) | A kind of special vehicle instrument type identification based on characteristics of image and scaling method | |
Valliammal et al. | Plant leaf segmentation using non linear K means clustering | |
CN107229930A (en) | A kind of pointer instrument numerical value intelligent identification Method and device | |
CN107292869B (en) | Image speckle detection method based on anisotropic Gaussian kernel and gradient search | |
CN106446952A (en) | Method and apparatus for recognizing score image | |
CN106548176B (en) | Finger vein image enhancement method based on self-adaptive guide filtering | |
Esteves et al. | Gradient convergence filters and a phase congruency approach for in vivo cell nuclei detection | |
EP0129452A2 (en) | Scale-space filtering | |
Thilagavathi et al. | Application of image processing in diagnosing guava leaf diseases | |
Kumar et al. | Leaf classification based on shape and edge feature with k-NN classifier | |
Oliveira et al. | Simultaneous detection of prominent points on breast cancer conservative treatment images | |
Zeng et al. | Algorithm based on marker-controlled watershed transform for overlapping plant fruit segmentation | |
CN113705564B (en) | Pointer type instrument identification reading method | |
Sibi Chakkaravarthy et al. | Automatic leaf vein feature extraction for first degree veins | |
CN110021019A (en) | A kind of thickness distributional analysis method of the AI auxiliary hair of AGA clinical image | |
Khamael et al. | Using adapted JSEG algorithm with fuzzy C mean for segmentation and counting of white blood cell and nucleus images | |
Chhabra et al. | Automated detection of fully and partially riped mango by machine vision | |
Honi et al. | Towards fast edge detection approach for industrial products | |
CN104268502A (en) | Recognition method for human body after vein image feature extraction | |
CN115511928A (en) | Matching method of multispectral image | |
Khan et al. | Segmentation of single and overlapping leaves by extracting appropriate contours | |
CN114821187A (en) | Image anomaly detection and positioning method and system based on discriminant learning |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170912 |