CN108470338B - A kind of water level monitoring method - Google Patents

A kind of water level monitoring method Download PDF

Info

Publication number
CN108470338B
CN108470338B CN201810145473.9A CN201810145473A CN108470338B CN 108470338 B CN108470338 B CN 108470338B CN 201810145473 A CN201810145473 A CN 201810145473A CN 108470338 B CN108470338 B CN 108470338B
Authority
CN
China
Prior art keywords
image
water surface
mark post
water
water level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810145473.9A
Other languages
Chinese (zh)
Other versions
CN108470338A (en
Inventor
桂冠
孙颖异
熊健
范山岗
杨洁
潘金秋
樊亚萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Post and Telecommunication University
Original Assignee
Nanjing Post and Telecommunication University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201810145473.9A priority Critical patent/CN108470338B/en
Publication of CN108470338A publication Critical patent/CN108470338A/en
Application granted granted Critical
Publication of CN108470338B publication Critical patent/CN108470338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)
  • Image Processing (AREA)

Abstract

The present invention discloses a kind of water level monitoring method, solves the technical problem that prior art water level monitoring method is influenced vulnerable to light, water level monitoring error is larger.The present invention first acquires mark post and Surface Picture first, it is small followed by mark post brightness change and the water surface leads to the continually changing feature of brightness because ripple constantly changes, gray value is read to two images similar in the time taken by image processing techniques, and carry out calculus of differences, then the relational graph of difference gray average variance yields and coordinate is nearby drawn to the water surface in image, obtaining corresponding coordinate when gray average variance is mutated using Threshold Segmentation Algorithm is water surface coordinate, and water surface coordinate is smoothed in conjunction with statistical method, finally the mapping relations of mark post physical length and image coordinate is combined to calculate water level depth.The present invention can be accurately judged to the position of horizontal plane and real-time monitoring goes out the depth of water, have good robustness and real-time.

Description

