CN118038470A - Water gauge water level identification method and device, electronic equipment and storage medium - Google Patents

Water gauge water level identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118038470A
CN118038470A CN202410170794.XA CN202410170794A CN118038470A CN 118038470 A CN118038470 A CN 118038470A CN 202410170794 A CN202410170794 A CN 202410170794A CN 118038470 A CN118038470 A CN 118038470A
Authority
CN
China
Prior art keywords
water gauge
image
determining
scale
water
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.)
Pending
Application number
CN202410170794.XA
Other languages
Chinese (zh)
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.)
Nantong Haisai Future Digital Technology Co ltd
Original Assignee
Nantong Haisai Future Digital Technology Co ltd
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 Nantong Haisai Future Digital Technology Co ltd filed Critical Nantong Haisai Future Digital Technology Co ltd
Priority to CN202410170794.XA priority Critical patent/CN118038470A/en
Publication of CN118038470A publication Critical patent/CN118038470A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

The invention discloses a water gauge water level identification method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an original water gauge image corresponding to a target water gauge, and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image; determining an image gray feature based on the water gauge image to be analyzed, and determining the water gauge scale cycle number corresponding to the target water gauge according to the image gray feature; and determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number. Based on the technical scheme, the acquired water gauge image is processed to obtain the image gray scale characteristics corresponding to the image, and the image gray scale characteristics are analyzed to obtain the corresponding water gauge scale cycle number, so that the water level scale of the water gauge is determined, the accuracy of water gauge water level identification is improved, and the technical effect of improving the water level identification accuracy is achieved.

Description

