The method that water level and water quality monitoring are realized based on image vision treatment technology
Technical field
Water level and water quality are realized the present invention relates to a kind of electronic surveying field, more particularly to a kind of image vision treatment technology
Monitoring device.
Background technology
Existing Level monitor often can only single sensed water level, it is impossible to detect water quality, it is necessary to use water in addition
Matter monitoring device realizes, how to realize and meanwhile measure water level and water quality be this area technical barrier.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of work for the monitoring water environment system for being adapted for water quality measurement
Make method, the monitoring water environment system carries out water quality monitoring using gray scale detection principle, i.e., carry out ash to the water surface image of shooting
Degree processing obtains the gray value of the water surface image to obtain water quality situation.
The invention provides a kind of monitoring water environment system, including:
The measurement pipe being distributed above and below when using, its lower port is provided with lighting device and enters upstream face when in use, measures
A camera device is set at the upper port of pipe, the camera device is suitable to shoot the water surface image in the measurement pipe;
Video acquisition module, is connected with the camera device, suitable for the image gathered is transformed into digital picture;
The image processing module being connected with the video acquisition module, the image processing module is stored with first sample number
According to the first sample data are suitable to the gray value for recording various water quality(Water quality is poorer, and gray value is higher);
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;
Peripheral located at the measurement pipe is used to make the float that the measurement pipe is vertically bubbled through the water column, and the float is provided with extremely
Few one propeller for controlling position of the measurement pipe on the water surface;
Described method of work includes:Described image processing module is suitable to carry out gray proces to the digital picture, with
The gray value of the water surface image is obtained, the gray value is compared with first sample data and draws water quality situation.
Wireless communication module is GSM, 3G, 4G or wireless carrier communication module.
The monitoring water environment system also includes:Communicating wirelessly with the wireless communication module in waterfront
Wireless controller, PC or tablet personal computer preferably with GSM, 3G or 4G communication module.
Camera device uses focusing wide angle camera lens, or tight shot.
Further, the float is dish type and fixed cover is located in the measurement pipe, and the propeller includes Central Symmetry
It is distributed in three on the float;The wireless communication module is connected with for controlling each spiral shell according to the remote control signal
The working condition of oar 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 inwall of the measurement pipe, which is provided with, is suitable to light-absorbing black coating.
Influence of the water-bed ambient light to water surface image when further, in order to avoid shooting, and keep water 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 body below the water surface on a tube wall and through hole is distributed with
Sleeve pipe;Described sleeve pipe is suitable to drive the sleeve pipe to be connected around the rotating mechanism that the measurement pipe is rotated with one, the rotating machine
Structure is controlled by a controller being connected with the camera device, in not filming surface image, controls the rotating mechanism to drive
Sleeve rotating is so that the through hole on through hole and sleeve pipe in the measurement pipe is relative respectively, so that current are suitable to pass in and out the measurement
Pipe;In filming surface image, the rotating mechanism is controlled to drive sleeve rotating so that through hole and sleeve pipe 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, sleeve is arranged on the body below the water surface;Described sleeve pipe is suitable to drive the sleeve pipe along above and below the measurement pipe with one
The displacement drive mechanism driving connection of displacement, the displacement drive mechanism is controlled by a controller being connected with the camera device;
In filming surface image, control the displacement drive mechanism to drive sleeve pipe to shift up, surveyed so that described sleeve pipe covering is described
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 not covered each through hole in the measurement pipe, so that current are suitable to pass in and out the measurement pipe.It is described
Displacement drive mechanism is suitable to real for cylinder, oil cylinder or linear electric motors 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
Include:Flexible scale, one end is fixed on the bottom, and the other end is connected with a wrap-up for being suitable to wind the flexible scale, the winding
Device is fixed in the measurement pipe;Directive wheel, it is neighbouring on the inwall of the measurement pipe on the inwall 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 the inner side wheel face for passing through and being fitted in the directive wheel from the gap of the upper and lower guide rod and the inwall of measurement pipe respectively
On, the top of the directive wheel is in above the water surface.
In order that camera device is when shooting, it is more prone to distinguish also to include in the edge of water surface image, the measurement pipe
Float is the column structure of the center through hole with vertical setting in float in the pipe of white, the pipe, and the image mechanism is suitable to
The water surface image in the center through hole is shot, and float is suitable to fluctuate 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, is easy to carry 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 are distributed with the tube wall positioned at underwater side by measurement pipe
Bottom end closure, and coordinated with the sleeve pipe that is distributed through hole, made in not filming surface image, the control rotating mechanism
Sleeve rotating is driven so that the through hole on through hole and sleeve pipe 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 sleeve pipe in the measurement pipe is wrong each other
Open, to prevent extraneous light from entering the measurement pipe;The combination of above-mentioned part causes when carrying out water quality judgement, it is to avoid under water
The influence of light, makes the water surface image of shooting more accurate, with the precision for monitoring of further increasing water quality;(3)Pass through flexibility mark
Chi, the periphery of the measurement pipe make the water provided with parts such as float, the directive wheels for being suitable to make the measurement pipe bubble through the water column vertically
Environmental monitoring system, which can be swum in, carries out level measuring on the water surface, to obtain more accurate water level value.
Brief description of the drawings
In order that present disclosure is more likely to be clearly understood, below according to specific embodiment and with reference to accompanying drawing,
The present invention is further detailed explanation, wherein
The structural representation of the monitoring water environment system of Fig. 1 present invention.
The rotating mechanism of Fig. 2 present invention, controller, the connection diagram of camera 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 structural representation 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, sleeve pipe 8-1, annular seal space 8-2, stepper motor 8-3, motor 8-4, rotating shaft 8-5, spacing 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.
Embodiment
Below in conjunction with the accompanying drawings and embodiment the present invention is described in detail:
Embodiment 1
Such as Fig. 1, a kind of monitoring water environment system, including:
Measurement pipe 1, its lower port is provided with lighting device and the lower port enters upstream face 2 suitable for entirety when in use, on
Port sets a camera device, and the camera device is suitable to shoot the water surface image 2-1 in the measurement pipe 1;
Video acquisition module, is connected with the camera device suitable for collection image is transformed into digital picture;
The image processing module being connected with the video acquisition module, the image processing module is stored with first sample number
According to the first sample data are suitable to 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;
Peripheral located at the measurement pipe is used to making the float that the measurement pipe is vertically bubbled through the water column, the float be dish type and
Fixed cover is 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 the working condition for controlling 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 to carry out gray proces to the digital picture, to obtain the water surface image 2-1
Gray value, the gray value and first sample data, which are compared, 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 built-in 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 just 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 | 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>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., can be by water body overall gray level thus in water quality detection
Corresponding water quality conclusion is calculated, can also be by the processing hands of the higher levels such as sample extraction, neutral net, pattern-recognition
Section, accomplishes to detect the water quality index that turbidity etc. is more refined.
If for example, the water surface image 2-1 detected gray scale is 85, showing that the water quality is suitable with the water quality of river.
Embodiment two
On the basis of embodiment one, the influence in order to avoid ambient to water surface image 2-1, the camera device with
Upper port is tightly connected, and the inwall of the measurement pipe 1, which is provided with, is suitable to light-absorbing black coating.
Embodiment three
See Fig. 2, further, on the basis of embodiment two, in order to further avoid influence of the light to shooting under water, with
The water surface image 2-1 shot brightness, the accuracy of colourity 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 sleeve pipe that through hole is distributed with is arranged on the body below the water surface 2
8-1;Described sleeve pipe 8-1 and one is suitable to the rotating mechanism drive connection that driving sleeve pipe 8-1 is rotated around the measurement pipe 1, this turn
Motivation structure is controlled by a controller being connected with the camera device, in not filming surface image 2-1, controls the rotating machine
Structure drives sleeve pipe 8-1 to rotate so that the through hole on through hole and sleeve pipe 8-1 in the measurement pipe 1 coincide and is suitable for current circulation;
In filming surface image 2-1, control the rotating mechanism to drive sleeve pipe 8-1 to rotate so that through hole in the measurement pipe 1 and
Through hole on sleeve pipe 8-1 offsets one from another, to prevent extraneous light from entering the measurement pipe 1.
The embodiment that the rotating mechanism control sleeve pipe is rotated around the measurement pipe 1:
See Fig. 3, annular seal space 8-2 formed between the bottom lower surface of the measurement pipe 1 and sleeve pipe 8-1 bottom upper surface,
Annular seal space 8-2 is provided 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 sleeve pipe 8-1 in the measurement 1 is set to coincide or offset one from another(In through hole figure
It is not drawn into), stepper motor 8-3 support is fixed on the bottom lower surface of the measurement pipe 1, and center and the institute of the support
The center for stating bottom lower surface is corresponding, i.e., coaxial, and rotating shaft one end of the stepper motor 8-3 is with described sleeve pipe 8-1's
Bottom upper surface is connected to drive sleeve pipe 8-1 to be rotated around the measurement pipe 1, and stepper motor 8-3 is by controller control.
Stepper motor 8-3 rotating shaft one end can also be fixed on the bottom lower surface of the measurement pipe 1, support is coaxially solid
Due to described sleeve pipe 8-1 bottom upper surface, when stepper motor 8-3 is rotated, because rotating shaft is fixed, it will not rotate, then machine
Seat will rotate, i.e., support drives sleeve pipe 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, motor 8-4 support is fixed on described
The bottom lower surface of measurement pipe 1, and the center of the bottom lower surface and the center of the support are corresponding, i.e., it is coaxial,
Rotating shaft 8-5 one end of the motor 8-4 is connected with described sleeve pipe 8-1 bottom upper surface, because motor 8-4 is in rotation
When be difficult control rotate angle, so a spacing cross bar 8-6 is provided with the rotating shaft 8-5 of the motor 8-4, in institute
The bottom upper surface for stating sleeve pipe 8-1 is provided with two pairs of gag lever posts, and the spacing 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 rotates around the measurement pipe 1, and two pairs of gag lever posts define the motor 8-4 anglec of rotation.
Fig. 5, specific work process are seen, if the spacing cross bar 8-6 two 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 sleeve pipe 8-1 in the measurement pipe 1 coincide, and the spacing cross bar 8-6 two 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 sleeve pipe 8-1 in the measurement pipe 1 offsets one from another, with
Prevent light from entering measurement pipe 1.
When camera device prepares to shoot, motor 8-4 control rotating shafts 8-5 drives spacing 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 sleeve pipe in the measurement pipe 1
Through hole on 8-1 is offset one from another, and to prevent extraneous light from entering the measurement pipe 1, camera device is shot, and shooting is finished,
Motor 8-4 is inverted, when the spacing 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 sleeve pipe 8-1 in measurement pipe 1 coincide, and current is circulated.
Gag lever post can also be substituted using stopper slot in certain this scheme, and the width of rebate of the stopper slot is more than described
Spacing cross bar 8-6.
Example IV
On the basis of embodiment one to three, the measurement of water level is carried out, the technical scheme is as follows:
Also include the column that float in float in pipe, the pipe is the center through hole with vertical setting in the measurement pipe 1
Structure, the image mechanism is suitable to shoot the water surface image in the center through hole, and float is suitable to the water surface in institute in the pipe
State and fluctuated in measurement pipe 1;Make water surface image 2-1 edge more by shooting the water surface image 2-1 in pipe in float
Clearly, it is easy to extract water surface image 2-1 area.
Embodiment five
See Fig. 6, on the basis of embodiment one to three, the scheme for carrying out level measuring is as follows:
A camera device is installed with the upper port of the measurement pipe 1, the periphery of the measurement pipe 1, which is provided with, to be suitable to make
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 solid in addition
It is fixed.
The monitoring water environment system also includes:
Flexible scale 4, and one end is fixed on the bottom, the other end and a phase of wrap-up 5 for being suitable to the winding flexible scale 4
Even, the wrap-up 5 is fixed on the top of the measurement pipe 1;
Directive wheel 6, on the inwall of the measurement pipe 1, on the inwall 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 to from the upper guide rod 7-1, lower guiding
Bar 7-2 is passed through and is fitted on the inner side 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 using camera device in filming surface image 2-1, to clap simultaneously
Take the photograph and be directed to the flexible scale 4 that wheel 6 is propped up, the scale of flexible scale 4 is easy to be photographed after being propped up, and has just obtained actual water
Position.
Due to the very little of directive wheel 6, carry out water quality detection when, the water surface image 2-1 of shooting led during gray proces
It can be ignored to parts such as wheel, scales, the gray value for not interfering with water surface image 2-1 is calculated.
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 carry out edge extracting using Canny detective operators for gray component, to obtain water surface image
2-1 each area pixel value, specific steps are referring to patent of invention, and 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, Huang Lei, Liu Wenbo paper " the gray level image side based on CNN
Gray-scale edges are extracted in the research of template parameter in edge extraction algorithm " and are also described in detail, the present invention can similarly be used
The algorithm.
Periodical《Nanjing Aero-Space University》2006, " image border based on cell neural network was carried Huang Lei paper
Take algorithm research " in describing the method for carrying out edge extracting to image using neutral net, this method is applied equally to
The present invention.
Obviously, above-described embodiment is only intended to clearly illustrate example of the present invention, and is not to the present invention
The restriction of embodiment.For those of ordinary skill in the field, it can also be made on the basis of the above description
Its various forms of changes or variation.There is no necessity and possibility to exhaust all the enbodiments.And these belong to this hair
Among the obvious changes or variations that bright spirit is extended out is still in protection scope of the present invention.