A kind of water level monitoring method
Technical field
The present invention relates to a kind of water level monitoring methods, belong to technical field of image processing.
Background technique
The mark post with certain scale is mainly arranged in traditional water level monitoring method in water, by using taking the photograph Camera carries out shooting to the water surface and obtains the water surface and post image, is observed by the image that human eye obtains shooting, according to mark post On scale read current water level value, to achieve the purpose that water level monitoring.But since there are the natural rings such as light, weather Border factor, the resolution ratio of image for causing shooting to obtain is affected to some extent, especially under backlight situation, human eye almost without Method tells the graduation mark on water level and mark post, therefore the conventional method is larger by such environmental effects error.
As the rapid development of computer vision and image processing techniques can be efficiently using computer vision technique The image that video camera takes is handled and analyzed, and obtains required data, to realize the real-time prison to water level It surveys.
When being monitored using traditional technical solution to water level, to the image that video camera is shot, human eye is needed It to observe and determine the specific location of the water surface, and is compared with the scale on mark post in water, to obtain the specific letter of water level Breath.But due to the influence of the factors such as light and water surface ripple, prevent human eye is from accurately differentiating the quarter on water surface site and mark post Degree even influences the judgement of water level, so as to cause being difficult to achieve the purpose that water level monitoring.
Summary of the invention
It is an object of the invention to overcome deficiency in the prior art, a kind of water level monitoring method is provided, existing skill is solved The technical problem that art water level monitoring is influenced vulnerable to light, water level monitoring error is big.
In order to solve the above technical problems, the technical scheme adopted by the invention is that: a kind of water level monitoring method, including it is as follows Step:
Step A, the mark post with length scale is fixed on water level region to be measured, several mark posts of continuous acquisition and water surface institute Image in region;
Step B, gradation conversion is carried out to mark post and Surface Picture, and difference fortune is carried out to the gray value of wherein two images It calculates, obtains difference gray level image;
Step C, the longitudinal image for retaining mark post intercepts difference gray level image, seeks difference gray scale after intercepting by row The mean value and variance of gray value in image, and the product of mark post and water surface region mean value and variance is drawn out about the vertical seat of image Target relational graph;
Step D, corresponding ordinate when mutating for the first time is found out using Threshold Segmentation Algorithm, as the water surface is vertical sits Mark;
Step E, the water surface or more is calculated in conjunction with the mapping relations and water surface ordinate of practical mark post length and image coordinate The physical length of mark post scale subtracts the physical length of the above mark post scale of the water surface with mark post scale length, obtains current level Value.
As a further optimization solution of the present invention, mark post same a moment should be made when carrying out Image Acquisition to mark post and the water surface It is identical to spend various point locations ordinate on line.
As a further optimization solution of the present invention, mark post and water surface intersection figure need to be extracted in step B when gradation conversion Picture differentiates mark post and water surface intersection method particularly includes:
And water surface gray value continually changing feature constant using mark post gray value in image is handed over to differentiate mark post and the water surface At boundary.
As a further optimization solution of the present invention, the two images shooting interval of calculus of differences is carried out less than 30 Second.
As a further optimization solution of the present invention, the obtained difference gray level image of step B is also needed to carry out normalizing Change processing is in the gray value of difference gray level image between 0~255.
As a further optimization solution of the present invention, after need to being filtered for the relational graph that step C is drawn out again It is calculated for the Threshold segmentation in step D.
As a further optimization solution of the present invention, the obtained water surface ordinate of step D is also needed to carry out data smoothing The water surface ordinate that smoothing processing obtains is used for next step operation by processing, and the specific method is as follows for data smoothing processing:
Several width images are chosen from the image of several mark posts of continuous acquisition and water surface region, are walked two-by-two respectively The calculation process of rapid B to step D, obtains multiple water surface ordinates, carries out statistics smoothing processing to all water surface ordinates.
Compared with prior art, the beneficial effects obtained by the present invention are as follows being: utilizing mark post and water surface ripple brightness in image Change different features, the specific location of the water surface determined using grey scale difference monitoring method, using maximum variance between clusters come Threshold value is set and obtains the coordinate value of water level, exceptional value therein is filtered out using statistical method, in conjunction with physical length and image coordinate Mapping relations obtain depth of water numerical value, overcome conventional method vulnerable to the natural conditions factor such as light, weather influence and error compared with Big disadvantage, very good solution water level monitoring problem, can accomplish to go out accurate water level in real-time monitoring, have good Shandong Stick and real-time.
Detailed description of the invention
Fig. 1 is flow chart of the invention;
Fig. 2 is water level monitoring schematic diagram in the embodiment of the present invention;
Fig. 3 is the mean variance of difference gray level image and ordinate relational graph in the embodiment of the present invention.
Specific embodiment
The present invention combines traditional method that mark post is arranged in water, is clapped using video camera the water surface and mark post It takes the photograph, in obtained image, the brightness of mark post is basically unchanged, and the water surface leads to its brightness in the picture due to the variation of ripple Constantly changing, this be reflected in computer vision be exactly pixel value variation.According to this phenomenon, computer vision skill is utilized Art, obtains the pixel value of the image taken, and is converted into gray value, and it is poor to carry out to the gray value of two images similar in the time Partite transport is calculated, and grey scale difference image is obtained.Since the position of video camera and mark post is fixed, the only water level changed in image, The calculating for carrying out mean value and variance to gray value a certain range of near mark post and the water surface in grey scale difference image, obtains not The corresponding difference gray value with coordinate.When then finding out gray scale value mutation using threshold segmentation method, that is, maximum variance between clusters pair The coordinate position answered, as current water level coordinate.In order to filter out the influence of individual exceptional values, using statistical method, to the time It differs closer several width images and carries out calculus of differences two-by-two, statistical disposition is carried out to a series of obtained water level coordinates, obtains standard True water level coordinate information.The mapping relations for finally combining coordinate in practical mark post and image, can be calculated current tool Body water level value, that is, the depth of water.
The invention will be further described below in conjunction with the accompanying drawings.Following embodiment is only used for clearly illustrating the present invention Technical solution, and not intended to limit the protection scope of the present invention.
As shown in Figure 1, being flow chart of the invention, include the following steps:
Step 1: an overcasting staff is fixed in river region to be measured, as shown in Fig. 2, the length scale on mark post is convenient for The mapping relations of coordinate in physical length and image are calculated, rather than directly read scale.Mark post is faced in bank appropriate location Video camera is set, and the graduation mark holding of mark post is horizontal in the image for taking video camera, acquires mark post in real time by video camera With the realtime graphic of horizontal plane region.
Assuming that two graduation mark scales are a and b (a > b) on mark post, the vertical corresponding vertical seat in the image of video camera shooting It is designated as y1、y2(y1<y2Coordinate value is incremented by from top to bottom in image), then the mapping relations k of mark post length and image coordinate are as follows:
Step 2: it is smaller to read the time difference that two video cameras take using computer vision and image processing techniques Image.Since the time difference was less than 30 seconds, it is believed that water level does not change, and only the variation of water surface ripple leads to the change of image Change.
Step 3: due in image the brightness change of mark post and the water surface change of gray value is only reflected as in computer vision Change, therefore acquired image is subjected to gray processing processing, is converted into gray level image.
Step 4: two gray level images that step 3 is obtained carry out calculus of differences, and carry out at the normalization of gray value Reason, range 0-255, obtained normalized difference gray level image.
Step 5: what is changed in image only has horizontal plane since video camera and mark post position are fixed.In difference gray scale The approximate location that mark post is marked out in image, the width coordinate for obtaining mark post is x3、x4(x3<x4)。
Step 6: the mean value and variance of gray value are sought difference gray level image by row, wherein capable width is x4-x3, and draw Relational graph of the product of mark post and water surface region mean variance about image ordinate out, as shown in Figure 3
Step 7: being filtered to the mean value image in Fig. 3, the influence of noise is removed.I.e. most using Threshold Segmentation Algorithm Big Ostu method, finding out corresponding ordinate when promutation in Fig. 3 is yw, water surface ordinate as in image.
Maximum variance between clusters principle is as follows:
Maximum variance between clusters mainly think that image can be divided into two parts of background and target, and partitioning standards are choosing Certain threshold value is taken, so that the variance of the gray value between background and target is maximum.Inter-class variance between background and target Size shows the similarity of background and target, and variance is bigger, illustrates that this two-part difference is bigger.When partial target or back Scape is labelled unjustifiably when being divided into background or target, and inter-class variance can all become smaller.Therefore, inter-class variance gets corresponding ash when maximum value Angle value can be used as the threshold value of image segmentation, also imply that the misclassification probability of background and target is minimum.
(1) grey level histogram of image is established, it is assumed that image shares L gray level, and the number that each gray value i occurs For ni, probability pi, gray scale total number is N, then
(2) probability of occurrence of background and target is calculated, calculation method is as follows:
Where it is assumed that t is selected gray threshold, A represents background, then pAFor the probability that background occurs, similarly B is mesh Mark, pBThe probability occurred for target.
(3) inter-class variance in two regions of background A and target B is calculated separately:
σ2=pAA0)2+pBB0)2 (9)
Wherein, ωAAnd ωBThe respectively average gray value of background and target area;
ω0For the global average gray of gray level image;
σ2For the inter-class variance in two regions of background A and target B.
(4) three steps have only been calculated for the inter-class variance on single gray value more than, therefore optimal threshold should be The inter-class variance of background A and target B is enabled to obtain the gray value of maximum value in image.
Step 8: for the accuracy for guaranteeing result, when collecting a new image every time, to including current acquired image Continuous 11 width image before carries out above-mentioned processing two-by-two respectively, obtains 100 water surface coordinates, divide after sorting from small to large It Wei not yd1、yd2…yd99、yd100.Cast out wherein larger and lesser 20 numerical value, to intermediate remaining 60 numerical value yd21、 yd22…yd79、yd80Average value processing, water surface ordinate of the obtained HCCI combustion as current time are carried out, and substitutes previous step Obtained in yw
Step 9: reality can be calculated in conjunction with the mapping relations of the mark post length and image length that acquire in the first step More than the border water surface to the length L between mark post scale a are as follows:
L=k (yw-y1) (10)
It can thus be concluded that depth of water H is
The as depth of water numerical value at current time.
The present invention feature different with water surface ripple brightness change using mark post in image, using grey scale difference monitoring method It determines the specific location of the water surface, threshold value is set using maximum variance between clusters and obtains the coordinate value of water level, using statistics side Method filters out exceptional value therein, obtains depth of water numerical value in conjunction with the mapping relations of physical length and image coordinate, overcomes traditional water Position monitoring method is influenced vulnerable to the natural conditions factor such as light, weather and the larger disadvantage of error, very good solution water level prison Survey problem can accomplish to go out accurate water level in real-time monitoring have good robustness and real-time.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations Also it should be regarded as protection scope of the present invention.