Water gauge water level identification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of water level monitoring technologies, and in particular, to a method and apparatus for identifying a water level of a water gauge, an electronic device, and a storage medium.
Background
In many fields such as hydrologic monitoring, channel management, water conservancy facility operation and ship navigation safety, it is important to accurately acquire real-time water level information, and the traditional water gauge reading method is to identify the water level scale of the water gauge through a scheme of manual visual observation or image identification.
However, although the existing image recognition scheme can improve the data acquisition precision and the automation level to a certain extent, the technical difficulty of effectively recognizing the scale marks and corresponding values of the water gauge is high under the condition of complex background processing such as water ripple interference, uneven illumination and the like, and the accuracy of the water gauge reading cannot be guaranteed.
Disclosure of Invention
The invention provides a water gauge water level identification method, a device, electronic equipment and a storage medium, which are used for processing acquired water gauge images, determining corresponding image gray scale characteristics, analyzing the image gray scale characteristics to obtain corresponding scale periods, and further determining the water level scale of a target water gauge according to the scale periods so as to solve the problem of inaccurate water gauge water level identification in the prior art, and achieve the technical effect of improving the water level identification accuracy.
According to an aspect of the present invention, there is provided a water gauge water level identification method, the method comprising:
acquiring an original water gauge image corresponding to a target water gauge, and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image;
determining an image gray feature based on the water gauge image to be analyzed, and determining the water gauge scale cycle number corresponding to the target water gauge according to the image gray feature;
And determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number.
According to another aspect of the present invention, there is provided a water gauge water level identification device, the device comprising:
The water gauge image processing module is used for acquiring an original water gauge image corresponding to a target water gauge and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image;
The water gauge scale period determining module is used for determining image gray features based on the water gauge image to be analyzed and determining the water gauge scale period number corresponding to the target water gauge according to the image gray features;
And the water level scale determining module is used for determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the water gauge water level identification method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a water gauge water level identification method according to any one of the embodiments of the present invention.
According to the technical scheme, the original water gauge image corresponding to the target water gauge is obtained, the water gauge image to be analyzed corresponding to the target water gauge is determined based on the original water gauge image, the image gray feature is determined based on the water gauge image to be analyzed, the water gauge scale cycle number corresponding to the target water gauge is determined according to the image gray feature, and finally the water level scale corresponding to the target water gauge can be determined based on the water gauge scale cycle number. Based on the technical scheme, the acquired water gauge image is processed to obtain the image gray scale characteristics corresponding to the image, and the image gray scale characteristics are analyzed to obtain the corresponding water gauge scale cycle number, so that the water level scale of the water gauge is determined, the accuracy of water gauge water level identification is improved, and the technical effect of improving the water level identification accuracy is achieved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a water gauge water level identification method provided by an embodiment of the invention;
FIG. 2 is a flow chart of a water gauge water level identification method provided by an embodiment of the invention;
FIG. 3 is a schematic illustration of an original water gauge image provided by an embodiment of the present invention;
FIG. 4 is a schematic illustration of a mask water gauge image provided by an embodiment of the present invention;
Fig. 5 is a schematic diagram of a minimum rotation bounding box corresponding to a maximum connected domain according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a water gauge image to be processed provided by an embodiment of the present invention;
FIG. 7 is a schematic diagram of a recognition result of the number of scale cycles of the water gauge according to the embodiment of the present invention;
FIG. 8 is a block diagram of a water gauge water level identification device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a schematic flow chart of a water level identification method of the present invention, where the present embodiment may be adapted to determine corresponding image gray features according to a water level image corresponding to a target water level, determine a corresponding water level scale period according to the gray image features, and finally determine a water level scale of the target water level according to the water level scale period.
As shown in fig. 1, the method includes:
S110, acquiring an original water gauge image corresponding to a target water gauge, and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image.
The target water gauge can be a water gauge which needs to be identified. The original water gauge image can be understood as an original image corresponding to the target water gauge, which is photographed by the image collecting device. The water gauge image to be analyzed can be obtained by processing the original graph.
Specifically, an original water gauge image corresponding to the target device is collected through an image collecting device arranged near the target water gauge, and after the original water gauge image is collected, the original water gauge image is processed to obtain a water gauge image to be analyzed, for example, the original water gauge image is subjected to image segmentation, and then an image background in the original water gauge image is removed, so that the influence of the image background on a water gauge identification result is avoided. When the target water gauge needs to be identified, an original water gauge image corresponding to the target water gauge is acquired from an image database, wherein the image database can be a preset database for storing water gauge images corresponding to the water gauges, for example, the water gauge position corresponding to the target water gauge is acquired, and the original water gauge image corresponding to the target water gauge is obtained by matching from the image database based on the water gauge position.
On the basis of the above technical solution, the determining, based on the original water gauge image, a water gauge image to be analyzed corresponding to the target water gauge includes: processing the original water gauge image based on a water gauge image segmentation model, and determining a mask water gauge image corresponding to the original water gauge image; carrying out connected domain analysis on the mask water gauge image, and determining a maximum connected domain corresponding to the mask water gauge image; and determining the water gauge image to be analyzed based on the maximum connected domain and the original water gauge image.
The water gauge image segmentation model is a neural network model which is obtained through training in advance. A mask water gauge image may be understood as a mask image corresponding to the original image extracted by a water gauge image segmentation model. The connected domain analysis may be an image analysis method for finding areas in an image that have the same pixel value and are adjacent in position. The maximum connected domain can be understood as the connected domain with the largest number of pixels in the mask water gauge image.
Specifically, a water gauge image segmentation model can be trained in advance, the water gauge image segmentation model can be a neural network model based on ISNet or UNet, in the process of training the water gauge image segmentation model, the performance of the finally obtained model can be improved by collecting historical water gauge images, marking the pixels associated with the water gauge in the water gauge image as 1, marking other pixels as 0, further obtaining a final training set, training the model based on the training set to obtain the water gauge image segmentation model, and the method can be used for enhancing data such as random folding, rotation, scaling, random shielding and the like in the training process. And after the original water gauge image is obtained, the original water gauge image can be input into a water gauge image segmentation model to obtain a mask water gauge image output by the water gauge image segmentation model, a connected domain analysis algorithm is executed on the obtained mask water gauge image, for example, the connected domain analysis algorithm can be findContours functions in an OpenCV library, at least one connected domain corresponding to the mask water gauge image is obtained, statistics of the area or the pixel number is carried out on all the connected domains, the connected domain with the largest area is selected and used as the largest connected domain corresponding to the mask water gauge image, and the water gauge image to be analyzed is determined based on the largest connected domain and the original water gauge image.
On the basis of the above technical solution, the determining the water gauge image to be analyzed based on the maximum connected domain and the original water gauge image includes: determining a minimum rotation bounding box corresponding to the maximum communication domain, and dividing the original water gauge image according to the minimum rotation bounding box and a preset pixel width to determine a water gauge image to be processed; and carrying out grey-scale treatment on the water gauge image to be treated, and determining the water gauge image to be analyzed.
The minimum rotation bounding box may be a three-dimensional cuboid that describes the boundaries and shape of the target water gauge. The preset pixel width may be understood as a pixel width value preset for normalizing the image, for example, the preset pixel width may be 32. The graying process may be a process of converting a color image into a gray image, and for example, a corresponding gray value may be obtained by calculating a weighted average of three channel components of red, green, and blue for each pixel of an RGB color image.
Specifically, the determined maximum connected domain is subjected to feature analysis and geometric operation, a minimum rotation bounding box which can completely enclose the maximum connected domain by a minimum volume is calculated, the calculated minimum rotation bounding box is combined with a preset pixel width, accurate image cutting or segmentation is performed on an original water gauge image, so that a water gauge image to be processed is obtained, and finally, the water gauge image to be processed is subjected to gray processing, so that the water gauge image to be analyzed is determined. The method comprises the steps of firstly calculating a covariance matrix corresponding to a maximum connected domain, then solving a characteristic value and a corresponding characteristic vector of the matrix, further arranging the obtained characteristic vector according to the characteristic value from large to small, constructing a rotation matrix by using the characteristic vector as a new coordinate axis substrate, calculating the maximum coordinate value and the minimum coordinate value of the maximum connected domain on three principal axes based on a rotated coordinate system, further obtaining the size (length, width and height) of a minimum rotation bounding box, determining the center position (origin), and further dividing an original water gauge image based on a preset pixel width and the minimum rotation bounding box after obtaining the minimum rotation bounding box corresponding to the maximum connected domain, so as to obtain a standardized water gauge image to be processed.
S120, determining image gray features based on the water gauge image to be analyzed, and determining the water gauge scale cycle number corresponding to the target water gauge according to the image gray features.
The image gray scale features are understood to be quantization features extracted from gray scale images and used for describing the properties or content of the images, such as gray scale histograms, gray scale intensity features, etc. The number of scale cycles of the water gauge can be the number of occurrences of two identical unit cycles on the water gauge, taking an E-type water gauge as an example, two identical-direction E's can be taken as one cycle once, and correspondingly, the number of scale cycles of the water gauge can be understood as the number of occurrences of the two identical-direction E's.
Specifically, the corresponding image gray scale characteristics are determined through the water gauge image to be analyzed, the water gauge scale cycle number corresponding to the target water gauge is determined through the analysis of the image gray scale characteristics, and it is to be noted that the original water gauge image is collected and the water gauge image of the part, which is often located above the water surface, of the target water gauge, and then the water gauge scale cycle number can represent the cycle number above the water surface. Illustratively, a gray histogram is calculated to analyze the gray distribution of the image, find out the gray interval representing the scale line, and apply a gray co-occurrence matrix (GLCM) or other texture analysis method to identify the repetitive pattern and periodic characteristics of the scale line, thereby obtaining the number of scale cycles corresponding to the target water scale.
On the basis of the technical scheme, the determining the image gray scale characteristic based on the water gauge image to be analyzed comprises the following steps: determining a pixel gray value corresponding to a preset pixel position based on the water gauge image to be analyzed; and determining the image gray scale characteristics corresponding to the water gauge image to be analyzed according to the pixel gray scale values.
The preset pixel position may be preset pixel position information, for example, may be a pixel of a second half of each pixel row of the water gauge image to be analyzed. The pixel gray value can be understood as gray information corresponding to a pixel point in the water gauge image to be analyzed.
Specifically, the pixel gray value corresponding to the preset pixel position is obtained from the water gauge image to be analyzed according to the preset pixel position, and the image gray feature corresponding to the water gauge image to be analyzed is determined according to the obtained pixel gray value, for example, the pixel gray value of the second half pixel of each pixel row in the water gauge image to be analyzed can be obtained, taking the pixel width of the water gauge image to be analyzed as 32 as an example, the pixel gray value of the 16 th to 32 th pixels of each pixel row needs to be obtained, and then the intensity signal corresponding to each pixel row is determined according to the pixel gray value, and the image gray feature corresponding to the water gauge image to be analyzed is determined according to all the intensity signals.
On the basis of the technical scheme, the determining the water gauge scale cycle number corresponding to the target water gauge according to the image gray scale characteristics comprises the following steps: determining a characteristic period corresponding to the image gray scale characteristic based on the image gray scale characteristic and a preset period analysis algorithm; and determining a period correlation coefficient sequence based on the characteristic period and the image gray scale characteristic, and determining the water gauge scale cycle number based on the period correlation coefficient sequence and the characteristic period.
The preset period analysis algorithm may be an algorithm for performing periodic analysis on the gray scale characteristics of the image, for example, may be LombScargle algorithm. The characteristic period may be the number of periods that the distance between adjacent graduation marks in the water gauge image exhibits on the gray scale image, for example, the number of pixel columns corresponding to one period. The periodic correlation coefficient sequence is used to represent a correlation coefficient between data of two adjacent periods, which may be a pearson correlation coefficient.
Specifically, based on the extracted gray features, the gray features of the image are analyzed by adopting LombScargle algorithm, corresponding feature periods are determined, then the correlation coefficient of the gray features at the corresponding positions of the current period and the next period is calculated, a period correlation coefficient sequence is formed, the period correlation coefficient sequence reflects the correlation degree of the gray features of the image along with the period change, then the period correlation coefficient sequence is analyzed, the peak point or the obvious change point of the correlation coefficient is found, the position most likely representing the actual scale interval of the water gauge is judged by combining with the feature period information, and the scale period number of the water gauge is determined according to the finally obtained position.
On the basis of the technical scheme, the determining the scale cycle number of the water gauge based on the cycle correlation coefficient sequence and the characteristic cycle comprises the following steps: determining a correlation threshold based on the periodic correlation coefficient sequence, and determining a start index and a stop index from the periodic correlation coefficient sequence according to the correlation threshold; the number of scale cycles of the water gauge is determined based on the start index, the end index, and the characteristic period.
Wherein the correlation threshold may be a correlation coefficient value for screening the target location from the sequence of phase correlation coefficients. The start index may be the index value of the first data in the periodic correlation coefficient sequence that is greater than the correlation threshold, and the end index may be understood as the index value of the last data in the periodic correlation coefficient sequence that is greater than the correlation threshold.
Specifically, in order to adapt to the influence caused by different weather and illumination conditions, a correlation threshold may be determined according to a periodic correlation coefficient sequence, for example, all data greater than 0 in the periodic correlation coefficient sequence may be summed, an average value of correlation coefficients is determined according to a summation result, the average value is used as a final correlation threshold, an initial subscript and a final subscript are determined from the periodic correlation coefficient sequence based on the correlation threshold, and then the scale cycle number of the water gauge, that is, the number of cycles of the target water gauge on the water level, is determined based on the initial subscript and the final subscript.
S130, determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number.
Specifically, the water level scale corresponding to the target water gauge may be determined according to the preset water gauge scale cycle number by a preset water gauge scale calculation method, for example, the water level scale corresponding to the target water gauge may be determined according to the preset water gauge length minus the length of the water gauge scale cycle number.
On the basis of the above technical scheme, the determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number includes: acquiring a standard length of the water gauge and a period length of the water gauge corresponding to the target water gauge; and determining the water level scale value based on the water gauge scale cycle number, the water gauge standard length and the water gauge cycle length.
The standard length of the water gauge can be understood as the length of the water gauge corresponding to the target water gauge, the period length of the water gauge can be understood as the period length corresponding to the target water gauge, and the E-type water gauge is taken as an example, and the length between two E's can be taken as one period length.
Specifically, the standard length and the periodic length of the water gauge corresponding to the target water gauge are obtained, and then the water level scale value is determined based on the number of water gauge scale periods, the standard length of the water gauge and the periodic length of the water gauge, and it is required to say that the corresponding specifications of the water gauges with different specifications are different, so that the corresponding standard length and the corresponding periodic length of the water gauge are required to be determined according to the specifications of the target water gauge, and correct calculation of the water level scale value is guaranteed. The length value of the water gauge on the water surface can be determined based on the water gauge scale cycle number and the water gauge cycle length, and then the water gauge standard length is subtracted from the length value of the water gauge on the water surface to obtain the water level scale value corresponding to the target water gauge.
According to the technical scheme, the original water gauge image corresponding to the target water gauge is obtained, the water gauge image to be analyzed corresponding to the target water gauge is determined based on the original water gauge image, the image gray feature is determined based on the water gauge image to be analyzed, the water gauge scale cycle number corresponding to the target water gauge is determined according to the image gray feature, and finally the water level scale corresponding to the target water gauge can be determined based on the water gauge scale cycle number. Based on the technical scheme, the acquired water gauge image is processed to obtain the image gray scale characteristics corresponding to the image, and the image gray scale characteristics are analyzed to obtain the corresponding water gauge scale cycle number, so that the water level scale of the water gauge is determined, the accuracy of water gauge water level identification is improved, and the technical effect of improving the water level identification accuracy is achieved.
Example two
Fig. 2 is a flowchart of a water gauge water level identification method according to an embodiment of the present invention, where the water gauge water level identification method is further optimized based on the above embodiment. The specific implementation manner can be seen in the technical scheme of the embodiment. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
Determining a mask water gauge image: specifically, by collecting a historical water gauge image, marking the water gauge pixels in the historical water gauge image as 1 and marking other pixels as 0 by adopting a manual marking method, further forming a training set of the model, training the model to be trained based on the training set to obtain a water gauge image segmentation model, inputting an original water gauge image into the water gauge image segmentation model, and obtaining a mask water gauge image corresponding to the original water gauge image, wherein the original water gauge image is shown in fig. 3, and the mask water gauge image is shown in fig. 4. It should be noted that, in the training process, data enhancement methods such as random turnover, rotation, scaling, random shielding and the like can be used, and a neural network model of when to structure can be selected according to requirements, for example, a ISNet neural network or a UNet neural network can be used.
Determining a water gauge image to be analyzed: specifically, a method of connected domain analysis is used for a mask water gauge image, only the connected domain with the largest area is reserved, so that some noise results predicted by a segmentation model can be filtered, after the largest connected domain is obtained, a smallest rotating bounding box corresponding to the largest connected domain is determined, as shown in fig. 5, namely, a rotating rectangle with the smallest area of the connected domain can be enclosed, the length and width of the rotating rectangle are recorded as ori_height and ori_width respectively, but because the smallest rotating bounding box has a rotating angle, in order to obtain a standardized result for further analysis, perspective transformation can be performed on the smallest rotating bounding box according to a preset pixel width, the smallest rotating bounding box is projected onto a conventional rectangle without rotating angle, and the width and height of the conventional rectangle are respectively width=32 and height=floor (ori_height/ori_width) 32), the floor is processed downwards, so that a water gauge image to be processed can be obtained, as shown in fig. 6, and the grey scale image to be processed can be subjected to grey scale analysis, and the water gauge image can be obtained.
Determining the scale cycle number of the water gauge: specifically, after the water gauge image to be analyzed is obtained, a corresponding pixel gray value can be extracted from the water gauge image to be analyzed based on a preset pixel position, and further, an image gray characteristic corresponding to the water gauge image to be analyzed is determined based on the pixel gray value, and the gray value of the second half part of each line of the gray map can be summed and recorded as an intensity signal of the pixel line, and finally, an intensity characteristic with the length of height is obtained. I.e., feature [ j ] = Σ i≥16 gray_img [ i, j ]; where j=0, 1,2, …, height-1. The gray value of the second half of each line is considered only to prevent the signal period from being searched by an irregular signal influence algorithm such as the number on the left of the image. And further, carrying out period analysis on the image gray scale characteristics by using LombScargle algorithm to obtain characteristic periods corresponding to the image gray scale characteristics, and recording the characteristic periods as P. And then, based on the characteristic period, P and the gray level characteristic of the image, carrying out autocorrelation analysis, determining the starting point and the horizontal plane of the water gauge, namely the starting point and the ending point of the periodic signal, and determining the pearson correlation sequence according to the period:
correlation[i]=pearson_function(feature[i:i+P],feature[i+P:i+2P]);
Where pearson_function is a pearson correlation function, i=0, 1, …, height-2P.
After determining the periodic correlation coefficient sequence, in order to ensure that the starting point and the ending point of the periodic signal can still be screened under different weather and illumination conditions, all data greater than 0 in the periodic correlation coefficient sequence can be summed, an average value of the correlation coefficients is determined according to the summation result, the average value is used as a final correlation threshold T, a start index and a stop index are determined from the periodic correlation coefficient sequence based on the correlation threshold, then the T is used as a threshold, and the index value of the first value greater than T and the index value of the last value greater than T in the correlation are searched and respectively marked as start_index and last_index. Last_index=last_index+2p, and the positioning result is shown in fig. 7. That is, the start_index is the start index of the periodic signal, and the last_index is the end index of the periodic signal. The number of scale cycles of the water gauge is (last_index-start_index)/P.
Determining the scale value of the water gauge: specifically, the length value of the water gauge on the water surface is determined based on the water gauge scale cycle number and the water gauge cycle length, and then the water gauge standard length subtracts the length value of the water gauge on the water surface to obtain the water level scale value corresponding to the target water gauge, namely the actual length of the water gauge on the water surface is:
on_water_length= (last_index-start_index)/p_two_e_length; the two E length is the standard length of two E of the E-type water gauge, namely the length of an actual period, which is generally 10cm, and is specifically determined according to the specification of the water gauge. Finally, the scale of the water gauge is that the actual total length of the water gauge subtracts the length of the water gauge on the horizontal plane.
According to the technical scheme, the original water gauge image corresponding to the target water gauge is obtained, the water gauge image to be analyzed corresponding to the target water gauge is determined based on the original water gauge image, the image gray feature is determined based on the water gauge image to be analyzed, the water gauge scale cycle number corresponding to the target water gauge is determined according to the image gray feature, and finally the water level scale corresponding to the target water gauge can be determined based on the water gauge scale cycle number. Based on the technical scheme, the acquired water gauge image is processed to obtain the image gray scale characteristics corresponding to the image, and the image gray scale characteristics are analyzed to obtain the corresponding water gauge scale cycle number, so that the water level scale of the water gauge is determined, the accuracy of water gauge water level identification is improved, and the technical effect of improving the water level identification accuracy is achieved.
Example III
Fig. 8 is a block diagram of a water gauge water level recognition device according to an embodiment of the present invention. As shown in fig. 8, the apparatus includes: a water gauge image processing module 810, a water gauge scale period determination module 820, and a water level scale determination module 830.
The water gauge image processing module 810 is configured to obtain an original water gauge image corresponding to a target water gauge, and determine a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image;
a water scale cycle determining module 820, configured to determine an image gray feature based on the water scale image to be analyzed, and determine a water scale cycle corresponding to the target water scale according to the image gray feature;
The water level scale determining module 830 is configured to determine a water level scale corresponding to the target water scale based on the number of water scale cycles.
On the basis of the technical scheme, the water gauge image processing module is used for processing the original water gauge image based on a water gauge image segmentation model and determining a mask water gauge image corresponding to the original water gauge image, wherein the water gauge image segmentation model is a neural network model obtained through pre-training; carrying out connected domain analysis on the mask water gauge image, and determining a maximum connected domain corresponding to the mask water gauge image; and determining the water gauge image to be analyzed based on the maximum connected domain and the original water gauge image.
On the basis of the technical scheme, the water gauge image processing module is used for determining a minimum rotation bounding box corresponding to the maximum communication domain, and dividing the original water gauge image according to the minimum rotation bounding box and a preset pixel width to determine a water gauge image to be processed; and carrying out grey-scale treatment on the water gauge image to be treated, and determining the water gauge image to be analyzed.
On the basis of the technical scheme, the water gauge scale period determining module is used for determining a pixel gray value corresponding to a preset pixel position based on the water gauge image to be analyzed; and determining the image gray scale characteristics corresponding to the water gauge image to be analyzed according to the gray scale pixel values.
On the basis of the technical scheme, the water gauge scale period determining module is used for determining a characteristic period corresponding to the image gray scale characteristic based on the image gray scale characteristic and a preset period analysis algorithm; and determining a period correlation coefficient sequence based on the characteristic period and the image gray scale characteristic, and determining the water gauge scale cycle number based on the period correlation coefficient sequence and the characteristic period.
On the basis of the technical scheme, the water gauge scale period determining module is used for determining a correlation threshold value based on the period correlation coefficient sequence and determining a start index and a stop index from the period correlation coefficient sequence according to the correlation threshold value; the number of scale cycles of the water gauge is determined based on the start index, the end index, and the characteristic period.
On the basis of the technical scheme, the water level scale determining module is used for acquiring the standard length of the water gauge and the period length of the water gauge corresponding to the target water gauge; and determining the water level scale value based on the water gauge scale cycle number, the water gauge standard length and the water gauge cycle length.
According to the technical scheme, the original water gauge image corresponding to the target water gauge is obtained, the water gauge image to be analyzed corresponding to the target water gauge is determined based on the original water gauge image, the image gray feature is determined based on the water gauge image to be analyzed, the water gauge scale cycle number corresponding to the target water gauge is determined according to the image gray feature, and finally the water level scale corresponding to the target water gauge can be determined based on the water gauge scale cycle number. Based on the technical scheme, the acquired water gauge image is processed to obtain the image gray scale characteristics corresponding to the image, and the image gray scale characteristics are analyzed to obtain the corresponding water gauge scale cycle number, so that the water level scale of the water gauge is determined, the accuracy of water gauge water level identification is improved, and the technical effect of improving the water level identification accuracy is achieved.
The water gauge water level identification device provided by the embodiment of the invention can execute the water gauge water level identification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 9 shows a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 9, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM12 and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as method XXX.
In some embodiments, method XXX may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. One or more of the steps of method XXX described above may be performed when the computer program is loaded into RAM13 and executed by processor 11. Alternatively, in other embodiments, processor 11 may be configured to perform method XXX by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The water gauge water level identification method is characterized by comprising the following steps of:
acquiring an original water gauge image corresponding to a target water gauge, and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image;
determining an image gray feature based on the water gauge image to be analyzed, and determining the water gauge scale cycle number corresponding to the target water gauge according to the image gray feature;
And determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number.
2. The method of claim 1, wherein the determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image comprises:
Processing the original water gauge image based on a water gauge image segmentation model, and determining a mask water gauge image corresponding to the original water gauge image, wherein the water gauge image segmentation model is a neural network model obtained through training in advance;
Carrying out connected domain analysis on the mask water gauge image, and determining a maximum connected domain corresponding to the mask water gauge image;
And determining the water gauge image to be analyzed based on the maximum connected domain and the original water gauge image.
3. The method of claim 2, wherein the determining the water gauge image to be analyzed based on the maximum connected domain and the original water gauge image comprises:
determining a minimum rotation bounding box corresponding to the maximum communication domain, and dividing the original water gauge image according to the minimum rotation bounding box and a preset pixel width to determine a water gauge image to be processed;
And carrying out grey-scale treatment on the water gauge image to be treated, and determining the water gauge image to be analyzed.
4. The method of claim 1, wherein the determining an image gray scale feature based on the water gauge image to be analyzed comprises:
Determining a pixel gray value corresponding to a preset pixel position based on the water gauge image to be analyzed;
And determining the image gray scale characteristics corresponding to the water gauge image to be analyzed according to the pixel gray scale values.
5. The method of claim 1, wherein determining the number of water scale cycles corresponding to the target water scale from the image gray scale features comprises:
determining a characteristic period corresponding to the image gray scale characteristic based on the image gray scale characteristic and a preset period analysis algorithm;
and determining a period correlation coefficient sequence based on the characteristic period and the image gray scale characteristic, and determining the water gauge scale cycle number based on the period correlation coefficient sequence and the characteristic period.
6. The method of claim 5, wherein said determining the number of water gauge scale cycles based on the sequence of cycle correlation coefficients and the characteristic cycle comprises:
Determining a correlation threshold based on the periodic correlation coefficient sequence, and determining a start index and a stop index from the periodic correlation coefficient sequence according to the correlation threshold;
The number of scale cycles of the water gauge is determined based on the start index, the end index, and the characteristic period.
7. The method of claim 1, wherein the determining a water level scale corresponding to the target water scale based on the number of water scale cycles comprises:
acquiring a standard length of the water gauge and a period length of the water gauge corresponding to the target water gauge;
and determining the water level scale value based on the water gauge scale cycle number, the water gauge standard length and the water gauge cycle length.
8. A water gauge water level identification device, comprising:
The water gauge image processing module is used for acquiring an original water gauge image corresponding to a target water gauge and determining a water gauge image to be analyzed corresponding to the target water gauge based on the original water gauge image;
The water gauge scale period determining module is used for determining image gray features based on the water gauge image to be analyzed and determining the water gauge scale period number corresponding to the target water gauge according to the image gray features;
And the water level scale determining module is used for determining the water level scale corresponding to the target water gauge based on the water gauge scale cycle number.
9. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the water gauge water level identification method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the water gauge water level identification method of any one of claims 1-7.
CN202410170794.XA 2024-02-06 2024-02-06 Water gauge water level identification method and device, electronic equipment and storage medium Pending CN118038470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410170794.XA CN118038470A (en) 2024-02-06 2024-02-06 Water gauge water level identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410170794.XA CN118038470A (en) 2024-02-06 2024-02-06 Water gauge water level identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118038470A true CN118038470A (en) 2024-05-14

