A kind of pressing plate state identification method based on improvement color identification technology
Technical field
The present invention relates to a kind of pressing plate state identification methods, and in particular to a kind of based on the pressing plate for improving color identification technology
State identification method.
Background technique
Currently, mainly using manual type realize substation relay protection device and automatic device output clamping throwing move back with
Confirmation.It is only capable of by reinforcing rules and regulations, the method for improving peopleware realizes the off-line type management of protection pressing plate.Due to artificial
There is factor uncontrollability therefore to reduce the influence of human factor, accurate to obtain protection pressing plate state, it is ensured that protection pressing plate letter
Properly and securely becoming for breath realizes pressing plate intelligent management firstly the need of the problem of solution.
Existing pressing plate condition intelligent detection scheme is divided into two major classes:
(1) based on the detection method of electrical quantity.Such as by detecting the contacts status of weight motor type relay, by weight motor type relay
Normally opened contact string people's clamping circuit, with RTU detect weight motor type relay contact folding condition, reach remote control pressing plate throwing move back and
Detection pressing plate throws the purpose for state of moving back.This method aims to solve the problem that the throwing of distant place pressing plate is moved back, and solves this mode lower platen indirectly
The detection for state of moving back is thrown, there are the incomplete disadvantage of at high cost and function (can not judge whether pressing plate is exiting position).
(2) based on the principle of Non-Electricity Measurement, such as electromagnetic induction technology and optoelectronic induction technology.It is contacted using non electrical quantity
Technology by pressing plate is thrown move back operation when internal mechanical part displacement be converted into corresponding electric quantity signal, by electric quantity signal come
Judge that the throwing of pressing plate is given up the throne to set.This method has the advantages that principle is simple, high reliablity.
First kind method needs to carry out intellectualized reconstruction for former route, and purport is that the throwing of pressing plate is solved in a manner of telemechanical
It moves back, solves the detection of pressing plate state indirectly, at high cost and function is not perfect (can not judge whether pressing plate is exiting position).The
The displacement of pressing plate mechanical part is converted into corresponding electric quantity signal by two class methods, judges that the throwing of pressing plate is moved back by electric quantity signal
Position.The method will carry out a large amount of retrofit work to the pressing plate on former protection screen, increase the complexity of secondary circuit.This
Outside, with the intensive process of protection pressing plate, separated structure has gradually become the mainstream structure of pressing plate, is used for wire spring type pressure
The electromagnetic induction method and optoelectronic induction method of board status monitoring have not been suitable for this structure.The above two classes method uses logical
News mode is single, it is difficult to which the cross-platform sharing and application for realizing data information are unfavorable for the intelligence of electric system maintenance work.
Image recognition method realizes that pressing plate state identification is another important component of Non-Electricity Measurement scheme, passes through figure
As acquisition equipment acquisition pressing plate image, image information is uploaded to image processing system.System will be upper by image recognition technology
The state prestored in the image of biography and database is compared, and realizes that pressing plate throws the detection for state of moving back.Currently, discrete pressing plate exists
Apparent discontinuous point is easily embodied in structure, used reference colour has become the standard carried out in system in appearance.These are special
Point objectively for using image recognition technology identification pressing plate state provide advantage.
Currently, application of the pressing plate state identification based on image recognition technology in intelligent O&M is in initial phase.
The existing pressing plate state identification method based on image recognition technology is by fixed video acquisition and processing hardware device and right
Answer discrimination method software.
The hardware composition of system includes: computer, video camera, monitor, image pick-up card.Wherein, video camera is for real
When shoot pressing plate screen, acquire pressing plate screen image data information.Monitor is for monitoring whether image to be captured meets system
It is required that.Image pick-up card is inserted in host empty slot, and the image real-time display that video camera is shot is convenient for operator on a monitor
Member's adjustment imaging definition, and host command can be responded, capture taken the photograph image in real time and save image data.It is equipped with exploitation
The computer of software is the core of image identification system, and the pressing plate screen image data acquired in real time are quickly handled and known
Not, and immediately it is notified to recognition result to site operation personnel.
Discrimination method software section: main algorithm is chosen using gray threshold, the binaryzation of image, judges identification step.
Discrimination method, which is mainly comprised the following steps, is converted to binary map for the gray level image under threshold range, is changed by graph position in binary map
Judge pressing plate state.
Existing program hardware investment is at high cost, and all uses fixed apparatus, cannot achieve intelligent inspection.Software algorithm
Part, gray level image are influenced bigger by light, intensive improved pressing plate colouring information are lost, after not being suitable for transformation
Pressing plate form, and identification result can not realize data sharing in operation platform.Therefore conventional method does not have versatility.
Summary of the invention
It is distinguished in order to solve the above-mentioned technical problems, the present invention provides a kind of based on the pressing plate state for improving color identification technology
Knowledge method.
In order to achieve the above object, the technical scheme adopted by the invention is that:
It is a kind of to be included the following steps based on the pressing plate state identification method for improving color identification technology,
Step 1, pressing plate image is acquired;
Step 2, press plate position positions;
From pressing plate image apex to concentric region search, search occurs the regional location of pressing plate color first, determines pressing plate
The initial position of place image-region;
Step 3, pressing plate image standardization;
The spatial alternation that pressing plate image is carried out using affine transformation method, obtains standardized pressing plate image;
Step 4, pressing plate arrangement segmentation;
According to pressing plate line information, image-region is split and is arranged, surrounds segmentation with the rectangle frame of fixed size
Region afterwards;The pressing plate line information is that operations staff is given or scanning electron nameplate obtains;
Step 5, color card file is read, carries out sample of color matching treatment to the close region of sample of color,
Corresponding color is worth matched regioinvertions into white in yuv space, generates the corresponding binary map of pressing plate image;
Step 6, binary map opening and closing operation;
By the way that operation is opened and closed to binary map, calculating, filling or elimination are expanded and corroded to pixel in image
The region of small Mr. Yu's class threshold value A 1 eliminates the fragment due to generating after color-match binaryzation, obtains the binary map of enhancing;
Step 7, image block and state identification;
The every piece of region obtained to segmentation individually carries out condition discrimination, is gone out in binary map using small top heap algorithm permutation calculation
The smallest N number of point of non-zero points y-coordinate, then the x coordinate average value of N number of point is calculated, it obtains switch in image and is vertically connected with a little
Position;
Judge whether switch is connected to by the way that whether color-identifying tie point centre corresponding color occurs, completes pressing plate shape
State identification;
If there is the case where many places same color in platen region, using boundary rectangle mode by image in platen region
Binary map piecemeal judges piecemeal number, recognizes pressing plate state;
Step 8, identification result exports.
The pressing plate state identification method carries out in mobile unit.
Affine transformation matrix is,
Wherein, (x ', y ') is the pixel coordinate value of preset standard image, and (x, y) is the pixel coordinate value of pressing plate image,
a11、a12、a21、a22、b1、b2For related coefficient needed for affine transformation matrix.
If pressing plate pedestal is non-targeted color, endpoint above and below positioning pressuring plate, taking upper and lower side dot center region is identification region, is sentenced
Whether bianry image vegetarian refreshments number is greater than certain threshold value A 2 in disconnected identification region, if more than then judging to be connected to, otherwise disconnect;
If pressing plate pedestal is aim colour, the region for taking segmentation to obtain is identification region, endpoint up and down in fixation and recognition region,
Color lump is surrounded with quadrangle, judges color lump number, if color lump number is greater than a certain threshold value A 3 or the big Mr. Yu's threshold value A 4 of color block areas,
Then judge to disconnect, is otherwise connection.
Identification result is that ranks and pressing plate arrange identical matrix, matrix element 1,2,0;Wherein, it 1 indicates at the pressing plate
Indicate that the pressing plate is in stand-by state in the state of putting into operation, 2,0 indicates that the pressing plate disconnects.
Advantageous effects of the invention: 1, the present invention is based on improve color identification method state identification algorithm, should
Core algorithm is matched using color card, binary conversion treatment, morphological analysis correlation technique, and synthesis obtains pressing plate working condition,
Precision is high, strong antijamming capability, is suitable for several scenes;2, the present invention is carrying out image acquisition using mobile unit, uses
Local computing and recognition methods carry out image procossing and state identification, have realize easy, operation is fast, data can cross-platform sharing
The characteristics of, upgrading matching is simple, and upgrade job is high-efficient.
Detailed description of the invention
Fig. 1 is flow chart of the invention.
Specific embodiment
The invention will be further described below in conjunction with the accompanying drawings.Following embodiment is only used for clearly illustrating the present invention
Technical solution, and not intended to limit the protection scope of the present invention.
As shown in Figure 1, it is a kind of based on the pressing plate state identification method for improving color identification technology, it mainly include pressing plate image
Acquisition and data processing, carry out pressing plate Image Acquisition using mobile unit, carry out data using the software in mobile unit
Processing, i.e., pressing plate state identification method carries out in mobile unit, independently of Operation of Electric Systems outside, realize easy, operation
Fastly, data can cross-platform sharing the characteristics of, upgrading matching is simple, and upgrade job is high-efficient.
Specific step is as follows:
Step 1, pressing plate image is acquired.
Step 2, press plate position positions.
From pressing plate image apex to concentric region search, search occurs the regional location of pressing plate color first, determines pressing plate
The initial position of place image-region.
Step 3, pressing plate image standardization.
The spatial alternation that pressing plate image is carried out using affine transformation method, obtains standardized pressing plate image.
Affine transformation matrix is,
Wherein, (x ', y ') is the pixel coordinate value of preset standard image, and (x, y) is the pixel coordinate value of pressing plate image,
a11、a12、a21、a22、b1、b2For related coefficient needed for affine transformation matrix.
Step 4, pressing plate arrangement segmentation.
According to pressing plate line information, image-region is split and is arranged, surrounds segmentation with the rectangle frame of fixed size
Region afterwards;Pressing plate line information is that operations staff is given or scanning electron nameplate obtains.
Step 5, color card file is read, to the region (region in step 4 divided) close with sample of color
Sample of color matching treatment is carried out, corresponding color is worth matched regioinvertions into white in yuv space, generates pressing plate image
Corresponding binary map.
Step 6, binary map opening and closing operation.
By the way that operation is opened and closed to binary map, calculating, filling or elimination are expanded and corroded to pixel in image
The region of small Mr. Yu's class threshold value A 1 eliminates the fragment due to generating after color-match binaryzation, obtains the binary map of enhancing.
Step 7, image block and state identification.
The every piece of region obtained to segmentation individually carries out condition discrimination, is gone out in binary map using small top heap algorithm permutation calculation
The smallest N number of point of non-zero points y-coordinate, then the x coordinate average value of N number of point is calculated, it obtains switch in image and is vertically connected with a little
Position.
Judge whether switch is connected to by the way that whether color-identifying tie point centre corresponding color occurs, completes pressing plate shape
State identification;If there is the case where many places same color in platen region, using boundary rectangle mode by image in platen region
Binary map piecemeal judges piecemeal number, recognizes pressing plate state.
If pressing plate pedestal is non-targeted color, endpoint above and below positioning pressuring plate, taking upper and lower side dot center region is identification region, is sentenced
Whether bianry image vegetarian refreshments number is greater than certain threshold value A 2 in disconnected identification region, if more than then judging to be connected to, otherwise disconnect;If
Pressing plate pedestal is aim colour, and the region for taking segmentation to obtain is identification region, upper and lower endpoint in fixation and recognition region, with quadrangle packet
Color lump is enclosed, judges color lump number, if color lump number is greater than a certain threshold value A 3 or the big Mr. Yu's threshold value A 4 of color block areas, judgement is disconnected
It opens, is otherwise connection.
Step 8, identification result exports.
Identification result is that ranks and pressing plate arrange identical matrix, matrix element 1,2,0;Wherein, it 1 indicates at the pressing plate
Indicate that the pressing plate is in stand-by state in the state of putting into operation, 2,0 indicates that the pressing plate disconnects.As a result it is uploaded to the format of text file
Database is stored in local.
The above method uses color card based on the state identification algorithm for improving color identification method, the core algorithm
Match, binary conversion treatment, morphological analysis correlation technique, comprehensive to obtain pressing plate working condition, precision is high, strong antijamming capability, fits
For several scenes.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations
Also it should be regarded as protection scope of the present invention.