Claims (7)

1. a kind of water level monitoring method, which comprises the steps of:
Step A, the mark post with length scale is fixed on water level region to be measured, several mark posts of continuous acquisition and water surface location The image in domain;
Step B, gradation conversion is carried out to mark post and Surface Picture, and calculus of differences is carried out to the gray value of wherein two images, Obtain difference gray level image;
Step C, the longitudinal image for retaining mark post intercepts difference gray level image, seeks difference gray level image after intercepting by row The mean value and variance of middle gray value, and the product of mark post and water surface region mean value and variance is drawn out about image ordinate Relational graph;
Step D, corresponding ordinate, the as water surface ordinate when mutating for the first time are found out using Threshold Segmentation Algorithm;
Step E, the above mark post of the water surface is calculated in conjunction with the mapping relations and water surface ordinate of practical mark post length and image coordinate The physical length of scale subtracts the physical length of the above mark post scale of the water surface with mark post scale length, obtains current level value.
2. water level monitoring method according to claim 1, which is characterized in that answered when carrying out Image Acquisition to mark post and the water surface When keeping various point locations ordinate on mark post identical graduation line identical.
3. water level monitoring method according to claim 1, which is characterized in that mark post need to be extracted in step B when gradation conversion With water surface intersection image, mark post and water surface intersection are differentiated method particularly includes:
And water surface gray value continually changing feature constant using mark post gray value in image differentiates mark post and water surface intersection.
4. water level monitoring method according to claim 1, which is characterized in that when carrying out the two images shooting of calculus of differences Between interval less than 30 seconds.
5. water level monitoring method according to claim 1, which is characterized in that the difference gray level image obtained for step B It also needs to be normalized, is in the gray value of difference gray level image between 0~255.
6. water level monitoring method according to claim 1, which is characterized in that the relational graph drawn out for step C need to be into The Threshold segmentation being used further in step D after row filtering processing calculates.
7. water level monitoring method according to claim 1, which is characterized in that the water surface ordinate obtained for step D is also Data smoothing processing need to be carried out, the water surface ordinate that smoothing processing obtains is used for next step operation, the tool of data smoothing processing Body method is as follows:
Several width images are chosen from the image of several mark posts of continuous acquisition and water surface region, carry out step B two-by-two respectively To the calculation process of step D, multiple water surface ordinates are obtained, statistics smoothing processing is carried out to all water surface ordinates.
CN201810145473.9A 2018-02-12 2018-02-12 A kind of water level monitoring method Active CN108470338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810145473.9A CN108470338B (en) 2018-02-12 2018-02-12 A kind of water level monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810145473.9A CN108470338B (en) 2018-02-12 2018-02-12 A kind of water level monitoring method

