CN111739058A - Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering - Google Patents

Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering Download PDF

Info

Publication number
CN111739058A
CN111739058A CN202010496573.3A CN202010496573A CN111739058A CN 111739058 A CN111739058 A CN 111739058A CN 202010496573 A CN202010496573 A CN 202010496573A CN 111739058 A CN111739058 A CN 111739058A
Authority
CN
China
Prior art keywords
liquid level
image
free liquid
gaussian
gray
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.)
Granted
Application number
CN202010496573.3A
Other languages
Chinese (zh)
Other versions
CN111739058B (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.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
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 Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN202010496573.3A priority Critical patent/CN111739058B/en
Publication of CN111739058A publication Critical patent/CN111739058A/en
Application granted granted Critical
Publication of CN111739058B publication Critical patent/CN111739058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/215Motion-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/168Segmentation; Edge detection involving transform domain methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20152Watershed segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

A free liquid level identification and extraction method based on a watershed algorithm of Gaussian filtering belongs to the technical field of image processing and is used for solving the technical problem that the existing liquid level image is difficult to identify and extract the free liquid level. The method comprises the following steps: (1) and collecting a liquid level picture, and carrying out gray level processing on the picture to convert the picture into a binary image. (2) And performing convolution processing on the image after the gray processing by using Gaussian difference filtering, highlighting the edge with larger gradient in the gray value of the image, weakening the edge with smaller noise and gradient, and achieving the purpose of highlighting the edge of the free liquid level. (3) And carrying out watershed segmentation on the gradient image formed after the Gaussian difference filtering, and identifying and extracting the free liquid level. (4) And superposing the extracted free liquid level back to the liquid level image, and checking the segmentation effect. The method can accurately identify and extract the free liquid level of the image, and can be used in the technical field of physical model experiments of storage and transportation equipment such as aerospace and transportation.

Description

Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering
Technical Field
The invention belongs to the technical field of image processing, in particular to a free liquid level recognition and extraction method based on a watershed algorithm of Gaussian filtering, which can be used in the technical fields of aerospace, transportation and the like.
Background
With the advent of optical image measurement based techniques, contactless measurement of free liquid level by image acquisition equipment has grown. Post-processing the collected picture is the key for extracting the free liquid level by a non-contact measurement technology, and the most common free liquid level image segmentation algorithm at present comprises the following steps: a threshold-based segmentation algorithm, an edge-based segmentation algorithm.
The idea of thresholding for liquid level picture processing is to compute one or more gray level thresholds based on the gray level features of the image and compare the gray level of each pixel in the image with the threshold, and finally classify the pixel data comparison results into the appropriate categories. The most critical step of such segmentation algorithms is to set a criterion function to calculate the optimal gray threshold. Ferrera (2008) and the like process the liquid surface image by a threshold segmentation method and track the movement of the free liquid surface. The method is suitable for the images with target gray values uniformly distributed outside the background gray values, and has the advantages of small calculation amount, high operation efficiency and low segmentation efficiency.
Edge-based segmentation methods refer to gray-value-based edge detection, which is a method based on the observation that edge gray values exhibit a step-type or roof-type change. Jiang mei rong (2013), Tosun (2017), e.saatci (2018) all process the liquid level image using a segmentation method based on edge detection. The method has the greatest defect that the method is sensitive to noise, and even if the amplitude of the noise is small, when the frequency of the noise is large, the amplitudes of the first derivative and the second derivative of the noise are also large, so that an error detection result can be generated, and the method needs to be combined with a filter for use in many cases.
In view of the above problems, the gaussian difference function and the watershed algorithm can highlight the edge with large gradient change, accurately position the contour of the object with large gradient response, and have large gradient change at the boundary edge of the two objects, namely the liquid and air, so the invention tries to process the free liquid level image by using the gaussian difference function and the watershed algorithm, namely the watershed algorithm based on gaussian difference filtering, to extract the free liquid level of the fluid. The Gaussian difference filtering is to adjust the fuzzy degree of an image by utilizing a Gaussian difference function, and in the invention, the width of the free liquid level and the width of the Gaussian function bulge are set to be the same, and then the image is convoluted, so that the free liquid level is obtained by weakening the air and water area. The Sobel operator method is to calculate the gradient of each pixel of the image and separate the free liquid level according to the gradient condition. Furthermore, Lindeberg (1993) demonstrates that the convolution process with a gaussian kernel is the only filtering operation to achieve image scale variation (degree of blur).
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for identifying and extracting the free liquid level based on a watershed algorithm of Gaussian filtering, which can identify and extract the free liquid level through a liquid level image.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a method for identifying and extracting free liquid level based on a watershed algorithm of Gaussian filtering comprises the following steps:
firstly, carrying out gray level processing on the collected liquid level image to convert the liquid level image into a gray level image.
1.1) shooting the mode of free liquid level movement through experiments, collecting free liquid level images, classifying structural elements of the liquid level images, wherein the liquid level images are composed of water and air.
1.2) carrying out gray level processing on the liquid level image to obtain a gray level image consisting of water and air, wherein the gray level image can be regarded as an f (x, y) function. The free liquid level at the junction of water and air in the gray level image presents a dark slit and has a specific width, and the gradient change of the gray level value of the image at the free liquid level is large.
And secondly, performing convolution processing on the gray level image f (x, y) subjected to gray level processing by using Gaussian difference filtering to achieve the purpose of highlighting the edge of the free liquid level.
2.1) in the liquid image, the edge image gray scale gradient of the free liquid level changes greatly. The difference between two Gaussian functions is adopted in Gaussian difference filtering, the edge with larger gradient in the gray value of the gray image can be highlighted, noise and the edge with smaller gradient are weakened, and the expression is as follows:
Figure BDA0002523117980000021
wherein x, y represent image pixel locations; sigma represents a Gaussian distribution parameter and determines the smoothing degree of Gaussian filtering, wherein sigma1And σ2Respectively representing a first and a second gaussian distribution parameter; gσ(x, y) represents a two-dimensional Gaussian function, which is expressed as follows:
Figure BDA0002523117980000022
wherein the content of the first and second substances,
Figure BDA0002523117980000023
and
Figure BDA0002523117980000024
representing a first and a second gaussian function, respectively.
2.2) setting the value of σ in the Gaussian difference function DoG, i.e. σ1And σ2Making the width of the salient part of the Gaussian difference filter function the same as the width of the slit of the free liquid level in the gray level image f (x, y); empirically, the σ1The value range is 4-6, sigma2The value range is 4 to 6.
2.3) carrying out convolution processing on the gray level image f (x, y) after gray level processing by utilizing a Gaussian difference filter function, so that a slit obtains higher response, the response of small gray level change and residual noise at two sides of the slit is weakened, the free liquid level is highlighted, and an image g is obtained12
Figure BDA0002523117980000025
Thirdly, filtering the image g formed by the second Gaussian difference filtering12And (4) carrying out watershed segmentation, and identifying and extracting the free liquid level.
3.1) Gray level image g formed after Gaussian difference filtering12And converting the binary image into a binary image by using a Laplace operator, wherein a water body area in the binary image is represented by black, and an air area is represented by white.
And 3.2) calling a watershed algorithm based on OpenCV to perform watershed segmentation on the binary image in the step (3.1), and identifying and extracting a free liquid level.
The invention has the beneficial effects that: compared with the prior art, the watershed algorithm has good response to weak edges, has stable and higher accuracy on the wave surface segmentation of motion forms such as smooth surface, larger curvature and the like, and simultaneously can effectively eliminate the influence of noise by Gaussian difference filtering.
Drawings
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a schematic view of a liquid level image according to the present invention.
FIG. 3 is a schematic diagram of gray scale processing of a liquid level image according to the present invention.
FIG. 4 is a schematic diagram of Gaussian filtering of a liquid level image according to the present invention.
FIG. 5 is a schematic view of watershed segmentation of a liquid level image according to the present invention.
Detailed Description
The following detailed description of embodiments of the invention is provided in connection with the accompanying drawings.
A free liquid level recognition and extraction method based on a watershed algorithm of Gaussian filtering comprises the following steps:
referring to fig. 1, the method for identifying and extracting the free liquid level based on the watershed algorithm of the gaussian filtering comprises the following steps:
firstly, carrying out gray level processing on the collected liquid level image to convert the liquid level image into a gray level image.
1.1) shooting the mode of free liquid level movement through experiments, collecting free liquid level images (figure 2), and classifying structural elements of the liquid level images, wherein the liquid level images are composed of water and air.
1.2) carrying out gray level processing on the liquid level image to obtain a gray level image consisting of water and air, and referring to FIG. 3, the gray level image can be regarded as an f (x, y) function. The free liquid level at the junction of water and air in the gray level image presents a dark slit and has a specific width, and the gradient change of the gray level value of the image at the free liquid level is large.
And secondly, performing convolution processing on the gray level image f (x, y) subjected to gray level processing by using Gaussian difference filtering to achieve the purpose of highlighting the edge of the free liquid level.
2.1) in the liquid image, the edge image gray scale gradient of the free liquid level changes greatly. The difference between two Gaussian functions is adopted in Gaussian difference filtering, the edge with larger gradient in the gray value of the gray image can be highlighted, noise and the edge with smaller gradient are weakened, and the expression is as follows:
Figure BDA0002523117980000031
wherein x, y represent image pixel locations; sigma represents a Gaussian distribution parameter and determines the smoothing degree of Gaussian filtering, wherein sigma1And σ2Respectively representing first and second Gaussian distribution parametersCounting; gσ(x, y) represents a two-dimensional Gaussian function, which is expressed as follows:
Figure BDA0002523117980000041
wherein the content of the first and second substances,
Figure BDA0002523117980000042
and
Figure BDA0002523117980000043
representing a first and a second gaussian function, respectively.
2.2) setting σ in the Gaussian difference function DoG, i.e., σ1And σ2So that the width of the part of the protrusion of the Gaussian difference filter function is the same as the width of the free liquid level slit in the gray image f (x, y), sigma1And σ2The value was 5.
2.3) carrying out convolution processing on the gray level image f (x, y) after gray level processing by utilizing a Gaussian difference filter function, so that a slit obtains higher response, the response of small gray level change and residual noise at two sides of the slit is weakened, the free liquid level is highlighted, and an image g is obtained12Refer to fig. 4.
Figure BDA0002523117980000044
Thirdly, filtering the image g formed by the second Gaussian difference filtering12Watershed segmentation is performed to identify and extract free liquid level, see fig. 5.
3.1) Gray level image g formed after Gaussian difference filtering12And converting the binary image into a binary image by using a Laplace operator, wherein a water body area in the binary image is represented by black, and an air area is represented by white.
And 3.2) calling a watershed algorithm based on OpenCV to perform watershed segmentation on the binary image in the step (3.1), and identifying and extracting a free liquid level.
The above-mentioned embodiments only express the embodiments of the present invention, but not should be understood as the limitation of the scope of the invention patent, it should be noted that, for those skilled in the art, many variations and modifications can be made without departing from the concept of the present invention, and these all fall into the protection scope of the present invention.

