A digital image threshold self-determination method based on pixel neighborhood information

Through the Laplace template convolution calculation based on pixel neighborhood information and the maximum variance method between categories, the problems of large error and low precision in rock and soil micro-image segmentation are solved, and more accurate segmentation effect and faster calculation speed are achieved.

CN115147446BActive Publication Date: 2025-09-12CHINA UNIV OF MINING & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211005519.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-09-12
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

Existing grayscale algorithms have problems of large errors and low precision in rock and soil microscopic image segmentation, especially for images with flat peaks, relatively symmetrical peaks or obvious double peaks in the grayscale histogram.

Method used

A method based on pixel neighborhood information is adopted to obtain the LP grayscale value through Laplacian template convolution calculation. The LP grayscale value is compared with the original grayscale image by histogram comparison, and the maximum variance between categories is calculated to determine the optimal segmentation threshold.

Benefits of technology

The segmentation accuracy and reliability of geotechnical material microscopic images are improved, the calculation process is simplified, and the calculation rate is increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115147446B_ABST
    Figure CN115147446B_ABST
Patent Text Reader

Abstract

The present invention discloses a digital image threshold self-determination algorithm based on pixel neighborhood information, comprising the following steps: (1) selecting a Laplace template of an image, performing convolution calculation to obtain an L‑P grayscale value; (2) marking the L‑P grayscale value obtained in step (1) and replacing the original image grayscale, and performing grayscale value cumulative statistics; (3) drawing a grayscale distribution histogram after replacement and comparing it with the original grayscale image histogram; (4) marking two intersection points generated by the grayscale histogram of the L‑P value after replacement and the grayscale histogram of the original image, obtaining the grayscale value interval of the pixel points corresponding to the two intersection points by calculation, using this interval to cover the original grayscale values ​​of all segmentable boundary pixels, and calculating the maximum value of inter-class variance within this interval; (5) taking the grayscale corresponding to the maximum value of the inter-class variance as the optimal segmentation threshold, which can more accurately and effectively segment the grayscale image of the geotechnical material microscopic image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital image information extraction, and in particular to a digital image threshold self-determination method based on pixel neighborhood information. Background Art

[0002] With the rapid development of digital imaging technologies (CT, SEM, FIB / SEM), the pore structure of geomaterials can be visualized in grayscale images. The most direct way to obtain the pore structure of geomaterials is through threshold segmentation. Existing grayscale algorithms primarily segment grayscale images based on discontinuous changes in pixel grayscale or regional similarity. They work best for images with smooth, relatively symmetrical grayscale histograms or distinct bimodal grayscale levels. By selecting the trough point between the two peaks as the optimal threshold, they can accurately and effectively segment the target and background in the image. However, grayscale images of microscopic geomaterials have highly concentrated grayscale concentrations, and their histograms exhibit a unimodal distribution with a larger center and smaller ends. Consequently, existing algorithms for grayscale segmentation of microscopic geomaterial images exhibit significant errors, resulting in low fidelity and reliability of the segmentation results. Summary of the Invention

[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a method for self-determination of digital image thresholds based on pixel neighborhood information.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] The present invention provides a method for self-determining a digital image threshold based on pixel neighborhood information, comprising the following steps:

[0006] (1) Select the Laplacian template of the image and perform convolution calculation to obtain the LP grayscale value;

[0007] (2) Mark the LP grayscale value obtained in step (1) and replace the original image grayscale, and perform grayscale value cumulative statistics;

[0008] (3) Draw the grayscale distribution histogram after replacement and compare it with the original grayscale image histogram;

[0009] (4) Mark the two intersection points of the grayscale histogram of the LP value after replacement and the grayscale histogram of the original image, obtain the grayscale value interval of the pixel points corresponding to the two intersection points by calculation, use this interval to cover the grayscale values ​​of all the original separable boundary pixels, and calculate the maximum inter-class variance within this interval;

[0010] (5) The grayscale corresponding to the maximum inter-class variance is taken as the optimal segmentation threshold.

[0011] Preferably, the Laplace template in step (1) adopts the following template:

[0012] .

[0013] Preferably, the images in step (1) include bentonite FIB-SEM images, coal SEM images, sandstone CT images, and shale CT images.

[0014] Preferably, in step (1), before calculating and obtaining the LP grayscale value, a histogram of the original grayscale image is drawn.

[0015] Preferably, the grayscale interval value in step (4) is recorded as , the calculation of the maximum variance between categories specifically includes:

[0016] exist The interval is divided into two categories and Two parts, classified into The probability of ; According to the normalization of probability, we can know that: classification to The probability of , the cumulative mean between the two categories is calculated as follows:

[0017]

[0018] The average grayscale values ​​in the two categories are:

[0019] ,

[0020] The variance between the two classes is calculated as:

[0021]

[0022] Traversal interval, The corresponding grayscale value at the maximum is used as the optimal grayscale segmentation threshold .

[0023] The beneficial effects of the present invention are:

[0024] Compared with the existing grayscale image threshold determination method, the present invention can more accurately and effectively segment the grayscale image of the geotechnical material microscopic image by taking the pixel LP value into consideration, thereby making up for the shortcomings of the existing technology with large error and low precision; at the same time, the algorithm involved in the present invention is simple, has small calculation amount and faster calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 It is a schematic flow chart of the method of the present invention;

[0027] Figure 2 is an image test chart according to an embodiment of the present invention;

[0028] Figure 3 yes Figure 2 The original grayscale histogram corresponding to the image;

[0029] Figure 4 is a grayscale image of the LP value corresponding to the embodiment of the present invention;

[0030] Figure 5 is a schematic diagram comparing a replaced grayscale histogram and an original grayscale histogram according to an embodiment of the present invention;

[0031] Figure 6 is a segmentation result diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0033] like Figures 1 to 6 As shown, this embodiment provides a method for self-determining a digital image threshold based on pixel neighborhood information, which specifically includes the following steps:

[0034] Step 1: Perform Laplacian convolution on the image:

[0035] Select Figure 2 The sample image shown, where Figure 2 (a) is the FIB-SEM image of bentonite, Figure 2 (b) is the SEM image of coal. Figure 2 (c) is the CT image of sandstone; Figure 2 (d) is the shale CT image, and the sample grayscale histogram data is statistically analyzed, as shown in Figure 3As shown; the Laplace operator is used to highlight the boundary between the detection background and the target, that is, the pores, on the original image, and convolution calculation is performed through the template; in this embodiment, the following template is selected to calculate the pixel LP value:

[0036] ;

[0037] Step 2: Replace the obtained pixel LP value label and grayscale histogram statistics:

[0038] Move the small matrix of the Laplace convolution template on the image where the gradient calculation is required, perform convolution operation at each pixel position to calculate the LP value of the pixel, and obtain Figure 4 The grayscale image of the LP value of the marker is shown, where Figure 4 (a) is the bentonite image, Figure 4 (b) is the coal image, Figure 4 (c) is the sandstone image; Figure 4 (d) is a shale image; and grayscale histogram data is obtained by cumulative statistics;

[0039] Step 3: Compare the grayscale distribution histogram obtained in step (2) with the original grayscale distribution histogram obtained in step (1), as shown in Figure 5 As shown, in step 2, based on the grayscale histogram data corresponding to the LP value, combined with the original image histogram data, the grayscale values ​​of the same coordinates are compared, and the intersection interval of the two straight lines is selected as the threshold calculation interval and recorded as ;

[0040] Step 4: Calculate the optimal segmentation threshold:

[0041] exist The interval is divided into two categories and Two parts, classified into The probability of ; According to the normalization of probability, we can know that: classification to The probability of , the cumulative mean between the two categories is calculated as follows:

[0042] (1)

[0043] The average grayscale values ​​in the two categories are:

[0044] , (2)

[0045] The variance between the two categories can be calculated from formulas (1)-(2):

[0046] (3)

[0047] Traversal interval, find the The corresponding grayscale value at the maximum is used as the optimal grayscale segmentation threshold ;

[0048] The segmentation thresholds of the four samples obtained by calculation are as follows:

[0049] Threshold Bentonite coal sandstone shale 107 101 101 87

[0050] Step 5: Get the best threshold segmentation image:

[0051] Use the threshold calculated in step 4 to perform threshold segmentation on the image, and the segmentation effect is as follows Figure 6 The optimal threshold segmentation image shown, where Figure 6 (a) is the bentonite image, Figure 6 (b) is the coal image, Figure 6 (c) is the sandstone image; Figure 6 (d) is the shale image.

[0052] For grayscale images with a unimodal grayscale histogram, pixel Laplace convolution calculation is introduced to highlight the boundary of the target area, and the segmentation threshold is determined by calculating the maximum variance between categories. In this embodiment, the Laplace value of the pixel point is calculated as the research object, and the image marked by the pixel Laplace convolution calculation value further highlights the boundary area of ​​the segmentation target. By calculating the Laplace value of each pixel point in the original image, the obtained LP value is statistically analyzed to obtain a new grayscale distribution histogram, and the optimal segmentation threshold is determined based on the comparative analysis between the histogram data.

[0053] Comparing with the original test images, it can be clearly seen that the segmentation performance of this embodiment has a good segmentation effect on the grayscale image of microscopic rock and soil materials, and has high pore discrimination.

[0054] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for self-determination of digital image thresholds based on pixel neighborhood information, characterized in that: The following steps are involved: (1) Select the Laplacian template of the image and perform convolution calculation to obtain the LP grayscale value. That is, the Laplacian operator is used to highlight the boundary between the detection background and the target, i.e., the pores, on the original image, and the LP value of the pixel is calculated by convolution of the template. (2) Mark the LP grayscale value obtained in step (1) and replace the original image grayscale, and perform grayscale value cumulative statistics; (3) Draw the grayscale distribution histogram after replacement and compare it with the original grayscale image histogram; based on the grayscale histogram data corresponding to the LP value in step (2), combine it with the original image histogram data to compare the grayscale values ​​at the same coordinate; (4) Mark the two intersection points of the grayscale histogram of the LP value after replacement and the grayscale histogram of the original image, obtain the grayscale value interval of the pixel points corresponding to the two intersection points by calculation, use this interval to cover the grayscale values ​​of all the original separable boundary pixels, and calculate the maximum inter-class variance within this interval; (5) The grayscale corresponding to the maximum inter-class variance is taken as the optimal segmentation threshold.

2. The method for self-determining digital image thresholds based on pixel neighborhood information according to claim 1, characterized in that: The Laplace template in step (1) uses the following template: 。 3. The method for self-determining digital image thresholds based on pixel neighborhood information according to claim 1, characterized in that: The images in step (1) include bentonite FIB-SEM images, coal SEM images, sandstone CT images, and shale CT images.

4. The method for self-determining digital image thresholds based on pixel neighborhood information according to claim 1, wherein: Step (1) Before calculating the LP grayscale value, draw the histogram of the original grayscale image.

5. The method for self-determining digital image thresholds based on pixel neighborhood information according to claim 1, wherein: The grayscale interval value in step (4) is recorded as (T 1 , T 2 ), the calculation of the maximum variance between categories specifically includes: In (T 1 , T 2 ) The interval is divided into two parts, A1 and A2, and the probability of being classified into A1 , from the normalization of probability, we can know that the probability of classification into A2 , the cumulative mean between the two categories is calculated as follows: , the average grayscale values ​​in the two categories are: , , The variance between the two classes is calculated as: , Traverse (T 1 , T 2 ) interval, The corresponding grayscale value at the maximum is taken as the optimal grayscale segmentation threshold T.

Citation Information

Patent Citations

  • Night image characteristic extraction method in intelligent vehicle-mounted anti-collision pre-warning system

    CN103020948A

  • Segmentation threshold determination method for rock-soil body material digital image

    CN110021030A