Publications (2)

Publication Number Publication Date
CN108470338A CN108470338A (en) 2018-08-31
CN108470338B true CN108470338B (en) 2019-09-20

Family

ID=63266559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810145473.9A Active CN108470338B (en) 2018-02-12 2018-02-12 A kind of water level monitoring method

Country Status (1)

Country Link
CN (1) CN108470338B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815865B (en) * 2019-01-11 2021-11-16 江河瑞通(北京)技术有限公司 Water level identification method and system based on virtual water gauge
CN110443243B (en) * 2019-08-07 2022-06-07 浙江大华技术股份有限公司 Water level monitoring method, storage medium, network device and water level monitoring system
CN111721361A (en) * 2020-06-29 2020-09-29 杭州鲁尔物联科技有限公司 Embankment monitoring system, method and equipment
CN113191331A (en) * 2021-05-27 2021-07-30 中国原子能科学研究院 Real-time monitoring device and method for air pulse conditions in pulse extraction column
CN113243329B (en) * 2021-07-01 2021-09-24 青岛明赫渔业工程科技有限责任公司 Intelligent farming systems based on thing networking
CN115345854B (en) * 2022-08-16 2023-04-18 中国水利水电科学研究院 Water level identification method based on multi-region search

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364263A (en) * 2008-09-28 2009-02-11 腾讯科技(深圳)有限公司 Method and system for detecting skin texture to image
CN101976441B (en) * 2010-11-09 2012-07-18 东华大学 Method for extracting Sobel operator filtering profile for representing fabric texture and fractal detail mixed characteristic vector
CN102589461A (en) * 2012-01-17 2012-07-18 华中科技大学 Image-based snow depth measuring method
CN103487104B (en) * 2013-07-03 2016-06-15 青岛大学 A kind of image acquisition identification system and method for capillary pipe liquid level type data
CN106803070A (en) * 2016-12-29 2017-06-06 北京理工雷科电子信息技术有限公司 A kind of port area Ship Target change detecting method based on remote sensing images
CN107131925A (en) * 2017-04-28 2017-09-05 南京邮电大学 A kind of water level real-time monitoring method based on image procossing
CN107036672B (en) * 2017-06-02 2020-02-18 中国水利水电科学研究院 Water level monitoring method and device
CN107506798B (en) * 2017-08-31 2020-07-10 四创科技有限公司 Water level monitoring method based on image recognition

