Summary of the invention
In order to solve the problem, the invention provides a kind of automatic copying electric meter platform gathered based on cmos image, a set of automatic copying electric meter platform that utilized high-precision acquisition technology and image processing techniques to build, ensure the high efficiency of data acquisition, meanwhile, according to atmospheric attenuation model determination haze to the influencing 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 reading gathers.
According to an aspect of the present invention, provide a kind of automatic copying electric meter platform gathered based on cmos image, described platform comprises digital signal processor, LCD display, FLASH memory and cmos image sensor, described cmos image sensor is used for taking to obtain bezel, cluster image to the bezel, cluster of electric energy meter, described digital signal processor is connected with described cmos image sensor, for carrying out image procossing to described bezel, cluster image, to obtain electric energy meter reading, described FLASH memory is connected with described digital signal processor, for storing described electric energy meter reading, described LCD display is connected with described digital signal processor, for showing described electric energy meter reading.
More specifically, in the described automatic copying electric meter platform gathered based on cmos image, also comprise: CSI interface, between cmos image sensor and image-preprocessing device, send image-preprocessing device to for the bezel, cluster image taken by described cmos image sensor, first parallel port, between described digital signal processor and described LCD display, the electric energy meter reading for being obtained by described digital signal processor sends described LCD display to show, second parallel port, between described digital signal processor and described FLASH memory, the electric energy meter reading for being obtained by described digital signal processor sends described FLASH memory to store, power supply, comprise solar powered device, storage battery, diverter switch and electric pressure converter, described diverter switch is connected respectively with described solar powered device and described storage battery, determine whether be switched to described solar powered device to be powered by described solar powered device according to storage battery dump energy, described electric pressure converter is connected with described diverter switch, with the 5V voltage transitions will inputted by diverter switch for 3.3V voltage, image-preprocessing device, between described CSI interface and described digital signal processor, for receiving described bezel, cluster image, mist elimination process is carried out to obtain mist elimination bezel, cluster image to described bezel, cluster image, described mist elimination bezel, cluster image is inputted described digital signal processor to carry out image procossing to obtain electric energy meter reading, described image-preprocessing device 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 CSI interface to receive described bezel, cluster image, gray processing process is carried out to obtain gray processing bezel, cluster image to described bezel, cluster image, also be connected with storage subset, the pixel identification of gray value in described gray processing bezel, cluster 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 subgraph of gray processing from described gray processing bezel, cluster Iamge Segmentation, the colour non-sky subgraph corresponding with described gray processing non-sky subgraph is obtained based on the position of described gray processing non-sky subgraph in described bezel, cluster image, black channel obtains subset, be connected with described Region dividing subset to obtain the non-sky subgraph of described colour, for each pixel in the non-sky subgraph of described colour, calculate its R, G, B tri-Color Channel pixel value, the R of all pixels in described colour non-sky subgraph, 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 presetted pixel value threshold value with described storage subset, obtain subset with described Region dividing subset and described black channel to be connected respectively to obtain described bezel, cluster image and described black channel, multiple pixels that black channel pixel value in described bezel, cluster image is more than or equal to presetted pixel value threshold value are formed set of pixels to be tested, the gray 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 bezel, cluster 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 fiducial value to obtain haze, haze is removed intensity and be multiplied by haze removal fiducial 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 maximum 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 bezel, cluster 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 bezel, cluster image, the pixel value of each pixel comprises the R of each pixel in described bezel, cluster 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 bezel, cluster image of all pixels, described digital signal processor, after receiving described mist elimination bezel, cluster image, carries out image sharpening, self adaptation recursive filtering and OCR identifying processing, to obtain electric energy meter reading successively to described mist elimination bezel, cluster image, wherein, described haze Concentration Testing subset is also built-in with static storage cell, and for prestoring comparison table, described comparison table saves haze concentration and haze and removes corresponding relation between intensity.
More specifically, in the described automatic copying electric meter platform gathered based on cmos image, described cmos image sensor is the OV7640 transducer of Omnivision company.
More specifically, in the described automatic copying electric meter platform gathered based on cmos image, described Region dividing subset, described black channel obtain 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 adopts different fpga chips to realize respectively.
More specifically, in the described automatic copying electric meter platform gathered based on cmos image, described Region dividing subset, described black channel obtain 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.
More specifically, in the described automatic copying electric meter platform gathered based on cmos image, described Region dividing subset, described black channel obtain 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 in one piece of fpga chip.
Embodiment
Below with reference to accompanying drawings the embodiment of the automatic copying electric meter platform based on cmos image collection of the present invention is described in detail.
Electric energy can convert various energy to.As: convert heat energy to by electric furnace, convert mechanical energy to by motor, convert luminous energy etc. to by electric light.And the ammeter recording this electric energy is electric energy meter.
The operation principle of electric energy meter is as follows: when electric energy meter access circuit-under-test, just have alternating current to flow through in current coil and potential winding, these two alternating currents 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 widely distributed, and the correctness of electric energy meter reading is extremely important.Therefore, the collection of electric energy meter reading should be accurate again fast.But electric energy meter reading acquisition platform of the prior art cannot meet this 2 requirements simultaneously.For this reason, the present invention has built a kind of automatic copying electric meter platform gathered based on cmos image, efficient requirement is met by image acquisition and processing technology targetedly, also can carry out the collection of high-precision electric energy meter reading under realizing bad weather by the process of mist elimination haze, thus meet the setting requirement of power supply department.
Fig. 1 is the block diagram of the automatic copying electric meter platform based on cmos image collection illustrated according to an embodiment of the present invention, described platform comprises digital signal processor 1, LCD display 4, FLASH memory 3 and cmos image sensor 2, described cmos image sensor 2 is for taking to obtain bezel, cluster image to the bezel, cluster of electric energy meter, described digital signal processor 1 is connected with described cmos image sensor 2, for carrying out image procossing to described bezel, cluster image, to obtain electric energy meter reading, described FLASH memory 3 is connected with described digital signal processor 1, for storing described electric energy meter reading, described LCD display 4 is connected with described digital signal processor 1, for showing described electric energy meter reading.
Then, continue to be further detailed the concrete structure of the automatic copying electric meter platform based on cmos image collection of the present invention.
Described platform also comprises: CSI interface, between cmos image sensor 2 and image-preprocessing device, sends image-preprocessing device to for the bezel, cluster image taken by described cmos image sensor 2.
Described platform also comprises: the first parallel port, and between described digital signal processor 1 and described LCD display 4, the electric energy meter reading for being obtained by described digital signal processor 1 sends described LCD display 4 to show.
Described platform also comprises: the second parallel port, and between described digital signal processor 1 and described FLASH memory 3, the electric energy meter reading for being obtained by described digital signal processor 1 sends described FLASH memory 3 to store.
Described platform also comprises: power supply, comprise solar powered device, storage battery, diverter switch and electric pressure converter, described diverter switch is connected respectively with described solar powered device and described storage battery, determine whether be switched to described solar powered device to be powered by described solar powered device according to storage battery dump energy, described electric pressure converter is connected with described diverter switch, with the 5V voltage transitions will inputted by diverter switch for 3.3V voltage.
Described platform also comprises: image-preprocessing device, between described CSI interface and described digital signal processor 1, for receiving described bezel, cluster image, mist elimination process is carried out to obtain mist elimination bezel, cluster image to described bezel, cluster image, described mist elimination bezel, cluster image is inputted described digital signal processor 1 to carry out image procossing to obtain electric energy meter reading.
Described image-preprocessing device 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.
Described image-preprocessing device also comprises: 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.
Described image-preprocessing device also comprises: Region dividing subset, connect described CSI interface to receive described bezel, cluster image, gray processing process is carried out to obtain gray processing bezel, cluster image to described bezel, cluster image, also be connected with storage subset, the pixel identification of gray value in described gray processing bezel, cluster 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 subgraph of gray processing from described gray processing bezel, cluster Iamge Segmentation, the colour non-sky subgraph corresponding with described gray processing non-sky subgraph is obtained based on the position of described gray processing non-sky subgraph in described bezel, cluster image.
Described image-preprocessing device also comprises: black channel obtains subset, be connected with described Region dividing subset to obtain the non-sky subgraph of described colour, for each pixel in the non-sky subgraph of described colour, calculate its R, G, B tri-Color Channel pixel value, the R of all pixels in described colour non-sky subgraph, 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.
Described image-preprocessing device also comprises: overall air light value obtains subset, be connected to obtain presetted pixel value threshold value with described storage subset, obtain subset with described Region dividing subset and described black channel to be connected respectively to obtain described bezel, cluster image and described black channel, multiple pixels that black channel pixel value in described bezel, cluster image is more than or equal to presetted pixel value threshold value are formed set of pixels to be tested, the gray 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.
Described image-preprocessing device also comprises: 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 bezel, cluster 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 fiducial value to obtain haze, haze is removed intensity and be multiplied by haze removal fiducial 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 maximum in comparison reference and 0 as each pixel.
Described image-preprocessing device also comprises: 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.
Described image-preprocessing device also comprises: 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 bezel, cluster 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 bezel, cluster image, the pixel value of each pixel comprises the R of each pixel in described bezel, cluster 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 bezel, cluster image of all pixels.
Described digital signal processor 1, after receiving described mist elimination bezel, cluster image, carries out image sharpening, self adaptation recursive filtering and OCR identifying processing, to obtain electric energy meter reading successively to described mist elimination bezel, cluster image.
Wherein, described haze Concentration Testing subset is also built-in with static storage cell, and for prestoring comparison table, described comparison table saves haze concentration and haze and removes corresponding relation between intensity.More specifically, in the described automatic copying electric meter platform gathered based on cmos image, described cmos image sensor is the OV7640 transducer of Omnivision company.
Wherein, in described platform, 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 can adopt different fpga chips to realize respectively, 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 can be integrated on one piece of circuit board, alternatively, 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 can be integrated in one piece of fpga chip.
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 that haze is removed is adjustable, and overall air light value (namely makes the black channel value of some pixels very low by the black channel obtaining haze image 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 value in multiple pixels that searching black channel pixel value is bigger than normal, be about to search out, the gray value air light value as a whole of the pixel that gray value is maximum, participate in the sharpening process of each pixel in haze image.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 definition, some statistical means and empirical means have been used in acquisition due to parameter, therefore the image that described definition 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.
In addition, parallel port and parallel interface, refer to adopt parallel transmission mode to transmit the interface standard of data.From the simplest parallel data register or special purpose interface integrated circuit (IC) chip as 8255,6820 etc., to more complicated SCSI or IDE parallel interface, kind has tens of kinds.
The interface features of a parallel interface can be described from two aspects: the width of the data channel 1, transmitted in a parallel fashion, also claims the figure place of interface transmission; 2, for coordinating the additional interface control line of parallel data transmission or claiming the characteristic of interactive signal.The width of data can from 1-128 position or wider, and the most frequently used is 8, once transmits 8 data bit by interface.At the LPT interface that the parallel interface that computer realm is the most frequently used is usually said.
Adopt the automatic copying electric meter platform gathered based on cmos image of the present invention, the not high technical problem of precision may be there is at bad weather for existing electric energy meter reading ineffective systems, by adopting IMAQ and image processing techniques targetedly, substitute manual metering mode, improve meter reading efficiency, simultaneously, the image preprocess apparatus added based on atmospheric attenuation model realizes the process of mist elimination haze, reduce haze on the impact of quality of image of checking meter, avoid electric energy meter reading image data disturbed.
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.