Claims (2)

1. A method for identifying and extracting free liquid level based on a watershed algorithm of Gaussian filtering is characterized by comprising the following steps:
firstly, carrying out gray level processing on an acquired liquid level image to convert the acquired liquid level image into a gray level image;
1.1) acquiring a free liquid level image in a mode of shooting free liquid level movement through experiments, and classifying structural elements of the liquid level image, wherein the liquid level image consists of water and air;
1.2) carrying out gray level processing on the liquid level image to obtain a gray level image consisting of water and air, wherein the gray level image is regarded as an f (x, y) function; the free liquid level at the junction of water and air in the gray level image presents a slit and has a specific width, and the gradient change of the gray level value of the image at the free liquid level is large;
secondly, performing convolution processing on the gray level image subjected to gray level processing by adopting Gaussian difference filtering, and highlighting the edge of the free liquid level;
2.1) the difference between two Gaussian functions is adopted in Gaussian difference filtering, the edge with large gradient in the gray value of the gray image is highlighted, noise and the edge with small gradient are weakened, and the expression is as follows:
Figure FDA0002523117970000011
wherein x, y represent image pixel locations; sigma represents a Gaussian distribution parameter and determines the smoothing degree of Gaussian filtering, wherein sigma1And σ2Respectively representing a first and a second gaussian distribution parameter; gσ(x, y) represents a two-dimensional Gaussian function, which is expressed as follows:
Figure FDA0002523117970000012
wherein the content of the first and second substances,
Figure FDA0002523117970000013
and
Figure FDA0002523117970000014
representing a first and a second gaussian function, respectively;
2.2) setting the value of σ in the Gaussian difference function DoG, i.e. σ1And σ2Making the width of the salient part of the Gaussian difference filter function the same as the width of the slit of the free liquid level in the gray level image f (x, y);
2.3) carrying out convolution processing on the gray level image f (x, y) after gray level processing by utilizing a Gaussian difference filter function, so that a slit obtains higher response, the response of small gray level change and residual noise at two sides of the slit is weakened, the free liquid level is highlighted, and an image g is obtained12
Figure FDA0002523117970000015
Thirdly, filtering the image g formed by the second Gaussian difference filtering12Carrying out watershed segmentation, and identifying and extracting a free liquid level;
3.1) Gray level image g formed after Gaussian difference filtering12Converting the binary image into a binary image by using a Laplace operator, wherein a water body area in the binary image is represented by black, and an air area is represented by white;
and 3.2) calling a watershed algorithm based on OpenCV to perform watershed segmentation on the binary image in the step (3.1), and identifying and extracting a free liquid level.
2. The method of claim 1, wherein σ is the free liquid level recognition and extraction based on a Gaussian filtered watershed algorithm1The value range is 4-6, sigma2The value range is 4 to 6.
CN202010496573.3A 2020-06-03 2020-06-03 Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering Active CN111739058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010496573.3A CN111739058B (en) 2020-06-03 2020-06-03 Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010496573.3A CN111739058B (en) 2020-06-03 2020-06-03 Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering

Publications (2)

Publication Number Publication Date
CN111739058A true CN111739058A (en) 2020-10-02
CN111739058B CN111739058B (en) 2022-10-18

Family

ID=72648976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010496573.3A Active CN111739058B (en) 2020-06-03 2020-06-03 Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering

Country Status (1)

Country Link
CN (1) CN111739058B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112642022A (en) * 2020-12-31 2021-04-13 遵义师范学院 Infusion monitoring system and monitoring method
CN112906550A (en) * 2021-02-09 2021-06-04 哈尔滨理工大学 Static gesture recognition method based on watershed transformation
CN117876361A (en) * 2024-03-11 2024-04-12 烟台海上航天科技有限公司 Image processing method and system for high-risk operation of gas pipeline

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022233A (en) * 2016-10-28 2018-05-11 沈阳高精数控智能技术股份有限公司 A kind of edge of work extracting method based on modified Canny operators
CN109711284A (en) * 2018-12-11 2019-05-03 江苏博墨教育科技有限公司 A kind of test answer sheet system intelligent recognition analysis method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022233A (en) * 2016-10-28 2018-05-11 沈阳高精数控智能技术股份有限公司 A kind of edge of work extracting method based on modified Canny operators
CN109711284A (en) * 2018-12-11 2019-05-03 江苏博墨教育科技有限公司 A kind of test answer sheet system intelligent recognition analysis method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李东红等: "一种改进分水岭乳腺肿块图像分割方法", 《哈尔滨理工大学学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112642022A (en) * 2020-12-31 2021-04-13 遵义师范学院 Infusion monitoring system and monitoring method
CN112906550A (en) * 2021-02-09 2021-06-04 哈尔滨理工大学 Static gesture recognition method based on watershed transformation
CN112906550B (en) * 2021-02-09 2022-07-19 哈尔滨理工大学 Static gesture recognition method based on watershed transformation
CN117876361A (en) * 2024-03-11 2024-04-12 烟台海上航天科技有限公司 Image processing method and system for high-risk operation of gas pipeline
CN117876361B (en) * 2024-03-11 2024-05-10 烟台海上航天科技有限公司 Image processing method and system for high-risk operation of gas pipeline