Also Published As

Publication number Publication date
CN108470338A (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN108470338B (en) A kind of water level monitoring method
CN108416766B (en) Double-side light-entering type light guide plate defect visual detection method
CN107248159A (en) A kind of metal works defect inspection method based on binocular vision
CN108470356B (en) Target object rapid ranging method based on binocular vision
CN110853015A (en) Aluminum profile defect detection method based on improved Faster-RCNN
CN109242870A (en) A kind of sea horizon detection method divided based on image with textural characteristics
CN107358627B (en) Fruit size detection method based on Kinect camera
CN110210448B (en) Intelligent face skin aging degree identification and evaluation method
CN109580630A (en) A kind of visible detection method of component of machine defect
CN107392929A (en) A kind of intelligent target detection and dimension measurement method based on human vision model
CN111354047B (en) Computer vision-based camera module positioning method and system
CN109211198A (en) A kind of intelligent Target detection and measuring system and method based on trinocular vision
CN108186051A (en) A kind of image processing method and processing system of the automatic measurement fetus Double Tops electrical path length from ultrasonoscopy
CN109813725A (en) A kind of large scale glue defect inspection method
CN114926407A (en) Steel surface defect detection system based on deep learning
CN110096980A (en) Character machining identifying system
CN110533686A (en) Line-scan digital camera line frequency and the whether matched judgment method of speed of moving body and system
CN110189375A (en) A kind of images steganalysis method based on monocular vision measurement
CN109886170A (en) A kind of identification of oncomelania intelligent measurement and statistical system
CN109409290A (en) A kind of thermometer calibrating reading automatic recognition system and method
CN109410139A (en) Inside a kind of historical relic and surface disease digital assay appraisal procedure
CN111665199A (en) Wire and cable color detection and identification method based on machine vision
CN111199245A (en) Rape pest identification method
CN113252103A (en) Method for calculating volume and mass of material pile based on MATLAB image recognition technology
CN112801141B (en) Heterogeneous image matching method based on template matching and twin neural network optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant