CN117011531A - Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation - Google Patents

Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation Download PDF

Info

Publication number
CN117011531A
CN117011531A CN202311101039.8A CN202311101039A CN117011531A CN 117011531 A CN117011531 A CN 117011531A CN 202311101039 A CN202311101039 A CN 202311101039A CN 117011531 A CN117011531 A CN 117011531A
Authority
CN
China
Prior art keywords
image
bubbles
distance
bubble
watershed
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
CN202311101039.8A
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.)
Sichuan University
Original Assignee
Sichuan 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 Sichuan University filed Critical Sichuan University
Priority to CN202311101039.8A priority Critical patent/CN117011531A/en
Publication of CN117011531A publication Critical patent/CN117011531A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns

Landscapes

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

Abstract

The embodiment of the application discloses a method, a device and equipment for extracting adhesion bubbles from dynamic ice images based on watershed segmentation. The method comprises the following steps: performing distance transformation on the preprocessed binary image, and obtaining a distance image by the opposite number of the minimum distance from the pixel point of the central part of the bubble in the binary image to the background; performing histogram equalization on the distance image to ensure that the brightness of the adhered air bubble is as high as that of the central part of the larger air bubble existing nearby, thereby obtaining an adjustment image; obtaining a local minimum value from the adjustment image, and marking the point where the local minimum value is located to obtain a marked image; according to the marking points, watershed transformation is carried out on the pretreatment binary image to obtain a watershed dividing line, the watershed dividing line is inverted, and OR operation is carried out on the watershed dividing line and the pretreatment binary image to obtain a dividing image of the adhesion bubble. The method can effectively solve the problem that the effect of dividing the adhesion bubbles is poor in the prior art when the adhesion bubbles are extracted from the dynamic ice image.

Description

Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation
The application relates to a method, a device and equipment for extracting adhesion bubbles from dynamic ice images, which are applied separately from the prior application of the applicant, wherein the prior application has the application number of CN202210638584. X.
Technical Field
The application relates to the technical field of image processing, in particular to a method, a device and equipment for extracting adhesion bubbles from dynamic ice images based on watershed segmentation.
Background
When an aircraft passes through the cloud cover, supercooled water drops strike the engine body, and then phase change can occur and icing can be caused. Icing can change the appearance and the bypass flow field of an airplane, damage the aerodynamic performance, reduce the operability and the stability, threaten the flight safety and cause air accident when serious. Aircraft icing is essentially a dynamic icing process of supercooled water droplets. The supercooled water impinges on the low temperature substrate to freeze, and the formed ice with unevenly distributed bubbles is dynamic ice. Bubbles in dynamic ice are fundamental factors that determine the physical characteristics of dynamic ice. By analyzing the characteristics of bubble content, distribution, aperture and the like in the dynamic ice microstructure, the physical characteristics of the dynamic ice are researched, a scientific and effective icing protection means can be established, and the flight safety of the aircraft is ensured.
The characteristics of bubble content, distribution, aperture and the like in the microstructure of the dynamic ice are researched, a bubble image in the dynamic ice needs to be obtained, but adhesion bubbles exist in the dynamic ice, and when the bubbles are extracted from the dynamic ice image, the adhesion bubbles are difficult to extract. At present, a watershed algorithm based on mark control can be used for dividing adhered bubbles or particles, and the method has a good dividing effect when the sizes of the bubbles or particles are the same. However, when the size of the stuck bubbles in the dynamic ice is greatly different, it is difficult to mark the small bubbles, and thus it is difficult to divide the stuck small bubbles. In addition, when larger bubbles having an area larger than that of the blocking bubbles exist in the vicinity of the blocking bubbles in the dynamic ice, it is difficult to mark the blocking bubbles, and thus it is difficult to divide the blocking bubbles.
Therefore, the prior art has a problem of poor effect of dividing the adhesion bubbles when extracting the adhesion bubbles from the dynamic ice image.
Disclosure of Invention
The inventor discovers through long-term practice that a watershed algorithm based on marking control obtains a distance image according to the minimum distance between a bubble pixel point in a preprocessed binary image and a background, and marks the distance image. Taking the point where the local minimum value in the distance image is located as an example, wherein the numerical value in the distance matrix of the distance image is related to the size of the bubble in the distance image, the larger the bubble is, the farther the minimum distance between the center part of the bubble and the background is, and the smaller the numerical value in the center part of the bubble in the distance matrix is after the minimum distance is inverted, and the lower the center brightness of the large bubble in the distance image is. When marking local minima in the distance image, the number of the central part of the large bubble is smaller than that of the small bubble in the local area, so that the central part of the small bubble is not marked, and the adhered small bubble is difficult to divide. Based on the method, the application provides a method for extracting adhesion bubbles from a dynamic ice image, and a distance image is obtained according to the minimum distance between bubble pixel points in a preprocessing binary image and a background; performing histogram equalization on the distance image, and adjusting the numerical value of the central part of each bubble in the distance matrix of the distance image to obtain an adjusted image; and acquiring the numerical value meeting the preset condition from the image matrix of the adjustment image, marking the point of the numerical value meeting the preset condition in the adjustment image to obtain a marked image, wherein the marked image comprises marked points of the central parts of all bubbles, and performing watershed transformation on the preprocessing binary image according to the marked points in the marked image to obtain a segmented image of the adhered bubbles. Therefore, the problem that the effect of dividing adhesion bubbles is poor in the prior art when the adhesion bubbles are extracted from dynamic ice images can be effectively solved.
In a first aspect, an embodiment of the present application provides a method for extracting adhesion bubbles from a dynamic ice image, the method including: s110, obtaining a distance image according to the minimum distance between the bubble pixel point in the preprocessing binary image and the background; s120, carrying out histogram equalization on the distance image to obtain an adjustment image; s130, acquiring a numerical value meeting a preset condition from an image matrix of the adjustment image, and marking a point where the numerical value meeting the preset condition is located in the adjustment image to obtain a marked image; s140, performing watershed transformation on the preprocessing binary image according to the marking points in the marking image to obtain a segmentation image of the adhesion air bubble.
In a second aspect, the embodiment of the application further provides a system for extracting adhesion bubbles from a dynamic ice image, the system comprises a distance acquisition unit, and the distance acquisition unit is used for acquiring a distance image according to the minimum distance between a bubble pixel point in a preprocessing binary image and a background; the adjusting unit is used for carrying out histogram equalization on the distance image to obtain an adjusted image; the marking unit is used for acquiring the numerical value meeting the preset condition from the image matrix of the adjustment image, marking the point where the numerical value meeting the preset condition is located in the adjustment image, and obtaining a marked image; and the watershed transformation unit is used for carrying out watershed transformation on the marked image according to the marked points in the marked image to obtain a segmented image of the adhered air bubbles.
In a third aspect, embodiments of the present application further provide an electronic device, including one or more processors; a memory; a screen for displaying the image in the foregoing method; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the aforementioned method.
In summary, the present application has at least the following technical effects:
1. taking the example of carrying out distance transformation on the preprocessed binary image and taking the distance image as an inverse, the application carries out histogram equalization on the distance image to be marked, so that the central brightness of a large bubble in the distance image is increased, the central brightness of a small bubble is reduced, namely the numerical value of the central part of the large bubble in the distance matrix is increased, the numerical value of the central part of the small bubble is reduced, and when marking the point where the local minimum is located, the numerical value of the central part of the bubble in the local area is prevented from being different due to the different sizes of the bubbles, and the numerical value of the central part of the small bubble is not recognized as the local minimum, so that the point where the central part of the small bubble is located cannot be marked. By using the method for extracting the adhesion bubbles from the dynamic ice image, when the size difference of the adhesion bubbles in the dynamic ice is large, and when larger bubbles with areas larger than the adhesion bubbles exist near the adhesion bubbles in the dynamic ice, the point where the central part of the adhered small bubbles is located can be marked, so that the effect of dividing the adhesion bubbles is better.
2. According to the application, bubbles are directly extracted from an original image through a preset neural network model, the first intermediate image containing complete large bubbles is extracted, then the original image is segmented, bubbles are extracted from a second segmented image block through the preset neural network model, a second intermediate image containing complete small bubbles is obtained, and the first intermediate image and the second intermediate image are subjected to OR operation, so that a preprocessed binary image containing complete large bubbles and complete small bubbles is obtained, the problems that textures in a dynamic ice image are identified as bubbles, the bubble boundaries are not clear, a large number of small bubbles are missed, holes exist in the extracted large bubbles and the like are avoided, so that the bubble effect extracted by the preprocessed binary image is better, and a foundation is established for improving the effect of segmentation adhesion bubbles.
Therefore, the scheme provided by the application can effectively solve the problem that the blocking air bubble segmentation effect is poor in the prior art when blocking air bubbles are extracted from dynamic ice images.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for extracting adhesion bubbles from a dynamic ice image according to embodiment 1 of the present application;
FIG. 2 is a micrograph showing blocking bubbles in dynamic ice as provided in example 1 of the present application;
FIG. 3 shows an original image of a dynamic ice microstructure provided by example 1 of the present application;
fig. 4 shows a distance image obtained by performing distance transformation and inversion on a preprocessed binary image according to embodiment 1 of the present application;
fig. 5 shows an adjustment image obtained by performing histogram equalization on a distance image according to embodiment 1 of the present application;
fig. 6 shows a marking image obtained by marking a point where a local minimum value is located in an adjustment image provided in embodiment 1 of the present application;
fig. 7 shows a marker image obtained without histogram equalization according to embodiment 1 of the present application;
FIG. 8 shows a segmented image of stuck bubbles using histogram equalization provided in example 1 of the present application;
FIG. 9 shows a segmented image of stuck bubbles without histogram equalization provided in example 1 of the present application;
FIG. 10 is a block diagram showing a system for extracting stuck bubbles from a dynamic ice image provided in embodiment 2 of the present application;
fig. 11 is a block diagram showing an electronic device for performing a method of extracting stuck bubbles from a dynamic ice image according to an embodiment of the present application, which is provided in embodiment 3 of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application 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 application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
At present, a watershed algorithm based on mark control can be used for dividing adhered bubbles or particles, and the method has a good dividing effect when the sizes of the bubbles or particles are the same. However, when the size of the stuck bubbles in the dynamic ice is greatly different, it is difficult to mark the small bubbles, and thus it is difficult to divide the stuck small bubbles. In addition, when larger bubbles having an area larger than that of the blocking bubbles exist in the vicinity of the blocking bubbles in the dynamic ice, it is difficult to mark the blocking bubbles, and thus it is difficult to divide the blocking bubbles.
Accordingly, in order to solve the above-mentioned drawbacks, an embodiment of the present application provides a method for extracting stuck bubbles from a dynamic ice image, the method comprising: obtaining a distance image according to the minimum distance between the bubble pixel point in the preprocessing binary image and the background; performing histogram equalization on the distance image, and adjusting the numerical value of the central part of each bubble in the distance matrix of the distance image to obtain an adjusted image; and acquiring the numerical value meeting the preset condition from the image matrix of the adjustment image, marking the point of the numerical value meeting the preset condition in the adjustment image to obtain a marked image, wherein the marked image comprises marked points of the central parts of all bubbles, and performing watershed transformation on the preprocessing binary image according to the marked points in the marked image to obtain a segmented image of the adhered bubbles. Therefore, the problem that the effect of dividing adhesion bubbles is poor in the prior art when the adhesion bubbles are extracted from dynamic ice images can be effectively solved.
The method for extracting blocking bubbles from a dynamic ice image according to the present application will be described.
Example 1
Referring to fig. 1 and 2, fig. 1 is a flow chart of a method for extracting blocking bubbles from dynamic ice images according to embodiment 1 of the present application, and fig. 2 is a microscopic schematic diagram of blocking bubbles in dynamic ice. In this embodiment, the method for extracting adhesion bubbles from the dynamic ice image may include the following steps:
step S110: and obtaining a distance image according to the minimum distance between the bubble pixel point in the preprocessing binary image and the background.
As shown in fig. 3, fig. 3 is an original image of a dynamic ice microstructure. And preprocessing the original image to obtain a preprocessed binary image.
In fig. 3, the upper box shows the case where the sizes of the adhered bubbles in the dynamic ice are greatly different, specifically, three bubbles having different sizes are adhered together, and among the three adhered bubbles, the uppermost bubble is the largest, the middle bubble is the second largest, and the lowermost bubble is the smallest.
In fig. 3, a case where there are large bubbles in the vicinity of the stuck bubbles in the dynamic ice, specifically, three bubbles are stuck together and the diameter of the large bubble in the vicinity is larger than any one of the three stuck bubbles, in which case the three stuck bubbles may be the same or different in size, and for convenience of description, fig. 3 shows a case where the three stuck bubbles are the same in size.
As an alternative embodiment, the step S110 further includes a substep S111.
Substep S111: and performing distance transformation on the preprocessing binary image, and obtaining the distance image according to the minimum distance between the bubble pixel point in the preprocessing binary image and the background.
In an exemplary embodiment, the distance transformation may be a euclidean distance transformation, a manhattan distance transformation, or other distance transformation methods.
The larger the bubble in the preprocessing binary image is, the larger the minimum distance between the pixel point of the central part of the bubble and the background is, the larger the numerical value of the central part of the bubble is in the distance matrix of the distance image, and the higher the central brightness of the bubble is in the distance image.
As another alternative embodiment, the step S110 further includes a substep S112.
Substep S112: and performing distance transformation and reversing on the preprocessing binary image, and obtaining the distance image according to the opposite number of the minimum distance from the bubble pixel point in the preprocessing binary image to the background.
The larger the bubble in the preprocessing binary image is, the smaller the opposite number of the minimum distance from the pixel point of the central part of the bubble to the background is, the smaller the numerical value of the central part of the bubble is in the distance matrix of the distance image, and the lower the central brightness of the bubble is in the distance image. As shown in fig. 4, fig. 4 is a distance image obtained by performing a distance conversion on the preprocessed binary image and inverting the same.
As can be seen from fig. 4, among the three stuck bubbles of the upper frame, the center portion of the uppermost bubble has the lowest brightness, the center portion of the middle bubble has the second lowest brightness, and the center portion of the lowermost bubble has the highest brightness, that is, the center portion of the uppermost bubble has the smallest value, the center portion of the middle bubble has the second smallest value, and the center portion of the lowermost bubble has the largest value in the distance matrix from the image.
As can be seen from fig. 4, of the three stuck bubbles and the larger bubbles present in the vicinity of the lower box, the central portions of the three stuck bubbles have the same brightness and are all higher than the central portions of the larger bubbles present in the vicinity, that is, the central portions of the three stuck bubbles have the same value and are all higher than the central portions of the larger bubbles present in the vicinity in the distance matrix from the image.
In the embodiment of the present application, the inverting may also be performed after step S120.
Step S120: and carrying out histogram equalization on the distance image to obtain an adjustment image.
Taking the preprocessing binary image as an example to perform distance conversion and take the inverse to obtain a distance image for explanation, performing histogram equalization on the distance image under the condition that the distance image is needed, so that the central brightness of large bubbles in the distance image is increased, the central brightness of small bubbles is decreased, namely the numerical value of the central part of the large bubbles in the distance matrix is increased, and the numerical value of the central part of the small bubbles is decreased, thereby obtaining an adjustment image. As shown in fig. 5, fig. 5 is an adjustment image obtained by histogram equalization of a distance image.
As can be seen from fig. 5, of the three adhesion bubbles of the upper box, the brightness of the central portions of the three adhesion bubbles is as high, that is, the numerical value of the central portions of the three adhesion bubbles is as large in the image matrix of the adjustment image.
As can be seen from fig. 5, among the three stuck bubbles and the larger bubbles present in the vicinity of the lower frame, the brightness of the central portions of the three stuck bubbles is as high as the brightness of the central portions of the larger bubbles present in the vicinity, that is, the numerical value of the central portions of the three stuck bubbles is as large as the numerical value of the central portions of the larger bubbles present in the vicinity in the image matrix of the adjustment image.
Step S130: and acquiring the numerical value meeting the preset condition from the image matrix of the adjustment image, and marking the point where the numerical value meeting the preset condition is located in the adjustment image to obtain a marked image.
As an alternative embodiment, if the step S110 includes the substep S111 and the preset condition is a local maximum, the step S130 includes the substep S131.
Substep S131: and acquiring the local maximum value from the image matrix of the adjustment image, and marking the point where the local maximum value is located in the adjustment image to obtain the marked image.
The local maxima may be: in adjusting the image matrix of the image, the maximum value of the numerical values in the local area. The local area may be an area that just covers the largest bubble in the adjustment image, such as the box shown in fig. 5, or may be an area that is slightly larger than the area that just covers the largest bubble in the adjustment image, which is not limited by the present application.
And carrying out iterative computation on the image matrix of the local area in the adjustment image, and obtaining a local maximum value in each iterative computation.
After the histogram equalization is performed on the distance image to obtain an adjustment image, the brightness of the central portions of the bubbles in the local area of the adjustment image is uniform, and the values of the central portions of the bubbles in the local area of the image matrix of the adjustment image are uniform, so that the value of the central portion of each bubble is the maximum value in the local area, and the point where the central portion of each bubble is located can be marked.
If histogram equalization is not performed, local maxima are directly obtained from a distance matrix of a distance image obtained by performing distance conversion on a preprocessed binary image, points where the local maxima are located are marked in the distance image, and since the brightness of the central parts of bubbles in the local areas of the distance image is inconsistent, the numerical values of the central parts of the bubbles in the local areas of the distance matrix of the distance image are inconsistent, only the bubbles with the largest numerical values in the central parts can be marked, and the bubbles with the non-largest numerical values in the central parts can be omitted.
As another alternative embodiment, if the step S110 includes the substep S112 and the preset condition is a local minimum, the step S130 includes the substep S132.
Sub-step S132: and acquiring the local minimum value from the image matrix of the adjustment image, and marking the point where the local minimum value is located in the adjustment image to obtain the marked image.
The local minima may be: in adjusting the image matrix of the image, the minimum value of the numerical values in the local area. The local area and the content of obtaining the local minimum may refer to the local area and the content of obtaining the local maximum in the substep S131, which is not described herein.
After the histogram equalization is performed on the distance image to obtain an adjustment image, the brightness of the central portions of the bubbles in the local area of the adjustment image is consistent, and the values of the central portions of the bubbles in the local area of the image matrix of the adjustment image are consistent, so that the value of the central portion of each bubble is the minimum value in the local area, and the point where the central portion of each bubble is located can be marked.
As shown in fig. 6, fig. 6 is a marking image obtained using the method of the present application.
As can be seen from fig. 6, out of the three adhesion bubbles of the upper box, points where the central portions of the three adhesion bubbles are located are marked.
As can be seen from fig. 6, out of the three stuck bubbles and the larger bubbles existing in the vicinity of the lower box, the points at which the central portions of the three stuck bubbles are located, and the points at which the central portions of the larger bubbles exist in the vicinity are marked.
If histogram equalization is not performed, local minima are directly obtained from the distance matrix of the distance image as shown in fig. 4, and points where the local minima are located are marked in the distance image, and since the brightness of the central portions of the bubbles in the local area of the distance image is not uniform, the values of the central portions of the bubbles in the local area of the distance matrix of the distance image are also not uniform, only the bubbles having the smallest values of the central portions can be marked, and the bubbles having the non-smallest values of the central portions can be omitted. The resulting marker image is shown in fig. 7 without histogram equalization.
As can be seen from fig. 7, only the point where the center portion of the uppermost largest bubble is located among the three adhesion bubbles of the upper box is marked, and the points where the center portions of the second largest bubble in the middle and the lowermost smallest bubble are located are all omitted.
As can be seen from fig. 7, of the three stuck bubbles and the larger bubble existing in the vicinity of the lower frame, only the point where the center portion of the larger bubble existing in the vicinity is located is marked, and the points where the center portions of the three stuck bubbles are located are all omitted.
Step S140: and carrying out watershed transformation on the preprocessing binary image according to the mark points in the mark image to obtain a segmentation image of the adhesion bubbles.
As an alternative embodiment, if the step S110 includes the sub-step S111, the step S140 includes the sub-step S141.
Sub-step S141: and carrying out watershed transformation on the pretreatment binary image according to the mark points in the mark image to obtain a watershed dividing line based on the mark points, and carrying out OR operation on the watershed dividing line and the pretreatment binary image to obtain a dividing image of the adhesion bubble.
In the embodiment of the application, as the point of the central part of each bubble is marked, the watershed transformation is carried out on the pretreatment binary image according to the marked point of each bubble, the watershed dividing line of each bubble can be obtained, and the watershed dividing line of each bubble and the pretreatment binary image are subjected to OR operation, so that the adhered bubbles are divided.
As another alternative, if the step S110 includes the substep S112, the step S140 includes the substep S142.
Sub-step S142: and carrying out watershed transformation on the pretreatment binary image according to the mark points in the mark image to obtain a watershed dividing line based on the mark points, inverting the watershed dividing line, and carrying out OR operation on the watershed dividing line and the pretreatment binary image to obtain a segmentation image of the adhesion bubble.
In the embodiment of the application, as the point of the central part of each bubble is marked, the watershed transformation is carried out on the pretreatment binary image according to the marked point of each bubble, the watershed dividing line of each bubble can be obtained, the watershed dividing line of each bubble is inverted, and then OR operation is carried out on the dividing line of each bubble and the pretreatment binary image, so that the adhered bubble is divided.
As shown in fig. 8, fig. 8 is a segmented image of an adhesion bubble obtained using the method of the present application.
As can be seen from fig. 8, of the three adhesion bubbles of the upper box, the three adhesion bubbles are all divided.
As can be seen from fig. 8, of the three adhesion bubbles of the lower box, the three adhesion bubbles are all divided.
If histogram equalization is not performed, the resulting segmented image of stuck bubbles is shown in fig. 9.
As can be seen from fig. 9, among the three stuck bubbles of the upper frame, since only the point where the center portion of the uppermost bubble is located is marked, neither the center bubble nor the center portion of the lowermost bubble is marked, and therefore only the uppermost bubble is divided, the center bubble and the lowermost bubble are not divided, and remain stuck together.
As can be seen from fig. 9, among the three adhesion bubbles of the lower frame, since the points where the central portions of the three adhesion bubbles are located are not marked, none of the three adhesion bubbles are divided and remain adhered together.
According to the method, the histogram equalization is carried out on the distance image to be marked, so that the situation that the numerical values of the central parts of the bubbles in the local area are different due to the fact that the sizes of the bubbles are different is avoided, the numerical values of the central parts of the small bubbles are not recognized as the numerical values meeting the preset conditions, and the point where the central parts of the small bubbles are located cannot be marked. By using the method for extracting the adhesion bubbles from the dynamic ice image, when the size difference of the adhesion bubbles in the dynamic ice is large, and when larger bubbles with areas larger than the adhesion bubbles exist near the adhesion bubbles in the dynamic ice, the point where the central part of the adhered small bubbles is located can be marked, so that the effect of dividing the adhesion bubbles is better.
In an exemplary embodiment, before the step S110, steps S101 to S104 are further included.
Step S101: and extracting bubbles from the original image through a preset neural network model to obtain a first intermediate image.
In the embodiment of the application, the original image of the dynamic ice can be a microscopic image or an image obtained by shooting the dynamic ice by a mobile phone camera, and the original image can be a color image or a gray image.
As an alternative embodiment, if the size of the original image is equal to the preset size, the bubbles are extracted from the original image through the preset neural network model, so as to obtain the first intermediate image.
As another optional implementation manner, if the size of the original image is not equal to the preset size, the size of the original image is adjusted to the preset size, air bubbles are extracted from the original image adjusted to the preset size through the preset neural network model, a first extracted image is obtained, and the first extracted image is restored to the size of the original image, so that the first intermediate image is obtained.
If the size of the original image is smaller than the preset size, the size of the original image is enlarged to be the preset size, air bubbles are extracted from the original image enlarged to be the preset size through a preset neural network model, a first extracted image is obtained, and the first extracted image is reduced to be the size of the original image, so that a first intermediate image is obtained.
If the size of the original image is larger than the preset size, the size of the original image is reduced to the preset size, air bubbles are extracted from the original image reduced to the preset size through a preset neural network model, a first extracted image is obtained, and the first extracted image is enlarged to the size of the original image, so that a first intermediate image is obtained.
As yet another alternative embodiment, if the size of the original image is smaller than the preset size, the bubbles are extracted from the original image through the preset neural network model, so as to obtain the first intermediate image.
The preset size may be a size set according to a computer resource limitation, such as 256×256 or 512×512.
The method of enlarging or reducing the original image may be an interpolation method, a method of reducing the first extracted image to the size of the original image or a method of enlarging the first extracted image to the size of the original image, or an interpolation method.
When the size of the original image is not equal to the preset size, the original image is adjusted to the preset size, so that the problem that the original image cannot be identified due to the limitation of computer resources is avoided, the first extracted image is restored to the size of the original image, and the loss of precision of the first intermediate image due to the size adjustment is avoided.
In the embodiment of the application, the preset neural network model can be a U-net network model added with an attention mechanism, an R2U-net model and other neural network models, and the application is not limited to the U-net network model.
According to the application, bubbles are extracted from the dynamic ice image through the preset neural network model, so that the problems that textures in the dynamic ice image are identified as bubbles, the bubble boundary identification is unclear and the like are avoided, and a basis is provided for extracting bubbles with better effect.
As an optional implementation manner, if the shape of the original image does not meet the input shape of the preset neural network model, the original image is filled into the input shape of the preset neural network model, and then step S101 is performed.
Step S102: dividing the original image into n second divided image blocks, wherein n is more than or equal to 2, and extracting bubbles from the n second divided image blocks through the preset neural network model respectively to obtain n second extracted image blocks.
According to the application, the dynamic ice image is divided into the second divided image blocks with smaller sizes, and the bubbles are respectively extracted from each second divided image block by using the preset neural network model, so that the small bubbles are prevented from being missed when the original image is too large in size and the bubbles are too small, and the extracted bubbles have better effect.
Step S103: and splicing the n second extracted image blocks into a second intermediate image according to a dividing position arrangement sequence, wherein the dividing position arrangement sequence is the arrangement sequence of the position of each second divided image block in the original image when the original image is divided into the n second divided image blocks.
In the embodiment of the application, the step of acquiring the first intermediate image may be performed first, then the step of acquiring the second intermediate image may be performed, then the step of acquiring the first intermediate image may be performed, and further the step of acquiring the first intermediate image and the step of acquiring the second intermediate image may be performed simultaneously.
Step S104: and performing OR operation on the first intermediate image and the second intermediate image to obtain a preprocessing binary image.
Specifically, small bubbles in the first intermediate image are omitted, large bubbles in the second intermediate image are provided with holes, OR operation is carried out on the first intermediate image and the second intermediate image, the omitted small bubbles and the holes in the large bubbles are supplemented, a pretreatment binary image is obtained, and the pretreatment binary image comprises complete small bubbles and complete large bubbles.
As an alternative implementation manner, the preprocessing binary image obtained in step S104 is subjected to an open operation, so as to obtain the preprocessing binary image with noise eliminated.
According to the application, bubbles are directly extracted from an original image through a preset neural network model, the first intermediate image containing complete large bubbles is extracted, then the original image is segmented, bubbles are extracted from a second segmented image block through the preset neural network model, a second intermediate image containing complete small bubbles is obtained, and the first intermediate image and the second intermediate image are subjected to OR operation, so that a preprocessed binary image containing both complete large bubbles and complete small bubbles is obtained, the effect of the bubbles extracted from the preprocessed binary image is better, and a foundation is established for improving the effect of segmentation adhesion bubbles.
Example 2
Referring to fig. 10, fig. 10 is a block diagram illustrating a system 1000 for extracting adhesion bubbles from a dynamic ice image according to embodiment 2 of the present application. The system may include: a distance acquisition unit 1010, an adjustment unit 1020, a labeling unit 1030, and a watershed transformation unit 1040.
And a distance obtaining unit 1010, configured to obtain a distance image according to the minimum distance between the bubble pixel point in the preprocessing binary image and the background.
And an adjusting unit 1020, configured to perform histogram equalization on the distance image, to obtain an adjusted image.
And the marking unit 1030 is configured to obtain a value meeting a preset condition from the image matrix of the adjustment image, and mark a point where the value meeting the preset condition is located in the adjustment image, so as to obtain a marked image.
The watershed transformation unit 1040 is configured to perform watershed transformation on the marked image according to the marked points in the marked image, so as to obtain a segmented image of the adhered air bubbles.
As an optional implementation manner, the distance acquiring unit 1010 includes a first distance acquiring subunit, configured to perform distance transformation on the preprocessed binary image, and obtain the distance image according to a minimum distance between a bubble pixel point in the preprocessed binary image and a background.
The marking unit 1030 includes a first marking subunit, configured to obtain a local maximum from an image matrix of the adjustment image, and mark a point where the local maximum is located in the adjustment image, so as to obtain the marked image.
The watershed transformation unit 1040 includes a first watershed transformation subunit, configured to perform watershed transformation on the preprocessed binary image according to the mark points in the marked image, to obtain a watershed division line based on the mark points, and perform an or operation on the watershed division line and the preprocessed binary image, to obtain a division image of the adhered air bubbles.
As another optional implementation manner, the distance acquiring unit 1010 further includes a second distance acquiring subunit, configured to perform distance transformation on the preprocessed binary image and invert the distance transformation, and obtain the distance image according to the opposite number of the minimum distance between the bubble pixel point in the preprocessed binary image and the background.
The marking unit 1030 further includes a second marking subunit, configured to obtain a local minimum value from the image matrix of the adjustment image, and mark a point where the local minimum value is located in the adjustment image, so as to obtain the marked image.
The watershed transformation unit 1040 includes a second watershed transformation subunit, configured to perform watershed transformation on the preprocessed binary image according to the mark points in the marked image, obtain a watershed dividing line based on the mark points, invert the watershed dividing line, and perform an or operation with the preprocessed binary image, so as to obtain a split image of the adhered air bubbles.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above described system and unit may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Example 3
Referring to fig. 11, fig. 11 is a block diagram illustrating an electronic device 1100 according to embodiment 3 of the present application. The electronic device 1100 of the present application may include one or more of the following components: memory 1110, processor 1120, screen 1130, and one or more application programs, wherein the one or more application programs may be stored in memory 1110 and configured to be executed by the one or more processors 1120, the one or more program configured to perform the methods as described in the foregoing method embodiments.
The Memory 1110 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (ROM). Memory 1110 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1110 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a histogram equalization function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data (e.g., image matrix data, etc.) created by the electronic device 1100 in use.
Processor 1120 may include one or more processing cores. The processor 1120 utilizes various interfaces and lines to connect various portions of the overall electronic device 1100, perform various functions of the electronic device 1100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1110, and invoking data stored in the memory 1110. Alternatively, the processor 1120 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1120 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU) and a modem etc. Wherein, the CPU mainly processes an operating system, application programs and the like; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1120 and may be implemented solely by a communication chip.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (5)

1. A method for extracting adhesion bubbles from dynamic ice images based on watershed segmentation, the method comprising:
s110, obtaining a distance image according to the minimum distance between the pixel point of the central part of the bubble in the preprocessing binary image and the background, wherein the method comprises the following steps:
performing distance transformation on the preprocessing binary image, and obtaining the distance image according to the opposite number of the minimum distance from the pixel point of the central part of the bubble in the preprocessing binary image to the background;
s120, carrying out histogram equalization on the distance image, and adjusting the numerical value of the central part of each bubble in the distance matrix of the distance image to ensure that the brightness of the adhered bubble is as high as that of the central part of a larger bubble nearby to obtain an adjusted image;
s130, obtaining a local minimum value from an image matrix of the adjustment image, and marking a point where the local minimum value is located in the adjustment image to obtain a marked image;
s140, carrying out watershed transformation on the preprocessing binary image according to the mark points in the mark image to obtain a watershed dividing line based on the mark points, inverting the watershed dividing line, and carrying out OR operation on the watershed dividing line and the preprocessing binary image to obtain a dividing image of the adhesion bubble.
2. The method for extracting stuck bubbles from a dynamic ice image based on watershed segmentation according to claim 1, wherein the distance transform is a euclidean distance transform or a manhattan distance transform.
3. The method for extracting adhesion bubbles from dynamic ice images based on watershed segmentation according to claim 1, further comprising, prior to step S110:
extracting bubbles from an original image through a preset neural network model to obtain a first intermediate image;
dividing the original image into n second divided image blocks, wherein n is more than or equal to 2, and extracting bubbles from the n second divided image blocks through the preset neural network model respectively to obtain n second extracted image blocks;
splicing the n second extracted image blocks into a second intermediate image according to a dividing position arrangement sequence, wherein the dividing position arrangement sequence is the arrangement sequence of the position of each second divided image block in the original image when the original image is divided into the n second divided image blocks;
and performing OR operation on the first intermediate image and the second intermediate image to obtain a preprocessing binary image.
4. A system for extracting stuck bubbles from dynamic ice images based on watershed segmentation, comprising:
the distance acquisition unit is used for acquiring a distance image according to the minimum distance between the pixel point of the central part of the bubble in the preprocessing binary image and the background, and comprises the following steps:
performing distance transformation on the preprocessing binary image, and obtaining the distance image according to the opposite number of the minimum distance from the pixel point of the central part of the bubble in the preprocessing binary image to the background;
the adjusting unit is used for carrying out histogram equalization on the distance image and adjusting the numerical value of the central part of each bubble in the distance matrix of the distance image so that the brightness of the adhered bubble is as high as that of the central part of the bigger bubble existing nearby to obtain an adjusted image;
the marking unit is used for obtaining a local minimum value from the image matrix of the adjustment image, marking the point where the local minimum value is located in the adjustment image, and obtaining a marked image;
the watershed transformation unit is used for carrying out watershed transformation on the marked image according to the marked points in the marked image to obtain a watershed dividing line based on the marked points, inverting the watershed dividing line and carrying out OR operation on the watershed dividing line and the preprocessed binary image to obtain a divided image of the adhesion air bubbles.
5. An electronic device, comprising:
one or more processors;
a memory;
a screen for displaying an image in the method of any one of claims 1-3;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-3.
CN202311101039.8A 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation Pending CN117011531A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311101039.8A CN117011531A (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210638584.XA CN114821071B (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image
CN202311101039.8A CN117011531A (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210638584.XA Division CN114821071B (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image

Publications (1)

Publication Number Publication Date
CN117011531A true CN117011531A (en) 2023-11-07

Family

ID=82521913

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311101039.8A Pending CN117011531A (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image based on watershed segmentation
CN202210638584.XA Active CN114821071B (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210638584.XA Active CN114821071B (en) 2022-06-08 2022-06-08 Method, device and equipment for extracting adhesion bubbles from dynamic ice image

Country Status (1)

Country Link
CN (2) CN117011531A (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI496112B (en) * 2013-09-13 2015-08-11 Univ Nat Cheng Kung Cell image segmentation method and a nuclear-to-cytoplasmic ratio evaluation method using the same
CN103679796B (en) * 2013-11-27 2016-12-07 上海交通大学 Bidimensional based on range conversion watershed algorithm transmission function body data identification method
CN105160668B (en) * 2015-08-26 2018-01-09 爱威科技股份有限公司 Image partition method, system and cell image segmentation method, system
CN106780504B (en) * 2017-01-22 2019-11-01 中国农业大学 It is a kind of based on distance keep level set beef image in carry on the back long flesh automatic division method
CN108193661B (en) * 2018-01-25 2019-08-20 四川大学 A method of accurately calculating native weight in slope stability analysis slices method
CN112365494B (en) * 2020-11-30 2022-12-13 北京理工大学 Ore material image segmentation method based on deep learning prediction edge
CN114549545A (en) * 2022-01-13 2022-05-27 南华大学 Explosive pile image self-adaptive segmentation method, equipment and medium based on rock block shape

Also Published As

Publication number Publication date
CN114821071A (en) 2022-07-29
CN114821071B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN111950723B (en) Neural network model training method, image processing method, device and terminal equipment
CN107944450B (en) License plate recognition method and device
CN111488985B (en) Deep neural network model compression training method, device, equipment and medium
WO2021129181A1 (en) Portrait segmentation method, model training method and electronic device
CN112308866B (en) Image processing method, device, electronic equipment and storage medium
CN110751037A (en) Method for recognizing color of vehicle body and terminal equipment
CN112232351B (en) License plate recognition system based on deep neural network
CN107704797B (en) Real-time detection method, system and equipment based on pedestrians and vehicles in security video
CN111310508B (en) Two-dimensional code identification method
CN112329725A (en) Method, device and equipment for identifying elements of road scene and storage medium
CN113807166B (en) Image processing method, device and storage medium
CN115512238A (en) Method and device for determining damaged area, storage medium and electronic device
CN114821071B (en) Method, device and equipment for extracting adhesion bubbles from dynamic ice image
CN111383191A (en) Image processing method and device for repairing blood vessel fracture
CN111178153A (en) Traffic sign detection method and system
CN113989649A (en) Remote sensing land parcel identification method based on deep learning
CN113393430A (en) Thermal imaging image enhancement training method and device for fan blade defect detection
Wang et al. Learning an enhancement convolutional neural network for multi-degraded images
WO2023207741A1 (en) Modeling method for metaverse scene material and related device
CN112733652A (en) Image target identification method and device, computer equipment and readable storage medium
CN115937537A (en) Intelligent identification method, device and equipment for target image and storage medium
CN115346138A (en) Target detection method, device and equipment of aerial image based on unmanned aerial vehicle
CN115063826A (en) Mobile terminal driver license identification method and system based on deep learning
CN114611674A (en) Lightweight method and device of U-net model
CN114419398A (en) Disaster situation assessment method and device based on single-temporal image

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