Also Published As

Publication number Publication date
CN111739058B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN111739058B (en) Free liquid level recognition and extraction method based on watershed algorithm of Gaussian filtering
CN106934803B (en) method and device for detecting surface defects of electronic device
Paunwala et al. A novel multiple license plate extraction technique for complex background in Indian traffic conditions
CN105139386A (en) Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors
CN114399522A (en) High-low threshold-based Canny operator edge detection method
CN111932490A (en) Method for extracting grabbing information of visual system of industrial robot
Plissiti et al. Automated segmentation of cell nuclei in PAP smear images
Chang et al. Small retinal vessel extraction using modified Canny edge detection
Mo et al. A novel edge detection method based on adaptive threshold
Nain et al. Dynamic thresholding based edge detection
Sun et al. Research on image segmentation and extraction algorithm for bicolor water level gauge
Naeem et al. A framework to select edge detection method using multi-criteria decision making
CN111539242A (en) Millimeter wave imaging image processing method
Li et al. A hough line detection based glass surface defects recognition algorithm
Sharma et al. Analysis of proposed hybrid approaches for laplacian edge based image segmentation using morphological image processing
Korath et al. Separating touching and overlapping objects in particle images-A combined approach
Sharma et al. Maker based watershed transformation for image segmentation
Zhang A critical overview of image segmentation techniques based on transition region
Aicha et al. Morphological segmentation of the spleen from abdominal CT images
Garcia et al. Automatic tracking of arabidopsis thaliana root meristem in confocal microscopy
Samuel et al. Comparative Analysis of Lane Detection Method Using Matlab
Xuming et al. Edge detection of the low contrast welded joint image corrupted by noise
CN102081792A (en) Multi-scale red jujube image crack edge detection method based on wavelet transformation
Palacios et al. Multiresolution approaches for edge detection and classification based on discrete wavelet transform
Leborgne et al. Extracting noise-resistant skeleton on digital shapes for graph matching

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