Summary of the invention
In order to solve the problem, the invention provides a kind of outdoor electric energy meter damaged degree detection platform, the mode of electronic meter reading is adopted to substitute original manual metering mode, a set of electric energy meter detection platform that utilized high-precision acquisition technology and image processing techniques to build, ensure the high-level efficiency of data acquisition, simultaneously, according to atmospheric attenuation model determination haze to the influence factor of image, and the process of mist elimination haze is carried out to the electric energy meter image gathered under foggy days, obtain electric energy meter image clearly, thus ensure the accuracy that outdoor electric energy meter damaged degree detects.
According to an aspect of the present invention, provide a kind of outdoor electric energy meter damaged degree detection platform, described platform comprises high-definition camera, image processor, static memory and master controller, described high-definition camera is used for taking to obtain electric energy meter image to electric energy meter, described image processor is connected with described high-definition camera, for carrying out image procossing to described electric energy meter image, to extract the bezel, cluster image in described electric energy meter image, described static memory has prestored benchmark electric energy meter block diagram case, described master controller is connected respectively with described image processor and described static memory, based on the matching result of described benchmark electric energy meter block diagram case and described bezel, cluster image, determine the damaged degree of described electric energy meter.
More specifically, in described outdoor electric energy meter damaged degree detection platform, also comprising: GPS locator, for receiving the current GPS location of the electric energy meter of gps satellite feedback, and being connected that described current GPS location is sent to described master controller with described master controller, GPRS communication interface, is connected with described master controller, for the damaged degree of described electric energy meter and described current GPS location are packaged as GPRS data bag, and described GPRS data bag is wirelessly sent to the power supply management platform of far-end, power supply, comprise solar powered device, accumulator, change-over switch and electric pressure converter, described change-over switch is connected respectively with described solar powered device and described accumulator, determine whether be switched to described solar powered device to be powered by described solar powered device according to accumulator dump energy, described electric pressure converter is connected with described change-over switch, with the 5V voltage transitions will inputted by change-over switch for 3.3V voltage, sharpening treatment facility, between described high-definition camera and described image processor, for receiving described electric energy meter image, mist elimination process is carried out to obtain mist elimination electric energy meter image to described electric energy meter image, described mist elimination electric energy meter image is inputted described image processor to replace described electric energy meter image by image procossing to extract the bezel, cluster image in described mist elimination electric energy meter image, described sharpening treatment facility also comprises: store subset, for prestoring sky upper limit gray threshold and sky lower limit gray threshold, described sky upper limit gray threshold and described sky lower limit gray threshold are for separating of the sky areas of publishing picture in picture, also for prestoring presetted pixel value threshold value, described presetted pixel value threshold value value is between 0 to 255, haze Concentration Testing subset, is arranged in air, for detecting the haze concentration of electric energy meter position in real time, and removes intensity according to haze concentration determination haze, and described haze removes intensity value between 0 to 1, Region dividing subset, connect described high-definition camera to receive described electric energy meter image, gray processing process is carried out to obtain gray processing electric energy meter image to described electric energy meter image, also be connected with storage subset, the pixel identification of gray-scale value in described gray processing electric energy meter image between described sky upper limit gray threshold and described sky lower limit gray threshold is formed gray processing sky sub pattern, described gray processing sky sub pattern is gone out to obtain the non-sky subimage of gray processing from described gray processing electric energy meter Iamge Segmentation, the colour non-sky subimage corresponding with described gray processing non-sky subimage is obtained based on the position of described gray processing non-sky subimage in described electric energy meter image, black channel obtains subset, be connected with described Region dividing subset to obtain the non-sky subimage of described colour, for each pixel in the non-sky subimage of described colour, calculate its R, G, B tri-Color Channel pixel value, the R of all pixels in described colour non-sky subimage, G, B tri-extracts the Color Channel at the minimum Color Channel pixel value place of numerical value in Color Channel pixel value as black channel, overall air light value obtains subset, be connected to obtain described presetted pixel value threshold value with storage subset, also obtain subset to be connected respectively to obtain described electric energy meter image and described black channel with described Region dividing subset and described black channel, multiple pixels that black channel pixel value in described electric energy meter image is more than or equal to presetted pixel value threshold value are formed set of pixels to be tested, the gray-scale value air light value as a whole of the pixel of maximum gradation value will be had in described set of pixels to be tested, atmospheric scattering light value obtains subset, be connected respectively with described Region dividing subset and described haze Concentration Testing subset, to each pixel of described electric energy meter image, extract its R, G, in B tri-Color Channel pixel value, minimum value is as target pixel value, use and keep the Gaussian filter EPGF (edge-preserving gaussian filter) at edge to carry out filtering process to obtain filtered target pixel value to described target pixel value, target pixel value is deducted filtered target pixel value to obtain object pixel difference, EPGF is used to carry out filtering process to obtain filtered target pixel value difference to object pixel difference, filtered target pixel value is deducted filtered target pixel value difference and remove reference value to obtain haze, haze is removed intensity and be multiplied by haze removal reference value to obtain haze removal threshold value, get haze and remove minimum value in threshold value and target pixel value as comparison reference, get the atmospheric scattering light value of the maximal value in comparison reference and 0 as each pixel, medium transmission rate obtains subset, obtain subset and described atmospheric scattering light value with described overall air light value to obtain subset and be connected respectively, the atmospheric scattering light value of each pixel is removed value divided by overall air light value to obtain, deducts 1 described except value is to obtain the medium transmission rate of each pixel, sharpening Image Acquisition subset, with described Region dividing subset, described overall air light value obtains subset and is connected respectively with described medium transmission rate acquisition subset, the medium transmission rate of each pixel is deducted to obtain the first difference by 1, described first difference is multiplied by overall air light value to obtain product value, the pixel value of each pixel in described electric energy meter image is deducted described product value to obtain the second difference, by described second difference divided by the medium transmission rate of each pixel to obtain the sharpening pixel value of each pixel, in described electric energy meter image, the pixel value of each pixel comprises the R of each pixel in described electric energy meter image, G, B tri-Color Channel pixel value, correspondingly, the sharpening pixel value of each pixel obtained comprises the R of each pixel, G, B tri-Color Channel sharpening pixel value, the sharpening pixel value composition mist elimination electric energy meter image of all pixels, described image processor is after receiving described mist elimination electric energy meter image, described mist elimination electric energy meter image is converted to HSV image, extract the H channel value of each pixel in HSV image, obtain the multiple pixels of H channel value in described bezel, cluster H passage threshold range based on bezel, cluster H passage threshold range, described multiple pixel is formed the bezel, cluster image in described mist elimination electric energy meter image, described master controller is connected respectively with described image processor and described static memory, based on the matching result of the bezel, cluster image in described benchmark electric energy meter block diagram case and described mist elimination electric energy meter image, determine the damaged degree of described electric energy meter, described benchmark electric energy meter block diagram case is for taking obtained image to the electric energy meter that quality is intact in advance, wherein, described image processor also comprises built-in storage unit, and for storing described bezel, cluster H passage threshold range, described bezel, cluster H passage threshold range is made up of bezel, cluster H passage upper limit threshold and bezel, cluster H passage lower threshold.
More specifically, in described outdoor electric energy meter damaged degree detection platform, described master controller is after receiving the bezel, cluster image in described mist elimination electric energy meter image, image sharpening, self-adaptation recursive filtering and OCR identifying processing are carried out successively, to obtain electric energy meter reading to the bezel, cluster image in described mist elimination electric energy meter image.
More specifically, in described outdoor electric energy meter damaged degree detection platform, described high-definition camera is the OV7640 sensor of Omnivision company.
More specifically, in described outdoor electric energy meter damaged degree detection platform, described master controller is AT89C51 system.
More specifically, in described outdoor electric energy meter damaged degree detection platform, by described storage subset, described haze Concentration Testing subset, described Region dividing subset, described black channel obtains subset, described overall air light value obtains subset, described atmospheric scattering light value obtains subset, described medium transmission rate obtains subset and described sharpening Image Acquisition subset is integrated on one piece of circuit board.
Embodiment
Below with reference to accompanying drawings the embodiment of outdoor electric energy meter damaged degree detection platform of the present invention is described in detail.
The principle of work of electric energy meter is as follows: when electric energy meter access circuit-under-test, just have exchange current to flow through in current coil and potential winding, these two exchange current produce the magnetic flux of alternation respectively in their iron core; Alternating flux, through aluminium dish, induces eddy current in aluminium dish; Eddy current is subject to again the effect of power in magnetic field, thus makes aluminium dish obtain torque (initiatively moment) and rotate.The power of load consumption is larger, larger by the electric current of current coil, and the eddy current induced in aluminium dish is also larger, and the moment that aluminium dish is rotated is larger.Namely the size of torque follows the power of load consumption to be directly proportional.Power is larger, and torque is also larger, and aluminium dish rotates also faster.When aluminium dish rotates, be subject to again the effect of the braking moment that permanent magnet produces, braking moment is with initiatively moment direction is contrary; The size of braking moment is directly proportional to the rotating speed of aluminium dish, and aluminium dish rotates faster, and braking moment is also larger.When active moment and braking moment reach transient equilibrium, aluminium dish is by uniform rotation.The electric energy that load consumes is directly proportional to the revolution of aluminium dish.When aluminium dish rotates, drive counter, consumed electric energy is indicated.The simple procedure of electric energy meter work that Here it is.
Because electric energy meter has One's name is legion, distribution dispersion, electric energy meter outward appearance damage testing needs to meet high-level efficiency, high-precision requirement simultaneously.But all there is intrinsic defect in electric energy meter outward appearance damage testing scheme of the prior art: (1), although artificial detection mode can ensure the precision of testing result, needs the cost of labor of at substantial, and efficiency is not high, and real-time is not strong; (2) more existing detection of electrons schemes can only ensure the reading collection under home; because much electricity table is placed in open air; under the weather that visibility is lower; such as, under foggy days environment; often cause the electric energy meter of shooting image blurring unclear; correspondingly, testing result error is very large.
For this reason, the present invention has built a kind of outdoor electric energy meter damaged degree detection platform, efficient requirement is met by image acquisition and processing technology targetedly, also can carry out the detection of high-precision electric energy meter damaged degree under realizing inclement weather by the process of mist elimination haze, thus meet above-mentioned two kinds of requirements simultaneously.
Fig. 1 is the block diagram of the outdoor electric energy meter damaged degree detection platform illustrated according to an embodiment of the present invention, described platform comprises high-definition camera 1, image processor 2, static memory 3 and master controller 4, described high-definition camera 1 obtains electric energy meter image for taking electric energy meter, described image processor 2 is connected with described high-definition camera 1, for carrying out image procossing to described electric energy meter image, to extract the bezel, cluster image in described electric energy meter image, described static memory 3 has prestored benchmark electric energy meter block diagram case, described master controller 4 is connected respectively with described image processor 2 and described static memory 3, based on the matching result of described benchmark electric energy meter block diagram case and described bezel, cluster image, determine the damaged degree of described electric energy meter.
Then, continue to be further detailed the concrete structure of outdoor electric energy meter damaged degree detection platform of the present invention.
Described platform also comprises: GPS locator, for receiving the current GPS location of the electric energy meter of gps satellite feedback, and is connected that described current GPS location is sent to described master controller with described master controller 4.
Described platform also comprises: GPRS communication interface, is connected with described master controller 4, for the damaged degree of described electric energy meter and described current GPS location are packaged as GPRS data bag, and described GPRS data bag is wirelessly sent to the power supply management platform of far-end.
Described platform also comprises: power supply, comprise solar powered device, accumulator, change-over switch and electric pressure converter, described change-over switch is connected respectively with described solar powered device and described accumulator, determine whether be switched to described solar powered device to be powered by described solar powered device according to accumulator dump energy, described electric pressure converter is connected with described change-over switch, with the 5V voltage transitions will inputted by change-over switch for 3.3V voltage.
Described platform also comprises: sharpening treatment facility, between described high-definition camera 1 and described image processor 2, for receiving described electric energy meter image, mist elimination process is carried out to obtain mist elimination electric energy meter image to described electric energy meter image, described mist elimination electric energy meter image is inputted described image processor 2 to replace described electric energy meter image by image procossing to extract the bezel, cluster image in described mist elimination electric energy meter image.
Further, described sharpening treatment facility comprises with lower component:
Store subset, for prestoring sky upper limit gray threshold and sky lower limit gray threshold, described sky upper limit gray threshold and described sky lower limit gray threshold are for separating of the sky areas of publishing picture in picture, also for prestoring presetted pixel value threshold value, described presetted pixel value threshold value value is between 0 to 255;
Haze Concentration Testing subset, is arranged in air, for detecting the haze concentration of electric energy meter position in real time, and removes intensity according to haze concentration determination haze, and described haze removes intensity value between 0 to 1;
Region dividing subset, connect described high-definition camera 1 to receive described electric energy meter image, gray processing process is carried out to obtain gray processing electric energy meter image to described electric energy meter image, also be connected with storage subset, the pixel identification of gray-scale value in described gray processing electric energy meter image between described sky upper limit gray threshold and described sky lower limit gray threshold is formed gray processing sky sub pattern, described gray processing sky sub pattern is gone out to obtain the non-sky subimage of gray processing from described gray processing electric energy meter Iamge Segmentation, the colour non-sky subimage corresponding with described gray processing non-sky subimage is obtained based on the position of described gray processing non-sky subimage in described electric energy meter image,
Black channel obtains subset, be connected with described Region dividing subset to obtain the non-sky subimage of described colour, for each pixel in the non-sky subimage of described colour, calculate its R, G, B tri-Color Channel pixel value, the R of all pixels in described colour non-sky subimage, G, B tri-extracts the Color Channel at the minimum Color Channel pixel value place of numerical value in Color Channel pixel value as black channel;
Overall air light value obtains subset, be connected to obtain described presetted pixel value threshold value with storage subset, also obtain subset to be connected respectively to obtain described electric energy meter image and described black channel with described Region dividing subset and described black channel, multiple pixels that black channel pixel value in described electric energy meter image is more than or equal to presetted pixel value threshold value are formed set of pixels to be tested, the gray-scale value air light value as a whole of the pixel of maximum gradation value will be had in described set of pixels to be tested;
Atmospheric scattering light value obtains subset, be connected respectively with described Region dividing subset and described haze Concentration Testing subset, to each pixel of described electric energy meter image, extract its R, G, in B tri-Color Channel pixel value, minimum value is as target pixel value, use and keep the Gaussian filter EPGF (edge-preserving gaussian filter) at edge to carry out filtering process to obtain filtered target pixel value to described target pixel value, target pixel value is deducted filtered target pixel value to obtain object pixel difference, EPGF is used to carry out filtering process to obtain filtered target pixel value difference to object pixel difference, filtered target pixel value is deducted filtered target pixel value difference and remove reference value to obtain haze, haze is removed intensity and be multiplied by haze removal reference value to obtain haze removal threshold value, get haze and remove minimum value in threshold value and target pixel value as comparison reference, get the atmospheric scattering light value of the maximal value in comparison reference and 0 as each pixel,
Medium transmission rate obtains subset, obtain subset and described atmospheric scattering light value with described overall air light value to obtain subset and be connected respectively, the atmospheric scattering light value of each pixel is removed value divided by overall air light value to obtain, deducts 1 described except value is to obtain the medium transmission rate of each pixel;
Sharpening Image Acquisition subset, with described Region dividing subset, described overall air light value obtains subset and is connected respectively with described medium transmission rate acquisition subset, the medium transmission rate of each pixel is deducted to obtain the first difference by 1, described first difference is multiplied by overall air light value to obtain product value, the pixel value of each pixel in described electric energy meter image is deducted described product value to obtain the second difference, by described second difference divided by the medium transmission rate of each pixel to obtain the sharpening pixel value of each pixel, in described electric energy meter image, the pixel value of each pixel comprises the R of each pixel in described electric energy meter image, G, B tri-Color Channel pixel value, correspondingly, the sharpening pixel value of each pixel obtained comprises the R of each pixel, G, B tri-Color Channel sharpening pixel value, the sharpening pixel value composition mist elimination electric energy meter image of all pixels.
Described image processor 2 is after receiving described mist elimination electric energy meter image, described mist elimination electric energy meter image is converted to HSV image, extract the H channel value of each pixel in HSV image, obtain the multiple pixels of H channel value in described bezel, cluster H passage threshold range based on bezel, cluster H passage threshold range, described multiple pixel is formed the bezel, cluster image in described mist elimination electric energy meter image.
Described master controller 4 is connected respectively with described image processor 2 and described static memory 3, based on the matching result of the bezel, cluster image in described benchmark electric energy meter block diagram case and described mist elimination electric energy meter image, determine the damaged degree of described electric energy meter, described benchmark electric energy meter block diagram case is for taking obtained image to the electric energy meter that quality is intact in advance.
Wherein, described image processor 2 also comprises built-in storage unit, and for storing described bezel, cluster H passage threshold range, described bezel, cluster H passage threshold range is made up of bezel, cluster H passage upper limit threshold and bezel, cluster H passage lower threshold.
Wherein, in described platform, alternatively, described master controller 4 is after receiving the bezel, cluster image in described mist elimination electric energy meter image, successively image sharpening is carried out to the bezel, cluster image in described mist elimination electric energy meter image, self-adaptation recursive filtering and OCR identifying processing, to obtain electric energy meter reading, described high-definition camera 1 is the OV7640 sensor of Omnivision company, described master controller 4 is AT89C51 system, and can by described storage subset, described haze Concentration Testing subset, described Region dividing subset, described black channel obtains subset, described overall air light value obtains subset, described atmospheric scattering light value obtains subset, described medium transmission rate obtains subset and described sharpening Image Acquisition subset is integrated on one piece of circuit board.
In addition, haze image can realize the mist elimination haze of image by a series of images treatment facility, to obtain the image of sharpening, improves the visibility of image.These image processing equipments perform different image processing functions respectively, based on the principle that haze is formed, reach the effect removing haze.The sharpening process of haze image all has great using value for dual-use field, and military domain comprises military and national defense, remote sensing navigation etc., and civil area comprises road monitoring, target following and automatic Pilot etc.
The process that haze image is formed can be described by atmospheric attenuation process, relation between haze image and real image and sharpening image can be stated by the medium transmission rate of overall air light value and each pixel, namely when known haze image, according to the medium transmission rate of overall air light value with each pixel, sharpening image can be solved.
There are some effective and through verifying means in the solving of medium transmission rate for overall air light value and each pixel, such as, for the medium transmission rate of each pixel, need the atmospheric scattering light value obtaining overall air light value and each pixel, and the atmospheric scattering light value of each pixel can obtain carrying out the Gaussian smoothing filter at twice maintenance edge to the pixel value of each pixel in haze image, therebetween, the intensity of haze removal is adjustable; And the acquisition pattern of overall air light value has two kinds, a kind of mode is, black channel by obtaining haze image (namely makes the black channel value of some pixels very low in haze image, black channel is R, G, one in B tri-Color Channel), in haze image, obtain by finding the maximum pixel of gray-scale value in multiple pixels that searching black channel pixel value is bigger than normal, be about to the gray-scale value air light value as a whole of that search out, that gray-scale value is maximum pixel, participate in the sharpening process of each pixel in haze image; In addition, overall air light value is also by obtaining with under type: the gray-scale value calculating each pixel in haze image, by the gray-scale value of pixel maximum for gray-scale value air light value as a whole.
Relation between concrete haze image and real image and sharpening image, and the relation between parameters can see above content.
By the discussion to haze image formation basic theory, build the relation between haze image and sharpening image, by this relation of multiple Parametric Representation, subsequently by the multiple parameter values that obtain and haze image and the higher image of reducible acquisition sharpness, some statistical means and empirical means have been used in acquisition due to parameter, therefore the image that described sharpness is higher can not be equal to real image completely, but there is the mist elimination haze effect of certain degree, for the every field operation under haze weather provides effective guarantee.
Adopt outdoor electric energy meter damaged degree detection platform of the present invention, low and the not high technical matters of precision may be there is at inclement weather for existing electric energy meter outward appearance damaged degree detection scheme detection efficiency, by adopting image acquisition and image processing techniques targetedly, substitute manual detection mode, improve detection efficiency, simultaneously, the sharpening treatment facility added based on atmospheric attenuation model realizes the process of mist elimination haze, overcome the impact of haze weather on damaged degree testing result, ensure the accuracy being supplied to the reference data of power supply department.
Be understandable that, although the present invention with preferred embodiment disclose as above, but above-described embodiment and be not used to limit the present invention.For any those of ordinary skill in the art, do not departing under technical solution of the present invention ambit, the technology contents of above-mentioned announcement all can be utilized to make many possible variations and modification to technical solution of the present invention, or be revised as the Equivalent embodiments of equivalent variations.Therefore, every content not departing from technical solution of the present invention, according to technical spirit of the present invention to any simple modification made for any of the above embodiments, equivalent variations and modification, all still belongs in the scope of technical solution of the present invention protection.