Family

ID=90992779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410170794.XA Pending CN118038470A (en) 2024-02-06 2024-02-06 Water gauge water level identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118038470A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100195883A1 (en) * 2007-06-28 2010-08-05 Patriarche Julia W System and method for automatically generating sample points from a series of medical images and identifying a significant region
CN111220235A (en) * 2018-11-23 2020-06-02 杭州海康威视数字技术股份有限公司 Water level monitoring method and device
CN116071692A (en) * 2022-12-26 2023-05-05 山东大学 Morphological image processing-based water gauge water level identification method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100195883A1 (en) * 2007-06-28 2010-08-05 Patriarche Julia W System and method for automatically generating sample points from a series of medical images and identifying a significant region
CN111220235A (en) * 2018-11-23 2020-06-02 杭州海康威视数字技术股份有限公司 Water level monitoring method and device
CN116071692A (en) * 2022-12-26 2023-05-05 山东大学 Morphological image processing-based water gauge water level identification method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MOHAMMADI, B等: "Simulation of Titicaca lake water level fluctuations using hybrid machine learning technique integrated with grey wolf optimizer algorithm", 《WATER》, vol. 12, no. 11, 27 October 2020 (2020-10-27), pages 1 - 18 *
叶莹鋆: "基于深度学习的图像识别水位方法的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 2, 15 February 2022 (2022-02-15), pages 138 - 1087 *

