The monitoring water environment system of water level and water quality monitoring is realized based on image vision processing
Technical field
The present invention relates to a kind of electronic surveying fields more particularly to a kind of image vision treatment technology to realize water level and water quality
Monitoring device.
Background technology
Existing Level monitor often can only individual sensed water level, water quality can not be detected, it is necessary in addition use water
Matter monitoring device realizes, how to realize and meanwhile measure water level and water quality be this field technical barrier.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of monitoring water environment system for being adapted for water quality measurement, the water
Environmental monitoring system carries out water quality monitoring using gray scale detection principle, i.e., carrying out gray proces to the water surface image of shooting is somebody's turn to do
The gray value of water surface image is to obtain water quality situation.
The present invention provides a kind of monitoring water environment system, including:
The measurement pipe of distribution, lower port are equipped with lighting device and when in use into upstream face, measurements up and down during use
A photographic device is set at the upper port of pipe, which is suitable for shooting the water surface image in the measurement pipe;
Video acquisition module is connected with the photographic device, suitable for the image gathered is transformed to digital picture;
The image processing module being connected with the video acquisition module, the image processing module are stored with first sample number
According to the first sample data are suitable for the gray value for recording various water quality(Water quality is poorer, and gray value is lower);
What is be connected with described image processing module is used to receive remote control signal and exports the wireless telecommunications of water quality situation
Module;
The float for being used to that the measurement pipe to be made vertically to bubble through the water column arranged on the periphery of the measurement pipe, the float are equipped with extremely
Few one propeller for being used to control position of the measurement pipe on the water surface;
Described image processing module is suitable for carrying out gray proces to the digital picture, to obtain the ash of the water surface image
Angle value, the gray value are compared with first sample data and draw water quality situation.
Wireless communication module is GSM, 3G, 4G or wireless carrier communication module.
The monitoring water environment system further includes:Communicating wirelessly with the wireless communication module in waterfront
Wireless controller, PC machine or tablet computer preferably with GSM, 3G or 4G communication module.
Photographic device uses focusing wide angle camera lens or tight shot.
Further, the float is arranged on for dish type and fixing sleeve in the measurement pipe, and the propeller includes central symmetry
Three be distributed on the float;The wireless communication module is connected with to control each spiral shell according to the remote control signal
The working condition of paddle is revolved, to control the propeller control of position of the measurement pipe on the water surface in real time.In order to avoid
Influence of the ambient light to water surface image during shooting, the inner wall of the measurement pipe, which is equipped with, is suitable for light-absorbing black coating.
Further, in order to avoid influence of the bottom ambient light to water surface image during shooting, and water is kept when not shooting
Smoothness is logical, so that the water quality in the measurement pipe is consistent with actual water quality, the measurement pipe is on the tube wall positioned at underwater side
Multiple through holes, and the bottom end closure of the measurement pipe is distributed with;It is arranged on the tube body below the water surface on a tube wall and through hole is distributed with
Casing;The rotating mechanism that described sleeve pipe is suitable for the casing is driven to rotate around the measurement pipe with one is sequentially connected, the rotating machine
The controller that structure is connected by one with the photographic device controls, and in not filming surface image, the rotating mechanism is controlled to drive
Sleeve rotating is so that the through hole on through hole and casing in the measurement pipe is opposite respectively, so that current are suitable for passing in and out the measurement
Pipe;In filming surface image, the rotating mechanism is controlled to drive sleeve rotating so that through hole and casing in the measurement pipe
On through hole offset one from another, with prevent extraneous light enter the measurement pipe.
As another embodiment, being distributed with when in use on the tube wall below the water surface for the measurement pipe is multiple
Through hole is arranged sleeve on the tube body below the water surface;Described sleeve pipe is suitable for driving the casing along above and below the measurement pipe with one
The displacement drive mechanism driving connection of displacement, the controller which is connected by one with the photographic device control;
In filming surface image, control the displacement drive mechanism that casing is driven to shift up, so that described sleeve pipe covers the survey
Each through hole on buret, to prevent extraneous light from entering the measurement pipe;In not filming surface image, control described sleeve pipe to
Bottom offset, and described sleeve pipe is made not cover each through hole in the measurement pipe, so that current are suitable for passing in and out the measurement pipe.It is described
Displacement drive mechanism is suitable for real for cylinder, oil cylinder or linear motor in the measurement pipe, be connected with described sleeve pipe etc.
The device of existing straight-line displacement.
Further, in order to realize the level measuring to the monitoring water environment system, the monitoring water environment system is also wrapped
It includes:Flexible scale, one end are fixed on the bottom, and the wrap-up that the other end is suitable for winding the flexible scale with one is connected, the winding
Device is fixed in the measurement pipe;Directive wheel, it is neighbouring on the inner wall of the measurement pipe on the inner wall of the measurement pipe
The upper and lower of the directive wheel is respectively equipped with the upper and lower guide rod parallel with the wheel shaft of the directive wheel, and the flexible scale fits
In being passed through respectively from the gap of the upper and lower guide rod and the inner wall of measurement pipe and be fitted in the inside wheel face of the directive wheel
On, the top of the directive wheel is in above the water surface.
In order to make photographic device when shooting, it is more prone to distinguish the edge of water surface image, to further include in the measurement pipe
Float in the pipe of white, float is the column structure of the center through hole with vertical setting in the pipe, and the image mechanism is suitable for
The water surface image in the center through hole is shot, and float is suitable for fluctuating in the measurement pipe with the water surface in the pipe.
Compared with prior art, the invention has the advantages that:(1)The present invention is by water surface image to obtain water quality
Corresponding situation, device is simple, convenient for carrying out easily water quality measurement in the wild or in the case of unconditional progress water quality test
Or anticipation, without tedious steps;(2)Multiple through holes, measurement pipe is distributed on the tube wall positioned at underwater side by measurement pipe
Bottom end closure and be distributed through hole casing coordinated, make, in not filming surface image, to control the rotating mechanism
Sleeve rotating is driven so that the through hole on through hole and casing in the measurement pipe, which coincide, is suitable for current circulation;In filming surface
During image, the rotating mechanism is controlled to drive sleeve rotating so that the through hole on through hole and casing in the measurement pipe is wrong each other
It opens, to prevent extraneous light from entering the measurement pipe;The combination of above-mentioned component causes when carrying out water quality judgement, avoids underwater
The influence of light, the water surface image for making shooting is more accurate, to further improve the precision of water quality monitoring;(3)It is marked by flexibility
Ruler, the periphery of the measurement pipe are equipped with the components such as float, the directive wheel for being suitable for that the measurement pipe is made to bubble through the water column vertically, make the water
Environmental monitoring system, which can be swum in, carries out level measuring on the water surface, to obtain more accurate water level value.
Description of the drawings
In order to make the content of the present invention more clearly understood, below according to specific embodiment and with reference to attached drawing,
The present invention is described in further detail, wherein
The structure diagram of the monitoring water environment system of Fig. 1 present invention.
The rotating mechanism of Fig. 2 present invention, controller, the connection diagram of photographic device;
A kind of embodiment of the rotating mechanism of Fig. 3 present invention;
The another embodiment of the rotating mechanism of Fig. 4 present invention;
The structure top view of each gag lever post in the another embodiment of the rotating mechanism of Fig. 5 present invention;
The structure diagram for water level detection part of the water level detecting system of Fig. 6 present invention.
Wherein, measurement pipe 1, the water surface 2, water surface image 2-1, float 3, flexible scale 4, wrap-up 5, directive wheel 6, on lead
To bar 7-1, lower guide rod 7-2, casing 8-1, annular seal space 8-2, stepper motor 8-3, motor 8-4, shaft 8-5, /V cross bar
8-6, the first gag lever post 8-7a, the second gag lever post 8-7b, the 3rd gag lever post 8-7c, the 4th gag lever post 8-7d.
Specific embodiment
The following describes the present invention in detail with reference to the accompanying drawings and embodiments:
Embodiment 1
Such as Fig. 1, a kind of monitoring water environment system, including:
Measurement pipe 1, lower port is equipped with lighting device and the lower port is suitable for integrally into upstream face 2 when in use, on
A photographic device is set at port, which is suitable for shooting the water surface image 2-1 in the measurement pipe 1;
Video acquisition module, image will be gathered by, which being connected with the photographic device, is transformed to digital picture;
The image processing module being connected with the video acquisition module, the image processing module are stored with first sample number
According to the first sample data are suitable for the gray value for recording various water quality;
What is be connected with described image processing module is used to receive remote control signal and exports the wireless telecommunications of water quality situation
Module;
Arranged on the periphery of the measurement pipe for making the float that the measurement pipe vertically bubbles through the water column, the float for dish type and
Fixing sleeve is arranged in the measurement pipe, and the propeller includes three that central symmetry is distributed on the float;It is described wireless
Communication module is connected with for controlling the working condition of each propeller according to the remote control signal, to control the survey in real time
The propeller control of position of the buret on the water surface;
Described image processing module is suitable for carrying out gray proces to the digital picture, to obtain the water surface image 2-1
Gray value, which is compared with first sample data and draws water quality situation.
Water quality detection principle is the gray value with water surface image to be detected using the corresponding gray value sample of different quality
It is compared, i.e., image processing module is stored with each gray value sample of different quality, i.e. first sample data.
Corresponding gray value processing is carried out to the water surface image 2-1 using MATLAB library functions, step is as follows:
I=imread(‘image.jpg’);% opens pending picture(8 gray scales)
imshow(I);% shows the picture
C=mean2(I);% calculates the average value of image pixel matrix
The gray value of the water surface image 2-1 can be calculated by mean2 functions.
Table 1 is the average gray value of various water quality, i.e. first sample data:
Water sample type |
Pure water |
River water |
Swimming-pool water |
It is mixed with the water of mud |
Average gray value |
132 |
85 |
89 |
67 |
Water sample type |
By the water of dye discoloration |
Prepared Chinese ink water |
Industrial wastewater |
Green tea water |
Average gray value |
37 |
21 |
23 |
90 |
According to common sense, the water quality quality of these water samples may be arranged such that:Pure water>Green tea water>Swimming-pool water>
River water>It is mixed with the water of mud>By the water of dye discoloration>Industrial wastewater ≈ prepared Chinese ink water, when water body sampled images gray value(Brightness
Value)More hour, it is believed that its water quality is poorer, and vice versa.It, can be by water body overall gray level thus in water quality detection
Corresponding water quality conclusion is calculated, the processing hand of the higher levels such as sample extraction, neutral net, pattern-recognition can also be passed through
Section accomplishes to detect the water quality index that turbidity etc. more refines.
For example, if the gray scale of the water surface image 2-1 detected is 85, show that the water quality is suitable with the water quality of river water.
Embodiment two
On the basis of embodiment one, in order to avoid influence of the ambient to water surface image 2-1, the photographic device with
Upper port is tightly connected, and the inner wall of the measurement pipe 1, which is equipped with, is suitable for light-absorbing black coating.
Embodiment three
See Fig. 2, further, on the basis of embodiment two, in order to further avoid influence of the underwater light to shooting, with
Brightness, the accuracy of colourity of the water surface image 2-1 of shooting is improved, the measurement pipe 1 is divided on the tube wall below the water surface 2
It is furnished with multiple through holes, and the bottom end closure of the measurement pipe 1;A casing that through hole is distributed with is arranged on the tube body below the water surface 2
8-1;Described sleeve pipe 8-1 and one is suitable for driving casing 8-1 and is sequentially connected around the rotating mechanism that the measurement pipe 1 rotates, this turn
The controller that motivation structure is connected by one with the photographic device controls, and in not filming surface image 2-1, controls the rotating machine
Casing 8-1 is driven to rotate for structure so that the through hole on through hole and casing 8-1 in the measurement pipe 1 coincide and is suitable for current circulation;
In filming surface image 2-1, control the rotating mechanism that casing 8-1 is driven to rotate so that through hole in the measurement pipe 1 and
Through hole on casing 8-1 offsets one from another, to prevent extraneous light from entering the measurement pipe 1.
The specific embodiment that the rotating mechanism control casing is rotated around the measurement pipe 1:
See Fig. 3, annular seal space 8-2 formed between the bottom lower face of the measurement pipe 1 and the bottom upper surface of casing 8-1,
Annular seal space 8-2 is equipped with a stepper motor 8-3 to play waterproof action in annular seal space 8-2, can by stepper motor 8-3
To set rotational angle, the through hole on through hole and casing 8-1 in the measurement 1 is made to coincide or offset one from another(In through hole figure
It is not drawn into), the engine base of stepper motor 8-3 is fixed on the bottom lower face of the measurement pipe 1, and the center of the engine base and institute
It is corresponding to state the center of bottom lower face, i.e., coaxial, shaft one end of the stepper motor 8-3 is with described sleeve pipe 8-1's
Bottom upper surface is connected casing 8-1 is driven to rotate around the measurement pipe 1, and stepper motor 8-3 is controlled by controller.
Shaft one end of stepper motor 8-3 can also be fixed on the bottom lower face of the measurement pipe 1, engine base is coaxially solid
Due to the bottom upper surface of described sleeve pipe 8-1, when stepper motor 8-3 is rotated, since shaft is fixed, will not rotate, then machine
Seat will rotate, i.e., engine base drives casing 8-1 to be rotated around the measurement pipe 1.
See Fig. 4, motor 8-4 can also be installed in the annular seal space 8-2, the engine base of motor 8-4 is fixed on described
The bottom lower face of measurement pipe 1, and the center of the bottom lower face is corresponding with the center of the engine base, i.e., it is coaxial,
Shaft 8-5 one end of the motor 8-4 is connected with the bottom upper surface of described sleeve pipe 8-1, since motor 8-4 is in rotation
When be difficult control rotate angle, so a /V cross bar 8-6 is equipped on the shaft 8-5 of the motor 8-4, in institute
The bottom upper surface for stating casing 8-1 is equipped with two pairs of gag lever posts, and the /V cross bar 8-6 is embedded in two pairs of gag lever posts(I.e.
First, the second gag lever post is a pair, and the three, the 4th gag lever posts are a pair)Between, when the motor 8-4 is rotated, drive the set
Pipe 8-1 is rotated around the measurement pipe 1, and two pairs of gag lever posts define the rotation angle of motor 8-4.
Fig. 5, specific work process are seen, if the /V cross bar 8-6 both ends are in the second gag lever post 8-7b, the 3rd gag lever post
When at 8-7c, the through hole on through hole and casing 8-1 in the measurement pipe 1 coincide, and the /V cross bar 8-6 both ends are in first
When at gag lever post 8-7a, the 4th gag lever post 8-7d, the through hole on through hole and casing 8-1 in the measurement pipe 1 offsets one from another, with
Prevent light from entering measurement pipe 1.
When photographic device prepares to shoot, motor 8-4 control shafts 8-5 drives /V cross bar 8-6 to rotate to the first limit
When at the bar 8-7a and the 4th gag lever post 8-7d of position, motor 8-4 is stopped, at this moment the through hole and casing in the measurement pipe 1
Through hole on 8-1 offsets one from another, and to prevent extraneous light from entering the measurement pipe 1, photographic device is shot, and shooting finishes,
Motor 8-4 is inverted, and when the /V cross bar 8-6 is rotated to the second gag lever post 8-7b and the 3rd gag lever post 8-7c, is made described
The through hole on through hole and casing 8-1 in measurement pipe 1 coincide, and current is made to circulate.
Gag lever post can also be substituted using limiting slot in certain this scheme, and the width of rebate of the limiting slot is more than described
/V cross bar 8-6.
Example IV
On the basis of embodiment one to three, the measurement of water level is carried out, the technical solution is as follows:
Float in pipe is further included in the measurement pipe 1, float is the column of the center through hole with vertical setting in the pipe
Structure, the image mechanism is suitable for shooting the water surface image in the center through hole, and float is suitable for the water surface in institute in the pipe
It states and fluctuates in measurement pipe 1;Make the edge of water surface image 2-1 more by shooting the water surface image 2-1 in pipe in float
Clearly, convenient for extracting the area of water surface image 2-1.
Embodiment five
See Fig. 6, on the basis of embodiment one to three, the scheme for carrying out level measuring is as follows:
A photographic device is installed at the upper port of the measurement pipe 1, the periphery of the measurement pipe 1, which is equipped with, to be suitable for making
The measurement pipe 1 bubble through the water column vertically 2 float 3, and by the float 3 measurement pipe 1 can be made to bubble through the water column, without in addition solid
It is fixed.
The monitoring water environment system further includes:
Flexible scale 4, and one end is fixed on the bottom, and the other end is suitable for 5 phase of wrap-up for winding the flexible scale 4 with one
Even, which is fixed on the top of the measurement pipe 1;
Directive wheel 6, on the inner wall of the measurement pipe 1, on the inner wall of the measurement pipe 1 on the neighbouring directive wheel,
Guide rod 7-1, lower guide rod 7-2 are respectively arranged below with, the flexible scale 4 is suitable for from the upper guide rod 7-1, lower guiding
Bar 7-2 is passed through and is fitted on the inside wheel face of the directive wheel 6, and the top of the directive wheel 6 is in above the water surface.
The principle that the embodiment six carries out level measuring is that photographic device is utilized to be clapped simultaneously in filming surface image 2-1
It takes the photograph and is directed to 6 flexible scales 4 that prop up of wheel, the scale of flexible scale 4 is easy to be photographed after being propped up, and has just obtained actual water
Position.
Due to 6 very little of directive wheel, carry out water quality detection when, the water surface image 2-1 of shooting led during gray proces
It can be ignored to components such as wheel, scales, the gray value for not interfering with water surface image 2-1 calculates.
And the flexible scale 4 stretches into the water-bed bottom end closure for having no effect on the measurement pipe 1.
The present invention can also use Canny detective operators to carry out edge extracting for gray component, to obtain water surface image
Each area pixel value of 2-1, for specific steps referring to patent of invention, application number 200910232679.6 is entitled " to be regarded based on image
The water level measurement system and method for feel ".
Periodical《Computer and modernization》06 phase in 2006, paper " the gray level image side based on CNN of Huang Lei, Liu Wenbo
Gray-scale edges extraction is also described in detail in the research of template parameter in edge extraction algorithm ", the present invention similarly may be employed
The algorithm.
Periodical《Nanjing Aero-Space University》2006, " image border based on cell neural network carried the paper of Huang Lei
Take algorithm research " in describing the method that neutral net is used to carry out edge extracting to image, this method is applied equally to
The present invention.
Obviously, the above embodiment is merely an example for clearly illustrating the present invention, and is not to the present invention
The restriction of embodiment.For those of ordinary skill in the art, it can also be made on the basis of the above description
Its various forms of variation or variation.There is no necessity and possibility to exhaust all the enbodiments.And these belong to this hair
The obvious changes or variations that bright spirit is extended out is still in the protection scope of this invention.