A kind of based on the pressing plate state identification method improving colour recognition technology
Technical field
The present invention relates to a kind of pressing plate state identification method, be specifically related to a kind of based on the pressing plate improving colour recognition technology
State identification method.
Background technology
At present, the main throwing using manual type to realize substation relay protection device and automaton output clamping move back with
Confirm.Being only capable of by reinforcing rules and regulations, the method improving peopleware realizes the off-line type management of protection pressing plate.Due to artificially
Factor has uncontrollability, therefore, reduces the impact of anthropic factor, accurately obtains protection pressing plate state, it is ensured that protection pressing plate letter
Properly and securely becoming of breath realizes pressing plate intelligent management firstly the need of the difficult problem solved.
Existing pressing plate condition intelligent detection scheme is divided into two big classes:
(1) detection method based on electric parameters.As weighed the contacts status of motor type relay by detection, by weight motor type relay
Normally opened contact string people's clamping circuit, with RTU detection weight motor type relay contact folding condition, reach remote control pressing plate throw move back and
The purpose of state of moving back thrown by detection pressing plate.The method aims to solve the problem that the throwing of distant place pressing plate is moved back, and indirectly solves this mode lower platen
Throw the detection of state of moving back, there is cost height and the incomplete shortcoming of function (cannot judge whether pressing plate is exiting position).
(2) principle based on Non-Electricity Measurement, such as electromagnetic induction technology and optoelectronic induction technology etc..Employing non electrical quantity contacts
Technology just pressing plate is thrown the displacement of internal mechanical part when moving back operation and is converted into the electric quantity signal of correspondence, is sentenced by electric quantity signal
The throwing of disconnected pressing plate is given up the throne and is put.The method has the advantage that principle is simple, reliability is high.
First kind method is required for former circuit and carries out intellectualized reconstruction, and purport is to solve the throwing of pressing plate in telemechanical mode
Move back, indirectly solve the detection of pressing plate state, cost height and function imperfection (cannot judge whether pressing plate is exiting position).The
The displacement of pressing plate mechanical part is converted into the electric quantity signal of correspondence by two class methods, is judged that by electric quantity signal the throwing of pressing plate is moved back
Position.The method to carry out substantial amounts of retrofit work to the pressing plate on former sealer, adds the complexity of secondary circuit.This
Outward, along with the intensive process of protection pressing plate, separated structure the most progressively becomes the main flow structure of pressing plate, for wire spring type pressure
Electromagnetic induction method and the optoelectronic induction method of board status monitoring have not been suitable for this structure.It is logical that above two class methods use
News mode is single, it is difficult to realizes cross-platform sharing and the application of data message, is unfavorable for the intellectuality of power system maintenance work.
Pattern-recognition method realizes another important component part that pressing plate state identification is Non-Electricity Measurement scheme, by figure
As collecting device gathers pressing plate image, image information is uploaded to image processing system.System passes through image recognition technology by upper
The state prestored in the image and the data base that pass compares, it is achieved the detection of state is moved back in pressing plate throwing.At present, discrete pressing plate exists
Obvious discontinuous point, the standard carried out in institute's accepted standard color has become system in appearance is easily embodied in structure.These are special
Point is objectively for using the state of image recognition technology identification pressing plate to provide advantage.
At present, the pressing plate state identification based on image recognition technology application in intelligent O&M is in initial period.
Existing pressing plate state identification method based on image recognition technology by fixed video acquisition with process 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
Time shooting pressing plate screen, gather pressing plate screen image data information.Monitor is for monitoring whether image to be captured meets system
Requirement.Image pick-up card is inserted in main frame dead slot, and the image that video camera shoots is shown people the most convenient to operate in real time
Member is adjusted to image sharpness, and can respond host command, and the taken the photograph image of captured in real time also preserves view data.It is equipped with exploitation
The computer of software is the core of image identification system, and the pressing plate screen image data of Real-time Collection are quickly processed and known
Not, and recognition result is circulated a notice of to site operation personnel immediately.
Discrimination method software section: main algorithm uses gray threshold to choose, the binaryzation of image, judge identification step.
Discrimination method mainly comprises the following steps and the gray level image under threshold range is changed into binary map, is changed by graph position in binary map
Judge pressing plate state.
Existing program hardware investment cost is high, and all uses fixed apparatus, it is impossible to realizes intellectuality and patrols and examines.Software algorithm
Part, gray level image is affected bigger by light, lost intensive improved pressing plate colouring information, after not being suitable for transformation
Pressing plate form, and identification result cannot realize data sharing in operation platform.Therefore traditional method does not have versatility.
Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of pressing plate state based on improvement colour recognition technology and distinguish
Knowledge method.
In order to achieve the above object, the technical solution adopted in the present invention is:
A kind of pressing plate state identification method based on improvement colour recognition technology, comprises the following steps,
Step 1, gathers pressing plate image;
Step 2, press plate position positions;
To concentric region search, search from pressing plate image apex first the regional location of pressing plate color occurs, determines pressing plate
The original position of place image-region;
Step 3, pressing plate image standardization;
Affine transformation method is used to carry out the spatial alternation of pressing plate image, it is thus achieved that standardized pressing plate image;
Step 4, pressing plate arrangement segmentation;
According to pressing plate line information, image-region is split and arrangement, surround segmentation with the rectangle frame of fixed size
After region;Described pressing plate line information is that operations staff is given or scanning electron nameplate obtains;
Step 5, reads color card file, the region close with sample of color is carried out sample of color matching treatment,
The regioinvertions that corresponding color value is mated is become white by yuv space, generates the binary map that pressing plate image is corresponding;
Step 6, binary map opening and closing operation;
By binary map is carried out opening and closing operation, pixel in image expanded and corrodes calculating, filling or eliminate
Less than the region of certain class threshold value, eliminate the fragment owing to producing after color matching binaryzation, it is thus achieved that the binary map of enhancing;
Step 7, image block and state identification;
The every piece of region obtaining segmentation individually carries out condition discrimination, utilizes little top heap algorithm permutation calculation to go out in binary map
N number of point that non-zero points y-coordinate is minimum, then calculate x coordinate meansigma methods, obtain image breaker in middle and be vertically connected with position a little;
Whether occur that corresponding color judges to switch by color-identifying junction point centre whether to connect, complete pressing plate shape
State identification;
The situation of many places same color in if platen region occurs, use boundary rectangle mode by image in platen region
Binary map area dividing comprises, it is judged that piecemeal number, identification pressing plate state;
Step 8, identification result exports.
Described pressing plate state identification method is carried out in mobile unit.
Affine transformation matrix is,
Wherein, (x ', y ') is the pixel coordinate value of preset standard image, (x, y) is the pixel coordinate value of pressing plate image,
a11、a12、a21、a22、b1、b2For correlation coefficient needed for affine transformation matrix.
If pressing plate base is non-targeted color, the upper and lower end points of positioning pressuring plate, taking upper and lower side dot center region is to identify region, sentences
In disconnected identification region, whether bianry image vegetarian refreshments number is more than certain threshold value, if being more than, then judges connection, otherwise disconnects;
If pressing plate base is aim colour, take the region that obtains of segmentation for identifying region, upper and lower end points in fixation and recognition region,
Surround color lump with tetragon, it is judged that color lump number, if color lump number is more than certain threshold value more than a certain threshold value or color block areas, then sentence
Absolutely open, otherwise for connection.
Identification result is the matrix that ranks are identical with pressing plate arrangement, and matrix element is 1,2,0;Wherein, 1 represents at this pressing plate
In the state of putting into operation, 2 represent that this pressing plate is in resting state, and 0 represents that this pressing plate disconnects.
The beneficial effect that the present invention is reached: 1, present invention state identification algorithm based on improvement color identification method, should
Core algorithm uses color card coupling, binary conversion treatment, morphological analysis correlation technique, comprehensively obtains pressing plate duty,
Precision is high, and capacity of resisting disturbance is strong, it is adaptable to several scenes;2, the present invention is using mobile unit to carry out Image Acquisition, uses
Local computing and recognition methods carry out image procossing and state identification, have that realization is easy, computing is fast, data can cross-platform sharing
Feature, upgrading coupling is simple, and upgrade job efficiency is high.
Accompanying drawing explanation
Fig. 1 is the flow chart of the present invention.
Detailed description of the invention
The invention will be further described below in conjunction with the accompanying drawings.Following example are only used for clearly illustrating the present invention
Technical scheme, and can not limit the scope of the invention with this.
As it is shown in figure 1, a kind of pressing plate state identification method based on improvement colour recognition technology, mainly include pressing plate image
Gather and data process, use mobile unit to carry out pressing plate image acquisition, use the software in mobile unit to carry out data
Process, i.e. pressing plate state identification method is carried out in mobile unit, independent of Operation of Electric Systems outside, it is achieved easy, computing
Hurry up, data can the feature of cross-platform sharing, upgrading coupling is simple, and upgrade job efficiency is high.
Specifically comprise the following steps that
Step 1, gathers pressing plate image.
Step 2, press plate position positions.
To concentric region search, search from pressing plate image apex first the regional location of pressing plate color occurs, determines pressing plate
The original position of place image-region.
Step 3, pressing plate image standardization.
Affine transformation method is used to carry out the spatial alternation of pressing plate image, it is thus achieved that standardized pressing plate image.
Affine transformation matrix is,
Wherein, (x ', y ') is the pixel coordinate value of preset standard image, (x, y) is the pixel coordinate value of pressing plate image,
a11、a12、a21、a22、b1、b2For correlation coefficient needed for affine transformation matrix.
Step 4, pressing plate arrangement segmentation.
According to pressing plate line information, image-region is split and arrangement, surround segmentation with the rectangle frame of fixed size
After region;Pressing plate line information is that operations staff is given or scanning electron nameplate obtains.
Step 5, reads color card file, to the region (in step 4 split the region that obtain) close with sample of color
Carry out sample of color matching treatment, in yuv space, the regioinvertions that corresponding color value is mated is become white, generate pressing plate image
Corresponding binary map.
Step 6, binary map opening and closing operation.
By binary map is carried out opening and closing operation, pixel in image expanded and corrodes calculating, filling or eliminate
Less than the region of certain class threshold value, eliminate the fragment owing to producing after color matching binaryzation, it is thus achieved that the binary map of enhancing.
Step 7, image block and state identification.
The every piece of region obtaining segmentation individually carries out condition discrimination, utilizes little top heap algorithm permutation calculation to go out in binary map
N number of point that non-zero points y-coordinate is minimum, then calculate x coordinate meansigma methods, obtain image breaker in middle and be vertically connected with position a little.
Whether occur that corresponding color judges to switch by color-identifying junction point centre whether to connect, complete pressing plate shape
State identification;The situation of many places same color in if platen region occurs, use boundary rectangle mode by image in platen region
Binary map area dividing comprises, it is judged that piecemeal number, identification pressing plate state.
If pressing plate base is non-targeted color, the upper and lower end points of positioning pressuring plate, taking upper and lower side dot center region is to identify region, sentences
In disconnected identification region, whether bianry image vegetarian refreshments number is more than certain threshold value, if being more than, then judges connection, otherwise disconnects;If pressure
Plate base is aim colour, takes the region that obtains of segmentation for identifying region, upper and lower end points in fixation and recognition region, surrounds with tetragon
Color lump, it is judged that color lump number, if color lump number is more than certain threshold value more than a certain threshold value or color block areas, then judges to disconnect, otherwise
For connection.
Step 8, identification result exports.
Identification result is the matrix that ranks are identical with pressing plate arrangement, and matrix element is 1,2,0;Wherein, 1 represents at this pressing plate
In the state of putting into operation, 2 represent that this pressing plate is in resting state, and 0 represents that this pressing plate disconnects.Result uploads to the form of text
Data base or be saved in this locality.
Said method state identification algorithm based on improvement color identification method, this core algorithm uses color card
Joining, binary conversion treatment, morphological analysis correlation technique, comprehensively obtain pressing plate duty, precision is high, and capacity of resisting disturbance is strong, suitable
For several scenes.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For Yuan, on the premise of without departing from the technology of the present invention principle, it is also possible to make some improvement and deformation, these improve and deformation
Also should be regarded as protection scope of the present invention.