A kind of real-time pointer instrument reading method and device based on ARM platforms
Technical field
The present invention relates to Signal and Information Processing technical field, more particularly to a kind of real-time pointer instrument based on ARM platforms
Table reading method and device.
Background technology
Pointer instrument is the important component in modern industry.Because of its high accuracy, high reliability and low cost, obtain
Obtained and be widely applied.At present, the data of instrument, which rely primarily on, is manually distinguished, and low precision, interval time is long, cost is high
It is high.Intelligence instrument reading method can be realized meter reading automatic identification using image analysis algorithm and be transmitted to control centre.
These characteristics based on instrument recognition:It can be that government or enterprise save substantial amounts of labour cost, improve work
Efficiency, reduce entreprise cost.At the same time it can also check meter reading at any time, equipment running status are grasped, pass through long-term data
Collection can also go deep into mining data value.
Therefore, many government departments or enterprise start the intelligence recognition of contact stud instrument now.Current instrument is known
Reading needs to be analyzed the data transfer of pointer meters to control centre mostly, and substantial amounts of view information transmission can cause network
Bandwidth congestion, increase information transfer cost, influence the normal use of instrument recognition system.
To solve above mentioned problem present in existing instrument reading method, invention provides a kind of new, effectively
Solution method.
The content of the invention
In view of the drawbacks described above of prior art, the technical problems to be solved by the invention are to provide one kind and put down based on ARM
The real-time pointer instrument reading method and device of platform, realize that the long-range of instrument registration is read in real time, reduce equipment O&M cost, side
Equipment operation maintenance personnel is helped to understand equipment state at any time.
To achieve the above object, the invention provides a kind of real-time pointer instrument reading method based on ARM platforms, it is special
Sign is, comprises the following steps:
Step 1: the preset dial plate center of circle, scale starting point and the total range information of instrument;
Step 2: dial plate IMAQ, calls image capture device, the picture of collection is transformed into YCbCr color spaces,
Judge whether to need to open LED light supplement lamp by brightness Y compositions, adjust lens focus, gather pointer meters dial plate image;
Step 3: dial plate image preprocessing, using 3 × 3 Gaussian template to image filtering, eliminates partial noise;
Step 4: dial plate image binaryzation, gray-scale map is converted to by coloured image, using maximum variance between clusters by gray scale
Image carries out binarization operation, while is partitioned into pointer area;
Step 5: pointer skeletal extraction, after Euclidean Distance Transform, obtains the pointer after refinement;
Step 6: pointer extracting, line segment is extracted using the method that straight line is extracted based on Hough transform;
Step 7: obtaining total indicator reading, according to the pointer found and the differential seat angle of dial plate original position, current pointer is calculated
Pointed registration.
Further, the step 3 eliminates in partial noise and eliminates influence of noise using 2 Gaussian Blurs.
1st, further,
2nd, in step 5, after Euclidean Distance Transform, it is as follows to obtain the pointer method after refinement:Pass through pixel
The local comparison of 8 field pixel values obtains the pixel vertex type, and thereby determines that the candidate point of skeletal point, according to pixel class
Type, state are that strong point is grown to skeleton;When growth conditions are weak point, all skeletons to be grown out by weak points
Branch touches skeleton edges, then deletes this skeleton branches;Every skeleton branches to grow out perpendicular to generating before
Skeleton, then this skeleton branches is deleted;After obtaining skeletal point by above-mentioned growth regularity, the pointer after refinement is obtained.
Further, the step 6 is specially:Only retain air line distance residing for the center of circle to line segment and be less than 5 pixels
Line segment, more all qualified line segment lengths, it is pointer to choose most long line segment.
Further, the registration pointed by the step 7 calculating current pointer is specially:Judge when time recognition result with
Whether the difference of previous recognition result is more than threshold value, is to give up this result, otherwise exports this recognition result.
A kind of real-time pointer instrument reading device based on ARM platforms, including image capture device, the image being sequentially connected
Processing equipment, data transmission module, remote platform or data collection station, wherein
Image capture device, for gathering pointer meters dial plate image;
Image processing equipment, the pretreatment of its Instrument image recognition service module progress image, image binaryzation, pointer bone
Frame extraction, pointer extracting, angle judges, result is distinguished, and obtains the current registration of instrument;
Data transmission module, for the view data after processing to be transmitted to remote platform or number using Standard general purpose interface
According to acquisition terminal;
Remote platform or data collection station, for the view data after reception processing, do analysis and the profit of later data
With.
Further, when described image processing equipment carries out the pretreatment process of image, 3 × 3 Gaussian template pair is used
Image filtering, partial noise is eliminated, influence of noise is eliminated using 2 Gaussian Blurs.
When described image processing equipment carries out the pointer skeletal extraction flow of image, after Euclidean Distance Transform,
Relatively and the candidate point of skeletal point is quickly determined by local, regrowth obtains skeletal point.
Further, when described image processing equipment carries out the pointer extracting flow of image, carried using based on Hough transform
The method extraction line segment of cut-off line, only retains the line segment that air line distance residing for the center of circle to line segment is less than 5 pixels, relatively more all
Qualified line segment length, it is pointer to choose most long line segment.
Further, when described image processing equipment carries out the result recognition flow of image, according to the pointer and table found
The differential seat angle of disk original position, the registration pointed by current pointer is calculated, judged when time recognition result and previous recognition result
Whether difference is more than threshold value, is to give up this result, otherwise exports this recognition result.
The beneficial effects of the invention are as follows:
The present invention is based on low-power consumption ARM platforms, can improve the O&M efficiency of correlate meter equipment, can be enterprise or political affairs
Mansion department saves fund and manpower.
Design, concrete structure and the caused technique effect of the present invention are described further below with reference to accompanying drawing, with
It is fully understood from the purpose of the present invention, feature and effect.
Brief description of the drawings
Fig. 1 is the structured flowchart of the real-time pointer instrument reading device based on ARM platforms.
Fig. 2 is the flow chart of the real-time pointer instrument reading method based on ARM platforms.
Embodiment
The present invention is described further below in conjunction with the accompanying drawings.To make the purpose of embodiments of the invention, technical scheme
It is clearer with advantage, simplicity of explanation is done to some nouns being related in the embodiment of the present invention below.
ARM (Acorn RISC Machine, reduced instruction set computer microprocessor), it is that Acorn Co., Ltds of Britain design
First item reduced instruction set computer microprocessor, there is small volume, low-power consumption, low cost, high performance feature, in mobile device market
Have a wide range of applications.
As shown in figure 1, the hardware based image collecting device of the system and ARM processing platforms, have set up real-time pointer instrument
Table reading device.
Low power image processing equipment is mainly set including processor cores, audio-video interface, external storage interface, driving
Standby, power supply etc..Image capture device mainly includes camera lens, LED light supplement lamp, driving equipment, head etc..
As shown in figure 1, the collection behaviour of image capture device instruction progress image is pushed to from low power image processing equipment
Make, the image of collection is output to image processing equipment by image capture device.
As shown in figure 1, in image processing equipment, distinguish service using Instrument image and carry out the pretreatment of image, skeleton
The flows such as extraction, pointer demarcation, angle judgement, result recognition obtain the current registration of instrument.
Instrument is distinguished result and is pushed to data transmission module with Instrument image by image processing equipment, then passes through data transfer
Module sends data to remote platform or data collection station using Standard general purpose interface.
The real-time pointer instrument reading method flow of the present invention is as shown in Fig. 2 the dial plate center of circle preset first, scale starting point
With the total range information of instrument, and only need it is preset once.
The collection of Instrument image is carried out using image capture device, in order to ensure that whole day can be adopted normally for 24 hours
Collection, the present apparatus employs the design of LED light supplement lamp, and instrument and the distance of camera lens are about 15cm or so, and frequency acquisition is every 5
1 width picture of second, resolution ratio CIF, form .jpg.
Then, the pretreatment of image is carried out, in the image of collection, the problems such as pollution reflective due to the change of bright and dark light
Light and shade inequality high level noise can be produced, using 3 × 3 Gaussian template to image filtering, elimination portion before entering line pointer and reading
Divide noise, the present apparatus eliminates influence of noise using 2 Gaussian Blurs.Then, testing image is converted into gray scale using formula (1)
Image:
G=0.299R+0.587G+0.114B (1)
After Instrument image is got, in order to be advantageous to follow-up pointer extracting, it is necessary to by background and some light and shade spots
Point is separated, because the general local environment of pointer meters is not very fixed, because the change dial plate gray value of light has change
Change, split and do not had applicability using fixed threshold method, maximum variance between clusters are then used in the present apparatus
Carry out the segmentation of image-region.In the case of generating shade around pointer, maximum variance between clusters remain able to relatively good
Ground Split goes out pointer area.
Because the later gauge pointer of binaryzation has one fixed width, if in this case directly using classical
Hough transform extracts pointer, it may appear that the straight line extracted is not in the feelings of coincidence status with straight line where pointer skeleton
Condition, pointer is first then subjected to refinement in the present apparatus and extracts pointer skeleton, then obtains pointer angle again.The present apparatus uses base
Enter line pointer refinement in the novel framework extraction algorithm of Euclidean Distance Transform.
After Euclidean Distance Transform, relatively and the candidate point of skeletal point is quickly determined by local, regrowth obtains
Skeletal point, it ensure that the connectedness that can keep skeleton while real-time as far as possible.
In terms of pointer is extracted, there is employed herein the method based on Hough transform extraction straight line, classical Hough changes
It is the straight line information that will pass through a bit (x, y) in cartesian coordinate system, is converted to the straight line normal in polar coordinate space
(ρ, θ) information, its formula are:
ρ=xcos θ+ysin θ (2)
Then to doing cumulative mark by the comprehensive straight line of effective pixel points, the information of every line segment is obtained, due to referring to
Straight line where pin, so only retaining the line segment that air line distance residing for the center of circle to line segment is less than 5 pixels, compares institute by the center of circle
There is qualified line segment length, it is pointer to choose most long line segment.
Finally, according to the pointer found and the differential seat angle of dial plate original position, the registration pointed by current pointer is calculated.Sentence
Whether the disconnected difference for working as time recognition result and previous recognition result is more than threshold value, is to give up this result, otherwise exports this
Distinguish result.Then data transmission module will distinguish result and instrument picture passes through Standard general purpose interface and broadband network, 4G-
LTE or WIFI network are transmitted to remote platform or data collection station.The data that equipment operation maintenance personnel is fed back according to instrument judge
Equipment current state, decision support is provided for system regular maintenance.
Preferred embodiment of the invention described in detail above.It should be appreciated that one of ordinary skill in the art without
Creative work can is needed to make many modifications and variations according to the design of the present invention.Therefore, all technologies in the art
Personnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea
Technical scheme, all should be in the protection domain being defined in the patent claims.