Similar Documents

Publication Publication Date Title
CN115861135B (en) Image enhancement and recognition method applied to panoramic detection of box body
CN112837290B (en) Crack image automatic identification method based on seed filling algorithm
CN110210448B (en) Intelligent face skin aging degree identification and evaluation method
CN112989995B (en) Text detection method and device and electronic equipment
CN115330796A (en) Copper wire tinning defect identification method
CN115937101A (en) Quality detection method, device, equipment and storage medium
CN113705564B (en) Pointer type instrument identification reading method
CN113723314A (en) Sugarcane stem node identification method based on YOLOv3 algorithm
CN115205163B (en) Method, device and equipment for processing identification image and storage medium
CN118038470A (en) Water gauge water level identification method and device, electronic equipment and storage medium
CN114742849B (en) Leveling instrument distance measuring method based on image enhancement
CN115631370A (en) Identification method and device of MRI (magnetic resonance imaging) sequence category based on convolutional neural network
CN114693776A (en) Cable position information determining method, device, equipment and storage medium
Zhao et al. The combined cloud model for edge detection
CN112561991A (en) Level meter image identification method based on SURF (speeded Up robust features) feature extraction and color segmentation
CN113284115A (en) Steel coil tower shape identification method, system, medium and terminal
CN113158743B (en) Small target real-time detection and positioning method, system and equipment based on priori knowledge
CN117593780B (en) Wrinkle depth index determination method and device, electronic equipment and storage medium
CN116777930B (en) Image segmentation method, device, equipment and medium applied to tongue image extraction
CN117726239B (en) Engineering quality acceptance actual measurement method and system
CN114581890B (en) Method and device for determining lane line, electronic equipment and storage medium
CN117275130B (en) Intelligent access control verification system based on face recognition
CN116681697B (en) Cobalt removal measuring method and device for diamond compact and electronic equipment
CN114037865B (en) Image processing method, apparatus, device, storage medium, and program product
CN109145912B (en) Automatic digital instrument reading identification method

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