[go: up one dir, main page]

CN111402284A - Image threshold value determination method and device based on three-dimensional connectivity - Google Patents

Image threshold value determination method and device based on three-dimensional connectivity Download PDF

Info

Publication number
CN111402284A
CN111402284A CN202010188542.1A CN202010188542A CN111402284A CN 111402284 A CN111402284 A CN 111402284A CN 202010188542 A CN202010188542 A CN 202010188542A CN 111402284 A CN111402284 A CN 111402284A
Authority
CN
China
Prior art keywords
threshold
voxels
total number
value
parameter
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
CN202010188542.1A
Other languages
Chinese (zh)
Other versions
CN111402284B (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.)
National University of Defense Technology
Original Assignee
National University of Defense 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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202010188542.1A priority Critical patent/CN111402284B/en
Publication of CN111402284A publication Critical patent/CN111402284A/en
Application granted granted Critical
Publication of CN111402284B publication Critical patent/CN111402284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10088Magnetic resonance imaging [MRI]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10104Positron emission tomography [PET]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种基于三维连通性的图像阈值方法及装置,包括:将一次采集的二维图像全部导入;设定分割阈值间隔ο,判别参量阈值ε;选择阈值搜索初始值μ0,该阈值搜索初始值μ0小于等于分割阈值;分别计算阈值μ0‑2*ο、阈值μ0‑ο和μ0下分割出的前景区域体素总数量N,和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L;设定判别参量β;若判别参量β>判别参量阈值ε,取当前β对应的阈值μ0,并输出μ0‑o,作为最佳阈值;否则,μ0←μ0+ο,继续阈值检测。本发明提供的方法和装置,利用体素空间特征的显著变化来寻找最佳的分割像素值,使前景的分割更加准确。

Figure 202010188542

The present invention provides an image threshold method and device based on three-dimensional connectivity, including: importing all two-dimensional images collected at one time; setting a segmentation threshold interval o, a discriminant parameter threshold ε; selecting a threshold search initial value μ 0 , the The threshold search initial value μ 0 is less than or equal to the segmentation threshold; respectively calculate the total number N of voxels in the foreground region segmented under the threshold μ 0-2 *ο, the threshold μ 0 -ο and μ 0 , and/or the total number of segmented voxels The number M, and/or the total number L of the segmented non-foreground region voxels; set the discriminant parameter β; if the discriminant parameter β> the discriminant parameter threshold ε, take the threshold μ 0 corresponding to the current β, and output μ 0 ‑o, As the best threshold; otherwise, μ 0 ←μ 0 +ο, continue threshold detection. The method and device provided by the present invention utilize the significant changes of the voxel space feature to find the best segmentation pixel value, so that the segmentation of the foreground is more accurate.

Figure 202010188542

Description

一种基于三维连通性的图像阈值测定方法及装置A method and device for image threshold determination based on three-dimensional connectivity

技术领域technical field

本发明属于图像处理领域,涉及一种图像阈值测定方法及装置,特别涉及一种基于三维连通性的图像阈值测定方法及装置。The invention belongs to the field of image processing, and relates to a method and device for determining an image threshold, in particular to a method and device for determining an image threshold based on three-dimensional connectivity.

背景技术Background technique

阈值法是图像分割常用的方法之一,它利用图像中目标与背景在灰度值上的差异,通过设置阈值对像素进行分类,从而实现目标与背景的分离。常用的阈值法包括:The threshold method is one of the commonly used methods for image segmentation. It uses the difference in gray value between the target and the background in the image to classify the pixels by setting a threshold, so as to achieve the separation of the target and the background. Commonly used threshold methods include:

(1)人工经验选择法(1) Manual experience selection method

根据先验知识,或者通过对图像中的目标与背景进行分析总结规律,获得目标和背景的像素值区间,在此基础上找出比较好的阈值。该方法不能实现自动的阈值选取,因此,效率较低,而且易受图像质量的影像,导致显著的分割误差。According to prior knowledge, or by analyzing and summarizing the rules of the target and the background in the image, the pixel value interval of the target and the background is obtained, and on this basis, a better threshold is found. This method cannot achieve automatic threshold selection, therefore, it is inefficient and susceptible to image quality images, resulting in significant segmentation errors.

(2)最大类间方差法(2) Maximum inter-class variance method

也称大津法,它的基本思想是,根据图像的灰度特性将图像分为前景和背景两个部分,两部分之间差别最大时的阈值最佳,其采用的衡量差别的标准就是最大类间方差。Also known as the Otsu method, its basic idea is to divide the image into two parts, the foreground and the background, according to the grayscale characteristics of the image. When the difference between the two parts is the largest, the threshold is the best. between variance.

设M为图像的灰阶数,N为像素总数,N1为背景像素总数,N2为前景像素总数,Pi表示像素值为i的像素点总数,则Let M be the number of gray levels of the image, N is the total number of pixels, N1 is the total number of background pixels, N2 is the total number of foreground pixels, and P i is the total number of pixels with pixel value i, then

背景像素占比:ω0=N1/NThe proportion of background pixels: ω 0 =N 1 /N

前景像素占比:ω1=N2/NProportion of foreground pixels: ω 1 =N 2 /N

背景像素的灰度均值:Gray mean of background pixels:

Figure BDA0002415049100000011
Figure BDA0002415049100000011

前景像素的灰度均值:Grayscale mean of foreground pixels:

Figure BDA0002415049100000021
Figure BDA0002415049100000021

图像的灰度均值:μ=ω0×μ01×μ1 The grayscale mean of the image: μ=ω 0 ×μ 01 ×μ 1

图像的类间方差:σ=ω0×(μ0-μ)21×(μ1-μ)2 Inter-class variance of the image: σ=ω 0 ×(μ 0 -μ) 21 ×(μ 1 -μ) 2

将类间均值公式代入,则有:Substitute the between-class mean formula into:

σ=ω0×ω1×(μ01)2 σ=ω 0 ×ω 1 ×(μ 01 ) 2

该方法是目前最常用的阈值计算方法。由于在分割过程中对每个像素都使用了相等的阈值,因此,只适用于前景灰度特征连续的图像。This method is currently the most commonly used threshold calculation method. Since an equal threshold is used for each pixel during segmentation, it is only suitable for images with continuous foreground grayscale features.

(3)迭代法(3) Iterative method

它的基本思想是,将图像分为前景和背景两个部分,当两部分保持稳定时的阈值就是最佳,其衡量分割稳定性的标准就是两部分像素中心的均值。Its basic idea is to divide the image into two parts, the foreground and the background. When the two parts are stable, the threshold is the best, and the standard for measuring the segmentation stability is the mean of the pixel centers of the two parts.

设M为图像的灰阶数,Pi表示像素值为i的像素点总数,则Let M be the number of gray levels of the image, and P i represent the total number of pixels with pixel value i, then

背景像素的灰度中心值:Grayscale center value of background pixels:

Figure BDA0002415049100000022
Figure BDA0002415049100000022

前景像素的灰度中心值:The grayscale center value of the foreground pixel:

Figure BDA0002415049100000023
Figure BDA0002415049100000023

前景和背景中心的均值:Mean of foreground and background centers:

Figure BDA0002415049100000024
Figure BDA0002415049100000024

迭代产生T值作为新的阈值,当Tt=T(t-1)时,此时的T值就是最优阈值。该方法适用于图像存在显著区别的两个部分。Iteratively generates the T value as a new threshold, when T t =T (t-1) , the T value at this time is the optimal threshold. This method works for two parts of the image that are significantly different.

最大类间方差法和迭代法都要求同时考虑前景和背景区域的像素值分布特征,因此,确定阈值的过程会受到背景特征信息的干扰。此外,这两种方法要求前景各部分的像素值的分布具有连续性,如果前景存在像素值反差的区域或者局部信息缺失等,也会出现较大的分割误差。Both the maximum inter-class variance method and the iterative method require the pixel value distribution characteristics of the foreground and background regions to be considered at the same time. Therefore, the process of determining the threshold value will be disturbed by the background feature information. In addition, these two methods require the distribution of pixel values in each part of the foreground to be continuous. If there is a region with contrasting pixel values in the foreground or local information is missing, a large segmentation error will also occur.

发明内容SUMMARY OF THE INVENTION

为了克服现有技术中的不足,本发明人进行了锐意研究,提供了一种基于三维连通性的图像阈值测定方法及装置,将前景体素的空间分布特征与像素(体素)的值分布特征相结合,利用体素空间特征的显著变化来寻找最佳的分割像素值,从而完成本发明。In order to overcome the deficiencies in the prior art, the inventors of the present invention have conducted keen research to provide an image threshold determination method and device based on three-dimensional connectivity, which combines the spatial distribution characteristics of foreground voxels with the value distribution of pixels (voxels). The features are combined, and the best segmentation pixel value is found by using the significant change of the voxel space feature, thereby completing the present invention.

本发明的目的在于提供以下技术方案:The object of the present invention is to provide the following technical solutions:

第一方面,一种基于三维连通性的图像阈值方法,包括:In a first aspect, an image thresholding method based on three-dimensional connectivity, comprising:

S100,将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;S100, import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

S200,设定分割阈值间隔ο,判别参量阈值ε;S200, set segmentation threshold interval ο, discriminate parameter threshold ε;

S300,选择阈值搜索初始值μ0,该阈值搜索初始值μ0小于等于分割阈值;S300, select a threshold search initial value μ 0 , and the threshold search initial value μ 0 is less than or equal to the segmentation threshold;

S400,分别计算阈值μ0-2*ο、阈值μ0-ο和阈值μ0下分割出的前景区域体素总数量N,和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L;S400, calculate the threshold value μ 0-2 *ο, the threshold value μ 0 -ο and the total number N of foreground region voxels segmented under the threshold value μ 0 , and/or the total number M of segmented voxels, and/or segmented out The total number of non-foreground region voxels L;

S500,基于S400中测定的参数设定判别参量β,该判别参量β用以衡量分割出的前景区域体素总数量N是否出现陡增;S500, a discriminant parameter β is set based on the parameters determined in S400, and the discriminant parameter β is used to measure whether the total number N of voxels in the segmented foreground region increases sharply;

S600,若判别参量β>判别参量阈值ε,则跳到S800;否则,继续S700;S600, if the discriminant parameter β> the discriminant parameter threshold ε, skip to S800; otherwise, continue to S700;

S700,μ0←μ0+ο,返回S400;S700, μ 0 ←μ 0 +ο, return to S400;

S800,取当前β对应的阈值μ0,并输出μ0-ο,作为最佳阈值。S800, take the threshold μ 0 corresponding to the current β, and output μ 0 -ο as the optimal threshold.

进一步地,在可以预知阈值μ的搜索范围时,该方法可以通过以下步骤实施:Further, when the search range of the threshold μ can be predicted, the method can be implemented by the following steps:

S100,将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;S100, import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

S200,设定分割阈值间隔ο,判别参量阈值ε;S200, set segmentation threshold interval ο, discriminate parameter threshold ε;

S300,选择一个小于分割阈值的值作为阈值搜索下界μ0;选择一个大于分割阈值的值作为阈值搜索上界μ1S300, select a value smaller than the segmentation threshold as the threshold search lower bound μ 0 ; select a value greater than the segmentation threshold as the threshold search upper bound μ 1 ;

S400,以ο为间隔,计算μ0到μ1之间的每一个阈值μ下分割出的前景区域体素总数量N,和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L,并将上述参数加入队列listN、和/或listM、和/或listLS400, with o as an interval, calculate the total number N of foreground region voxels segmented under each threshold μ between μ 0 and μ 1 , and/or the total number M of segmented voxels, and/or the segmented The total number L of non-foreground area voxels, and the above parameters are added to the queue list N , and/or list M , and/or list L ;

S500,基于S400中测定的参数设定判别参量β,该判别参量β用以衡量分割出的前景区域体素总数量N是否出现陡增;计算各阈值下判别参量β并加入队列listβS500, set a discriminant parameter β based on the parameters measured in S400, and this discriminant parameter β is used to measure whether the total number N of voxels in the segmented foreground region increases sharply; calculate the discriminant parameter β under each threshold and join the queue list β ;

S600,按阈值μ从小到大的顺序,依次取其在队列listβ中对应的β值进行判别,直至β>ε;S600, according to the order of the threshold μ from small to large, the corresponding β values in the queue list β are used for discrimination, until β>ε;

S700,取当前β对应的阈值μ,并输出μ-o,作为最佳阈值。S700, take the threshold μ corresponding to the current β, and output μ-o as the optimal threshold.

第二方面,一种基于三维连通性的图像阈值装置,用于实施第一方面所述的基于三维连通性的图像阈值方法,该装置包括:In a second aspect, a three-dimensional connectivity-based image thresholding device for implementing the three-dimensional connectivity-based image thresholding method described in the first aspect, the device comprising:

导入模块,用于将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;The import module is used to import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

参量设定模块,用于输入设定参量的数值或者计算方式,包括为分割阈值间隔ο、判别参量阈值ε、和阈值搜索初始值μ0赋值,以及选择判别参量β的计算方式;The parameter setting module is used for inputting the numerical value or the calculation method of the setting parameter, including the assignment of the initial value μ 0 for the segmentation threshold interval o, the discriminant parameter threshold ε, and the threshold search initial value μ 0 , and the calculation method of the selection discriminant parameter β;

体素数量测定模块,用于测定阈值μ0-2*ο、阈值μ0-ο和μ0下分割出的前景区域体素总数量N,和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L;A voxel number determination module for determining the total number N of foreground region voxels segmented under thresholds μ0-2 *ο, thresholds μ0 -ο and μ0 , and/or the total number of segmented voxels M, and / or the total number of segmented non-foreground region voxels L;

判别参量测定模块,根据阈值μ由小到大的顺序,依次测定判别参量β;The discriminant parameter measurement module measures the discriminant parameter β in turn according to the order of the threshold μ from small to large;

阈值判定模块,用于判定判别参量β与判别参量阈值ε的数值关系,若判别参量β>判别参量阈值ε,取当前β对应的阈值μ0,并输出μ0-o,作为最佳阈值;若判别参量β≤判别参量阈值ε,当前阈值增加分割阈值间隔后作为新的搜索阈值,启动体素数量测定模块和判别参量测定模块再次进行下一阈值下运算。The threshold determination module is used to determine the numerical relationship between the discriminant parameter β and the discriminant parameter threshold ε. If the discriminant parameter β> the discriminant parameter threshold ε, take the threshold μ 0 corresponding to the current β, and output μ 0 -o as the optimal threshold; If the discriminant parameter β≤the discriminant parameter threshold ε, the current threshold is increased by the segmentation threshold interval as a new search threshold, and the voxel quantity measurement module and the discriminant parameter measurement module are activated to perform the next threshold operation again.

进一步地,在可以预知阈值μ的搜索范围时,该装置包括:Further, when the search range of the threshold μ can be predicted, the device includes:

导入模块,用于将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;The import module is used to import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

参量设定模块,用于输入设定参量的数值或者计算方式,包括为分割阈值间隔ο、判别参量阈值ε、阈值搜索下界μ0、和阈值搜索上界μ1赋值,以及选择判别参量β的计算方式;The parameter setting module is used to input the numerical value or calculation method of the setting parameter, including assigning values for the segmentation threshold interval o, the discriminant parameter threshold ε, the threshold search lower bound μ 0 , and the threshold search upper bound μ 1 , and the selection of the discriminant parameter β. Calculation;

体素数量测定模块,用于以ο为间隔,计算μ0到μ1之间的每一个阈值μ下分割出的前景区域体素总数量N,和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L,并将上述参数加入队列listN、和/或listM、和/或listLThe voxel number determination module is used to calculate the total number N of foreground region voxels segmented under each threshold μ between μ 0 and μ 1 , and/or the total number M of segmented voxels, with o as an interval, And/or the total number of non-foreground region voxels L, and adding the above parameters to the queue list N , and/or list M , and/or list L ;

判别参量测定模块,计算各阈值下判别参量β并加入队列listβThe discriminant parameter measurement module calculates the discriminant parameter β under each threshold and joins the queue list β ;

阈值判定模块,按阈值μ从小到大的顺序,依次取其在队列listβ中对应的β值进行判别,直至判别参量β>判别参量阈值ε,取当前β对应的阈值μ0,并输出μ0-ο,作为最佳阈值。The threshold judgment module, in the order of the threshold μ from small to large, takes the corresponding β value in the queue list β for judgment, until the discriminant parameter β> the discriminant parameter threshold ε, takes the threshold value μ 0 corresponding to the current β, and outputs μ 0 -ο, as the optimal threshold.

根据本发明提供的一种基于三维连通性的图像阈值测定方法及装置,带来了以下有益的技术效果:According to a kind of image threshold determination method and device based on three-dimensional connectivity provided by the present invention, the following beneficial technical effects are brought:

与传统的方法相比,新方法可以根据图像体素空间分布特征和像素(体素)值分布特征自动确定阈值;只需要考虑前景区域的特征,可以避免背景的干扰;通过连续地阈值调整,利用三维体素的连通性增加前景信息缺失区域的有效像素,缩小前景内部像素值的反差,使前景的分割更加准确。Compared with the traditional method, the new method can automatically determine the threshold according to the spatial distribution characteristics of image voxels and pixel (voxel) value distribution characteristics; only the characteristics of the foreground area need to be considered, and the interference of the background can be avoided; through continuous threshold adjustment, The connectivity of 3D voxels is used to increase the effective pixels in the area where the foreground information is missing, reduce the contrast of pixel values within the foreground, and make the segmentation of the foreground more accurate.

本发明提供的基于三维连通性的图像阈值测定方法及装置,适用于能够通过三维重建形成三维图像的一组二维图像中的任意二维图像,特别适用于医疗中针对目标人体部位产生的各类断层扫描图像,如CT(X射线计算机断层摄影)图像、MRI(核磁共振成像)图像、PET(正电子发射断层成像)图像、PET-CT图像、PET-MRI图像、数字乳腺断层摄影(3D钼靶)图像等。这是由于临床观察中,医生更关注于相关图像中前景的病变区域的特征,而背景区域往往仅作对比参考甚至被直接忽略。本发明提供的基于三维连通性的阈值测定方法以前景特征为中心,可以避免阈值的设定受背景特征的干扰,尽可能多地保留了前景目标的像素(体素),为后期更加准确的分析提供了可能。相比而言,传统的最大类间方差法和迭代法,更容易受到背景特征以及前景内部有较大反差区域的影响,会造成前景区域缺损或较多的细节丢失,不利于后期的分析处理。The image threshold determination method and device based on three-dimensional connectivity provided by the present invention is suitable for any two-dimensional image in a set of two-dimensional images that can form a three-dimensional image through three-dimensional reconstruction, and is especially suitable for various images generated for target human body parts in medical treatment. Tomography-like images, such as CT (X-ray computed tomography) images, MRI (magnetic resonance imaging) images, PET (positron emission tomography) images, PET-CT images, PET-MRI images, digital breast tomography (3D mammography) images, etc. This is because in clinical observation, doctors pay more attention to the characteristics of the lesion area in the foreground in the relevant images, while the background area is often only used as a reference for comparison or even ignored directly. The threshold determination method based on three-dimensional connectivity provided by the present invention is centered on the foreground feature, which can avoid the interference of the threshold setting by the background feature, and retain as many pixels (voxels) of the foreground target as possible, which is more accurate for the later stage. Analysis offers the possibility. In contrast, the traditional maximum inter-class variance method and iterative method are more susceptible to the influence of background features and areas with large contrast in the foreground, which will cause defects in the foreground area or loss of more details, which is not conducive to later analysis and processing. .

附图说明Description of drawings

图1为本发明一种优选实施方式中方法的流程框图;Fig. 1 is a flow chart of a method in a preferred embodiment of the present invention;

图2为本发明另一种优选实施方式中方法的流程框图;Fig. 2 is a flow chart of a method in another preferred embodiment of the present invention;

图3为本发明实施例1中所述方法的流程框图;3 is a flowchart of the method described in Embodiment 1 of the present invention;

图4为存在大面积高密度影的肺部CT图;Figure 4 is a CT image of the lung with a large area of high-density shadow;

图5为基于人工经验选择法的阈值法分割结果图(μ=-350);Fig. 5 is the segmentation result graph of threshold method based on manual experience selection method (μ=-350);

图6为基于最大类间方差法的阈值法分割结果图;Fig. 6 is the segmentation result diagram of the threshold method based on the maximum between-class variance method;

图7为基于迭代法的阈值法分割结果图;Fig. 7 is the segmentation result diagram of threshold method based on iterative method;

图8为基于三维连通性的阈值测定方法的阈值法分割结果图(μ=-280)。FIG. 8 is a graph showing the segmentation result of the threshold method based on the three-dimensional connectivity threshold measurement method (μ=-280).

具体实施方式Detailed ways

下面通过附图和实施例对本发明进一步详细说明。通过这些说明,本发明的特点和优点将变得更为清楚明确。The present invention will be further described in detail below through the accompanying drawings and embodiments. The features and advantages of the present invention will become more apparent from these descriptions.

当前图像阈值计算主要采用的方法,最大类间方差法和迭代法,都依赖于像素值分布特征,这种思路存在如下的问题:The current image threshold calculation methods, the maximum inter-class variance method and the iterative method, all rely on the distribution characteristics of pixel values. This idea has the following problems:

(1)阈值计算基于前景和背景区域的像素值,导致阈值会受到背景信息的干扰,影响前景区域分割的准确性,而事实上我们通常只关心前景分割结果;(1) The threshold calculation is based on the pixel values of the foreground and background areas, which causes the threshold to be interfered by background information, which affects the accuracy of foreground area segmentation. In fact, we usually only care about the foreground segmentation results;

(2)它们对于前景和背景区域的像素值分布情况非常敏感,当前景存在显著像素值反差区域,或者局部信息缺失时,都会导致严重的分割错误。(2) They are very sensitive to the distribution of pixel values in the foreground and background regions. When there is a significant pixel value contrast region in the foreground, or local information is missing, serious segmentation errors will be caused.

事实上,除了像素值分布特征外,对于二维图像重建得到的三维图像而言,还具有体素空间分布特征,如体素连通性,可以通过这些特征来弥补基于像素值进行图像分割的不足。In fact, in addition to the distribution characteristics of pixel values, the 3D image obtained from 2D image reconstruction also has voxel spatial distribution characteristics, such as voxel connectivity, which can be used to make up for the shortcomings of image segmentation based on pixel values. .

针对传统阈值法存在的问题,本发明提出了一种基于三维连通性的图像阈值测定方法及装置,将前景体素的空间分布特征与像素(体素)值分布特征相结合,通过分割阈值的调整观测体素空间特征统计量,利用该统计量的显著变化来寻找最佳的分割阈值,有效提高了前景分割的准确性。Aiming at the problems existing in the traditional threshold method, the present invention proposes an image threshold determination method and device based on three-dimensional connectivity, which combines the spatial distribution characteristics of foreground voxels with the distribution characteristics of pixel (voxel) values. Adjust the statistic of the observed voxel space feature, and use the significant change of the statistic to find the best segmentation threshold, which effectively improves the accuracy of foreground segmentation.

本发明中,像素(体素)值是指二维图像的像素或者三维图像中的体素的取值。例如,在普通的二维灰度图中,它的取值范围为0~255;而在CT图像中像素的取值(即CT值)范围可以是-1000~2000,相应的,在由一组CT断面图像产生的三维图像中,每个体素的取值范围也可以是-1000~2000。传统的阈值法,如最大类间方差、迭代法等都支持以像素或体素为单位取单值的图像分割。本发明中,如无特别说明,像素(体素)值都是指二维图像的像素或三维图像的体素所取的值。In the present invention, a pixel (voxel) value refers to a value of a pixel of a two-dimensional image or a voxel in a three-dimensional image. For example, in an ordinary two-dimensional grayscale image, its value range is 0 to 255; while in a CT image, the pixel value (ie CT value) can range from -1000 to 2000. In the three-dimensional image generated by the group CT cross-sectional images, the value range of each voxel may also be -1000 to 2000. Traditional thresholding methods, such as maximum inter-class variance, iterative methods, etc., all support image segmentation with a single value in pixels or voxels. In the present invention, unless otherwise specified, a pixel (voxel) value refers to a value taken by a pixel of a two-dimensional image or a voxel of a three-dimensional image.

本发明中基于三维连通性的图像阈值测定方法及装置,适用于能够通过三维重建形成三维图像的一组二维图像中的任意二维图像,包括CT图像、MRI图像、PET图像、PET-CT图像、PET-MRI图像、数字乳腺断层摄影(3D钼靶)图像等各类针对目标体产生的断层扫描图像。The image threshold determination method and device based on three-dimensional connectivity in the present invention is suitable for any two-dimensional image in a set of two-dimensional images that can form a three-dimensional image through three-dimensional reconstruction, including CT image, MRI image, PET image, PET-CT image Images, PET-MRI images, digital breast tomography (3D mammography) images and other tomographic images generated for the target body.

医疗过程中的CT、MRI等方法,可以通过对人体某一部位的连续断面扫描来获得相关部位的成像,用于多种疾病的检查。这些连续断面相互叠加经过技术处理可以形成相关部位的三维影像,因此,多个断面之间具有相关性,反映的是相关部位的三维空间分布特征。将这种三维空间分布特征与其像素(体素)值分布特征相结合进行阈值计算,是本发明的主要思想。它能够在控制信噪比的前提下,尽可能增加有意义的像素(体素)点,从而提高图像分割的精度。尽管该方法会也会导致部分噪音的增加,并不能获得完全精确的结果,但是相比传统方法,它丢失的细节信息更少,其结果可以作为后续图像处理方法的基础,为更加准确的分割算法的设计提供了可能。In the medical process, CT, MRI and other methods can obtain the imaging of related parts through continuous cross-sectional scanning of a certain part of the human body, which can be used for the inspection of various diseases. These continuous sections are superimposed on each other to form a three-dimensional image of the relevant parts after technical processing. Therefore, there is a correlation between multiple sections, which reflects the three-dimensional spatial distribution characteristics of the relevant parts. It is the main idea of the present invention to combine this three-dimensional spatial distribution feature with its pixel (voxel) value distribution feature to perform threshold calculation. It can increase the meaningful pixel (voxel) points as much as possible under the premise of controlling the signal-to-noise ratio, thereby improving the accuracy of image segmentation. Although this method will also lead to an increase in part of the noise and cannot obtain completely accurate results, it loses less detailed information than the traditional method, and the results can be used as the basis for subsequent image processing methods for more accurate segmentation. The design of the algorithm provides the possibility.

本发明的阈值测定方法流程如图1所示。The flow chart of the threshold value determination method of the present invention is shown in FIG. 1 .

S100,将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;S100, import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

S200,设定分割阈值间隔ο,判别参量阈值ε;S200, set segmentation threshold interval ο, discriminate parameter threshold ε;

越小的ο值可以观察到越细粒度的统计量变化,但是,这会导致更大的计算量,同时用于判别的统计量值也更容易受到噪音干扰而波动,影响判断结果的准确性,因此,ο值选择应考虑在控制噪音干扰下的尽可能细的粒度,根据经验,在肺部CT图像中可以选择10;The smaller the ο value, the more fine-grained statistical changes can be observed. However, this will lead to a greater amount of calculation, and the statistical value used for discrimination is also more susceptible to noise interference and fluctuations, affecting the accuracy of the judgment results. , therefore, the o value selection should consider the finer granularity under the control of noise interference, according to experience, 10 can be selected in lung CT images;

S300,选择阈值搜索初始值μ0,该阈值搜索初始值μ0小于等于分割阈值;S300, select a threshold search initial value μ 0 , and the threshold search initial value μ 0 is less than or equal to the segmentation threshold;

阈值搜索初始值μ0可以从前景的经验值范围内选择,如肺部CT图像中,肺组织区域窗位的经验值范围是-450~-600,因此,可以从该区间内选择一个较低值作为搜索初始值(例如,-600);The initial value μ 0 of the threshold search can be selected from the range of the empirical value of the foreground. For example, in the lung CT image, the range of the empirical value of the window level of the lung tissue area is -450 to -600. Therefore, a lower value can be selected from this interval. value as the search initial value (for example, -600);

S400,分别计算阈值(μ0-2*ο)、阈值(μ0-ο)和阈值μ0下位于前景区域中体素数量大于等于设定阈值υ的三维连通域的体素总数量N(简称为分割出的前景区域体素总数量),和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L;其中,设定阈值υ为阈值(μ0-2*ο)下图像组中可识别的三维连通域的大小或小于其的值,设定阈值υ的取值以可区分排除其他噪音产生的连通域为目标;S400: Calculate the threshold value (μ 0 -2*ο), the threshold value (μ 0 -ο ) , and the total number of voxels N( abbreviated as the total number of voxels in the segmented foreground area), and/or the total number M of segmented voxels, and/or the total number L of segmented non-foreground area voxels; wherein, the threshold υ is set as the threshold (μ 0-2 *ο) the size of the identifiable three-dimensional connected domain in the image group or a value smaller than it, the value of the threshold υ is set to be able to distinguish and exclude the connected domain generated by other noises as the goal;

S500,基于S400中测定的参数设定判别参量β,该判别参量β用以衡量分割出的前景区域体素总数量N是否出现陡增;S500, a discriminant parameter β is set based on the parameters determined in S400, and the discriminant parameter β is used to measure whether the total number N of voxels in the segmented foreground region increases sharply;

S600,若判别参量β>判别参量阈值ε,则跳到S800;否则,继续S700;S600, if the discriminant parameter β> the discriminant parameter threshold ε, skip to S800; otherwise, continue to S700;

S700,μ0←μ0+ο,返回S400;S700, μ 0 ←μ 0 +ο, return to S400;

S800,取当前β对应的阈值μ0,并输出μ0-ο(即当前β对应的阈值μ0减去分割阈值间隔ο),作为最佳阈值。S800, take the threshold μ 0 corresponding to the current β, and output μ 0 −ο (that is, the threshold μ 0 corresponding to the current β minus the segmentation threshold interval ο), as the optimal threshold.

本发明中,上述二维图像为灰度图像。若二维图像为RGB彩色图像,则需要将RGB彩色图像转换为灰度图像。转换方法包括但不限于平均法、加权平均法或者最大最小平均法等。上述方法适用于图像中前景区域像素值低于背景区域像素值的情况,若图像中前景区域像素值高于背景区域像素值的情况,则取当前图像像素值的最大值,将最大值减去每个像素的当前值作为该像素的新值,由此构建新的图像,利用这个方法,即可恢复成前景区域像素值高于背景区域像素值的情况。In the present invention, the above-mentioned two-dimensional image is a grayscale image. If the two-dimensional image is an RGB color image, the RGB color image needs to be converted into a grayscale image. Conversion methods include, but are not limited to, an average method, a weighted average method, or a maximum-minimum average method. The above method is suitable for the case where the pixel value of the foreground area in the image is lower than the pixel value of the background area. If the pixel value of the foreground area in the image is higher than the pixel value of the background area, the maximum value of the current image pixel value is taken, and the maximum value is subtracted. The current value of each pixel is used as the new value of the pixel, thereby constructing a new image. Using this method, the situation where the pixel value of the foreground area is higher than the pixel value of the background area can be restored.

由上述方法可知,本发明方法的基本思想分为三个步骤,分别是:像素(体素)分割阈值搜索范围的确定;基于体素连通性的前景区域识别;基于体素统计特征的阈值判断。It can be seen from the above method that the basic idea of the method of the present invention is divided into three steps, which are: determination of pixel (voxel) segmentation threshold search range; foreground area recognition based on voxel connectivity; threshold judgment based on voxel statistical features .

(1)像素(体素)分割阈值搜索范围的确定(1) Determination of pixel (voxel) segmentation threshold search range

选择一个小于分割阈值的像素(体素)值作为初始阈值μ0,作为阈值搜索范围的下界;以分割阈值间隔ο为单位逐级增加。显然,随着阈值的升高,二值化的图像中非零值的像素(体素)点也不断增加(将背景区域设为零值,非背景区域设为非零值),增加的像素(体素)点除了一些隐藏于前景区域的前景像素外,还包括部分位于前景区域或者背景区域的噪音像素(体素)点。A pixel (voxel) value smaller than the segmentation threshold is selected as the initial threshold μ 0 , as the lower bound of the threshold search range; the segmentation threshold interval o is increased step by step. Obviously, with the increase of the threshold, the pixels (voxels) points of non-zero value in the binarized image also increase continuously (set the background area to zero value, and the non-background area to non-zero value), the increased pixels In addition to some foreground pixels hidden in the foreground area, the (voxel) points also include some noise pixels (voxels) points located in the foreground area or the background area.

(2)基于体素连通性的前景区域识别(2) Foreground region recognition based on voxel connectivity

由于前景是一个有意义的整体,因此,其体素分布具有连通性,并且,由于其在三维图像中的主体性,相互连通的区域越大,则是前景区域的可能性也越高。基于此假设,可以标记出不同阈值μ下体素数量大于等于υ的三维连通域作为与当前阈值μ相对应的前景区域。Since the foreground is a meaningful whole, its voxel distribution is connected, and, due to its subjectivity in a 3D image, the larger the interconnected regions, the higher the probability of being a foreground region. Based on this assumption, the three-dimensional connected domain with the number of voxels greater than or equal to υ under different threshold μ can be marked as the foreground region corresponding to the current threshold μ.

(3)基于体素统计特征的阈值判断(3) Threshold judgment based on voxel statistical features

随着阈值的增加,可以分割出来的前景区域的体素会不断增加,同步地,噪声数据也会增加。在阈值迭代的早期,噪声数据主要是图像中的随机噪声,且只有靠近前景区域的部分噪声才有可能被连入前景区域,因此,对于前景区域的影响较小。直到达到背景区域的像素(体素)值区间时,大量背景区域的像素会突然出现,它们会与前期的部分噪音点一起形成连续的像素(体素)区域,与前景区域连成一体,导致前景区域的体素数量陡然大幅增加。显然,在出现这种陡增变化的前一个阈值就是基于分割阈值间隔ο可以获得的最佳阈值,此时,尽可能多的前景区域像素被识别出来,而随机噪声在相对可控的范围内,背景区域的干扰又尽可能小。As the threshold increases, the number of voxels in the foreground region that can be segmented will continue to increase, and synchronously, the noise data will also increase. In the early stage of threshold iteration, the noise data is mainly random noise in the image, and only part of the noise close to the foreground area may be connected to the foreground area, so the impact on the foreground area is small. Until the pixel (voxel) value interval of the background area is reached, a large number of pixels in the background area will suddenly appear, and they will form a continuous pixel (voxel) area together with some of the noise points in the early stage, which will be integrated with the foreground area, resulting in The number of voxels in the foreground area increases abruptly and substantially. Obviously, the previous threshold before such a sharp change is the best threshold that can be obtained based on the segmentation threshold interval o. At this time, as many foreground area pixels as possible are identified, and random noise is within a relatively controllable range , the interference of the background area is as small as possible.

我们可以设计一种统计值即判别参量来发现这种陡增变化以确定最佳阈值。We can design a statistic, a discriminant parameter, to detect such abrupt changes to determine the optimal threshold.

在一种优选的实施方式中,判别参量β可以为阈值μ下分割出的大于等于设定阈值υ的三维连通域的体素总数量N(简称为分割出的前景区域体素总数量)的差分相邻比A。当A超过阈值ε时,即认为当前阈值μ已经超过了最佳分割阈值,选取(μ-ο)作为最佳分割阈值。In a preferred embodiment, the discriminant parameter β may be the total number of voxels N (referred to as the total number of segmented foreground region voxels) of the three-dimensional connected domain segmented under the threshold μ and greater than or equal to the set threshold υ. Differential Adjacent Ratio A. When A exceeds the threshold ε, it is considered that the current threshold μ has exceeded the optimal segmentation threshold, and (μ-ο) is selected as the optimal segmentation threshold.

假设第t个阈值μt下体素数量大于υ的三维连通域的体素总数量为N0,第(t-1)个阈值μ(t-1)体素数量大于υ的三维连通域的体素总数量为N-1,第(t-2)个阈值μ(t-2)体素数量大于υ的三维连通域的体素总数量为N-2,则在第(t-2)到(t-1)步迭代中的前景区域体素总数量的差分值为(N-1-N-2),在第(t-1)和t步迭代中的前景区域体素总数量的差分值为(N0-N-1),于是,在(t-2)、(t-1)和t步迭代中前景区域体素总数量的差分相邻比

Figure BDA0002415049100000101
Figure BDA0002415049100000102
已经研究发现,在匀质区域如脏器对应的图像区域中,该统计量在未达到边界条件时具有稳定性,当阈值μ达到背景区域的像素(体素)值区间时,该值会发生陡增。Assuming that the total number of voxels in the three-dimensional connected domain with the number of voxels greater than υ under the t-th threshold μ t is N 0 , the volume of the three-dimensional connected domain with the number of voxels greater than υ at the (t-1)th threshold μ (t-1) The total number of voxels is N -1 , and the (t-2)th threshold μ (t-2) has a three-dimensional connected domain whose number of voxels is greater than υ. The total number of voxels is N -2 , then from (t-2) to The difference value of the total number of voxels in the foreground area in the iteration of step (t-1) is (N -1 -N -2 ), and the difference between the total number of voxels in the foreground area in the iterations of (t-1) and t steps is (N -1 -N -2 ) The value is (N 0 -N -1 ), so the difference neighbor ratio of the total number of foreground voxels in the (t-2), (t-1) and t-step iterations
Figure BDA0002415049100000101
Figure BDA0002415049100000102
It has been found that in a homogeneous area such as an image area corresponding to an organ, this statistic is stable when the boundary conditions are not met. When the threshold μ reaches the pixel (voxel) value range of the background area, the value will occur. sharp increase.

在另一种优选的实施方式中,判别参量β也可以为不同阈值μ下分割出的体素总数量M的差分相邻比B。体素总数量M包括作为前景区域的体素和其他未包含在其中的非零值的体素(即非前景区域体素)。In another preferred embodiment, the discriminant parameter β may also be the difference adjacent ratio B of the total number M of voxels segmented under different thresholds μ. The total number of voxels M includes voxels that are foreground regions and other non-zero valued voxels (ie, non-foreground region voxels) that are not included in them.

假设第t个阈值μt下分割出的体素总数量为M0,第(t-1)个阈值μ(t-1)下分割出的体素总数量为M-1,第(t-2)个阈值μ(t-2)下分割出的体素总数量为M-2,则在第(t-2)到(t-1)步迭代中分割出的体素总数量的差分值为(M-1-M-2),在第(t-1)和t步迭代中分割出的体素总数量的差分值为(M0-M-1),于是,在(t-2)、(t-1)和t步迭代中分割出的体素总数量的差分相邻比

Figure BDA0002415049100000103
Assuming that the total number of voxels segmented under the t-th threshold μ t is M 0 , the total number of segmented voxels under the (t-1)-th threshold μ (t-1) is M -1 , the (t- 2) The total number of voxels segmented under the threshold μ (t-2) is M -2 , then the difference value of the total number of segmented voxels in the iterations of (t-2) to (t-1) steps is (M -1 -M -2 ), the difference value of the total number of voxels segmented in the (t-1) and t step iterations is (M 0 -M -1 ), then, in (t-2 ), (t-1), and the difference neighbor ratio of the total number of voxels segmented in t-step iterations
Figure BDA0002415049100000103

在另一种优选的实施方式中,判别参量β还可以为阈值μ下分割出的非前景区域体素总数量(L=M-N)的差分相邻比C。In another preferred embodiment, the discriminant parameter β may also be the difference neighbor ratio C of the total number of voxels (L=M-N) in the non-foreground region segmented under the threshold μ.

假设第t个阈值μt下分割出的非前景区域体素总数量为L0,第(t-1)个阈值μ(t-1)下分割出的非前景区域体素总数量为L-1,第(t-2)个阈值μ(t-2)下分割出的非前景区域体素总数量为L-2,则在第(t-2)到(t-1)步迭代中分割出的非前景区域体素总数量的差分值为(L-1-L-2),在第(t-1)和t步迭代中分割出的非前景区域体素总数量的差分值为(L0-L-1),于是,在(t-2)、(t-1)和t步迭代中分割出的非前景区域体素总数量的差分相邻比

Figure BDA0002415049100000111
Figure BDA0002415049100000112
Assuming that the total number of non-foreground region voxels segmented under the t-th threshold μ t is L 0 , and the total number of non-foreground region voxels segmented under the (t-1)th threshold μ (t-1) is L − 1 , the total number of non-foreground region voxels segmented under the (t-2)th threshold μ (t-2) is L -2 , then the segmentation is performed in the (t-2) to (t-1) step iterations The difference value of the total number of non-foreground area voxels is (L -1 -L -2 ), and the difference value of the total number of non-foreground area voxels segmented in the (t-1) and t step iterations is ( L 0 -L -1 ), then, the difference neighbor ratio of the total number of non-foreground region voxels segmented in (t-2), (t-1) and t-step iterations
Figure BDA0002415049100000111
Figure BDA0002415049100000112

在另一种优选的实施方式中,判别参量β还可以为阈值μ下分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值(R=|N/M|)的差分相邻比D。In another preferred embodiment, the discriminant parameter β can also be the absolute value of the ratio of the total number N of voxels in the foreground region segmented under the threshold μ to the total number M of segmented voxels (R=|N/M| ) of the differential neighbor ratio D.

假设第t个阈值μt下分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值为R0,第(t-1)个阈值μ(t-1)下分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值为R-1,第(t-2)个阈值μ(t-2)下分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值为R-2,则在第(t-2)到(t-1)步迭代中分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值的差分值为(R-1-R-2),在第(t-1)和t步迭代中分割出的前景区域体素总数量N与分割出的体素总数量M的比值绝对值的差分值为(R0-R-1),于是,在(t-2)、(t-1)和t步迭代中分割出的前景区域体素总数量与分割出的体素总数量的比值绝对值的差分相邻比

Figure BDA0002415049100000113
Assuming that the absolute value of the ratio of the total number N of voxels in the foreground region segmented to the total number M of segmented voxels under the t-th threshold μ t is R 0 , under the (t-1)th threshold μ (t-1) The absolute value of the ratio of the total number N of voxels in the segmented foreground area to the total number of voxels M is R -1 , and the voxels in the foreground area segmented under the (t-2)th threshold μ (t-2) The absolute value of the ratio of the total number N to the total number M of segmented voxels is R -2 , then the total number N of foreground area voxels segmented in the iterations from (t-2) to (t-1) steps is the same as the segmented voxel. The difference value of the absolute value of the ratio of the total number of voxels M is (R -1 -R -2 ), and the total number N of voxels in the foreground area segmented in the (t-1) and t step iterations is the same as the segmented The difference value of the absolute value of the ratio of the total number of voxels M is (R 0 -R -1 ), so the total number of voxels in the foreground area segmented in (t-2), (t-1) and t-step iterations Difference adjacent ratio of the absolute value of the ratio of the number to the total number of voxels segmented
Figure BDA0002415049100000113

在另一种优选的实施方式中,判别参量β还可以包括阈值μ下分割出的前景区域体素总数量N与分割出的非前景区域体素总数量(L=M-N)的比值绝对值(S=|N/L|)的差分相邻比E;或者阈值μ下分割出的非前景区域体素总数量L与分割出的体素总数量M的比值绝对值(T=|L/M|)的差分相邻比F;或者不同阈值μ下分割出的体素总数量M与分割出的前景区域体素总数量N的比值绝对值(1/R=|M/N|)的差分相邻比;或者阈值μ下分割出的非前景区域体素总数量(L=M-N)与分割出的前景区域体素总数量N的比值绝对值(1/S=|L/N|)的差分相邻比;或者阈值μ下分割出的体素总数量M与非前景区域体素总数量L的比值绝对值(1/T=|M/L|)的差分相邻比。In another preferred embodiment, the discriminant parameter β may further include the absolute value of the ratio ( S=|N/L|), the difference neighbor ratio E; or the absolute value of the ratio of the total number L of non-foreground region voxels segmented to the total number M of segmented voxels under the threshold μ (T=|L/M |), the difference adjacent ratio F; or the difference of the absolute value (1/R=|M/N|) of the ratio of the total number of voxels M segmented to the total number N of segmented foreground area voxels under different threshold μ Adjacent ratio; or the absolute value of the ratio (1/S=|L/N|) of the total number of non-foreground region voxels segmented under the threshold μ (L=M-N) to the total number N of segmented foreground region voxels The difference neighbor ratio; or the difference neighbor ratio of the absolute value (1/T=|M/L|) of the ratio of the total number M of voxels segmented under the threshold μ to the total number L of voxels in the non-foreground area.

这些统计量的敏感度不一,因此判别的结果会存在一定差异,但都很接近,反映出对于这种陡增现像不同视角下的观察。The sensitivities of these statistics are different, so there will be some differences in the results of the discrimination, but they are all close, reflecting the observation of this sharp increase phenomenon from different perspectives.

为了描述方便,我们将这类用于阈值判断的统计量统称为判别参量。For the convenience of description, we collectively refer to such statistics used for threshold judgment as discriminant parameters.

在本发明中,当能够确定分割阈值的上界时,可以预知阈值μ的搜索范围。此时,每一个阈值μ下的体素数量大于等于υ的三维连通域的体素总体素N(即分割出的前景区域体素总数量)、和/或阈值(μ0-2*ο)下分割出的体素总数量M、和/或阈值(μ0-2*ο)下分割出的非前景区域体素总数量L,以及基于上述参数的判别参量β值都可以通过并行计算获得。In the present invention, when the upper bound of the segmentation threshold can be determined, the search range of the threshold μ can be predicted. At this time, the number of voxels under each threshold μ is greater than or equal to the total number of voxels N of the three-dimensional connected domain of υ (that is, the total number of voxels in the segmented foreground area), and/or the threshold (μ 0 -2*ο) The total number M of voxels segmented down, and/or the total number L of non-foreground region voxels segmented under the threshold (μ 0 -2*ο), and the discriminant parameter β value based on the above parameters can all be obtained by parallel computing .

鉴于此,一种加速的阈值测定方法流程如图2所示。In view of this, the flow chart of an accelerated threshold determination method is shown in FIG. 2 .

S100,将一次采集的二维图像全部导入,得到二维图像组list0,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;S100, import all the two-dimensional images collected at one time to obtain a two-dimensional image group list 0 , all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

S200,设定分割阈值间隔ο,判别参量阈值ε;S200, set segmentation threshold interval ο, discriminate parameter threshold ε;

S300,选择一个小于分割阈值的值作为阈值搜索下界μ0;选择一个大于分割阈值的值作为阈值搜索上界μ1。可以从前景的经验值范围内选择一个值作为阈值搜索下界μ0,如肺部CT图像中,肺组织区域窗位的经验值范围是-450~-600,因此,可以从该区间内选择一个较低值作为搜索初始值(例如,-600);类似的,根据经验,正常肺组织区域的CT值一般均小于0,因此,可以据此设置0作为阈值搜索上界μ1,限定搜索的上下界范围可以有效减少计算量,同时也避免了其他区段值的干扰;S300, select a value smaller than the segmentation threshold as the threshold search lower bound μ 0 ; select a value greater than the segmentation threshold as the threshold search upper bound μ 1 . A value can be selected from the range of empirical values of the foreground as the lower bound μ 0 of the threshold search. For example, in the lung CT image, the empirical value range of the window level of the lung tissue area is -450 to -600. Therefore, a value can be selected from this interval. The lower value is used as the initial search value (for example, -600); similarly, according to experience, the CT value of the normal lung tissue area is generally less than 0. Therefore, 0 can be set as the upper bound μ 1 of the threshold search accordingly, and the search limit can be limited. The upper and lower bounds range can effectively reduce the amount of calculation, and also avoid the interference of other segment values;

S400,以ο为间隔,计算μ0到μ1之间的每一个阈值μ下位于前景区域中体素数量大于等于设定阈值υ的三维连通域的体素总数量N(简称为分割出的前景区域体素总数量),和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L,并将上述参数加入队列listN、和/或listM、和/或listLS400, with o as an interval, calculate the total number N of voxels in the three-dimensional connected domain where the number of voxels in the foreground region is greater than or equal to the set threshold υ under each threshold μ between μ 0 and μ 1 (referred to as segmented The total number of voxels in the foreground area), and/or the total number of segmented voxels M, and/or the total number of segmented non-foreground area voxels L, and the above parameters are added to the queue list N , and/or list M , and/or list L ;

S500,基于S400中测定的参数设定判别参量β,该判别参量β用以衡量分割出的前景区域体素总数量N是否出现陡增;计算各阈值下判别参量β并加入队列listβS500, set a discriminant parameter β based on the parameters measured in S400, and this discriminant parameter β is used to measure whether the total number N of voxels in the segmented foreground region increases sharply; calculate the discriminant parameter β under each threshold and join the queue list β ;

S600,按阈值μ从小到大的顺序,依次取其在队列listβ中对应的β值进行判别,直至β>ε;S600, according to the order of the threshold μ from small to large, the corresponding β values in the queue list β are used for discrimination, until β>ε;

S700,取当前β对应的阈值μ,并输出μ-o,作为最佳阈值。S700, take the threshold μ corresponding to the current β, and output μ-o as the optimal threshold.

该方法中,判别参量β的设定与无法预知阈值μ的搜索范围时方法中判别参量β的设定一致。In this method, the setting of the discriminant parameter β is consistent with the setting of the discriminant parameter β in the method when the search range of the threshold μ cannot be predicted.

本发明方法可以很好地解决背景区域像素值分布复杂、前景局部信息缺失或存在像素值反差区域的图像分割。与传统的方法相比,该方法充分将图像中前景体素的空间分布特征与像素(体素)的值分布特征相结合进行图像分割,利用前景空间分布特征的变化来寻找最佳分割阈值,不仅可以避免受到背景的干扰,而且能够通过阈值的调整,在保证合适信噪比的前提下增加前景区域的有效像素(体素),缩小前景中的像素值反差、增加信息缺失区域的可用信息,使前景分割的结果更加准确。The method of the invention can well solve the image segmentation of the complex pixel value distribution in the background area, the lack of local information in the foreground or the existence of pixel value contrast areas. Compared with the traditional method, this method fully combines the spatial distribution characteristics of foreground voxels in the image with the value distribution characteristics of pixels (voxels) for image segmentation, and uses the changes of the foreground spatial distribution characteristics to find the best segmentation threshold. It can not only avoid the interference of the background, but also increase the effective pixels (voxels) in the foreground area under the premise of ensuring a suitable signal-to-noise ratio, reduce the contrast of pixel values in the foreground, and increase the available information in the information-missing area by adjusting the threshold. , to make the foreground segmentation result more accurate.

根据本发明的二方面,提供了一种基于三维连通性的图像阈值装置,该装置包括:According to a second aspect of the present invention, an image thresholding device based on three-dimensional connectivity is provided, the device comprising:

导入模块,用于将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;The import module is used to import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

参量设定模块,用于输入设定参量的数值或者计算方式,包括为分割阈值间隔ο、判别参量阈值ε、和阈值搜索初始值μ0赋值,以及选择判别参量β的计算方式;The parameter setting module is used for inputting the numerical value or the calculation method of the setting parameter, including the assignment of the initial value μ 0 for the segmentation threshold interval o, the discriminant parameter threshold ε, and the threshold search initial value μ 0 , and the calculation method of the selection discriminant parameter β;

体素数量测定模块,用于测定阈值(μ0-2*ο)、阈值(μ0-ο)和阈值μ0下位于前景区域中体素数量大于等于设定阈值υ的三维连通域的体素总数量N(简称为分割出的前景区域体素总数量),和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L;The voxel number determination module is used to determine the threshold value (μ 0 -2*ο), the threshold value (μ 0 -ο) and the volume of the three-dimensional connected domain whose voxel number is greater than or equal to the set threshold value υ in the foreground area under the threshold value μ 0 the total number of voxels N (referred to as the total number of voxels in the segmented foreground area), and/or the total number of segmented voxels M, and/or the total number of segmented non-foreground area voxels L;

判别参量测定模块,根据阈值μ由小到大的顺序,依次测定判别参量β;The discriminant parameter measurement module measures the discriminant parameter β in turn according to the order of the threshold μ from small to large;

阈值判定模块,用于判定判别参量β与判别参量阈值ε的数值关系,若判别参量β>判别参量阈值ε,取当前β对应的阈值μ0,并输出μ0-ο,作为最佳阈值;若判别参量β≤判别参量阈值ε,当前阈值增加分割阈值间隔(μ0←μ0+ο)后作为新的搜索阈值,启动体素数量测定模块和判别参量测定模块再次进行下一阈值下运算。Threshold judgment module, for judging the numerical relationship between the discriminant parameter β and the discriminant parameter threshold ε, if the discriminant parameter β > the discriminant parameter threshold ε, take the threshold μ 0 corresponding to the current β, and output μ 0 - ο, as the best threshold; If the discriminant parameter β≤the discriminant parameter threshold ε, the current threshold is increased by the segmentation threshold interval (μ 0 ← μ 0 +ο) as a new search threshold, and the voxel quantity measurement module and the discriminant parameter measurement module are activated to perform the next threshold operation again. .

进一步地,当能够确定分割阈值的上界时,可以预知阈值μ的搜索范围。该基于三维连通性的图像阈值装置可进行相应调整,该装置包括:Further, when the upper bound of the segmentation threshold can be determined, the search range of the threshold μ can be predicted. The three-dimensional connectivity-based image threshold device can be adjusted accordingly, and the device includes:

导入模块,用于将一次采集的二维图像全部导入,得到二维图像组,全部二维图像通过三维重建能够得到针对图像中目标的三维图像;The import module is used to import all the two-dimensional images collected at one time to obtain a two-dimensional image group, and all the two-dimensional images can obtain a three-dimensional image for the target in the image through three-dimensional reconstruction;

参量设定模块,用于输入设定参量的数值或者计算方式,包括为分割阈值间隔ο、判别参量阈值ε、阈值搜索下界μ0、和阈值搜索上界μ1赋值,以及选择判别参量β的计算方式;The parameter setting module is used to input the numerical value or calculation method of the setting parameter, including assigning values for the segmentation threshold interval o, the discriminant parameter threshold ε, the threshold search lower bound μ 0 , and the threshold search upper bound μ 1 , and the selection of the discriminant parameter β. Calculation;

体素数量测定模块,用于以ο为间隔,计算μ0到μ1之间的每一个阈值μ下位于前景区域中体素数量大于等于设定阈值υ的三维连通域的体素总数量N(简称为分割出的前景区域体素总数量),和/或分割出的体素总数量M,和/或分割出的非前景区域体素总数量L,并将上述参数加入队列listN、和/或listM、和/或listLThe voxel number determination module is used to calculate the total number N of voxels in the three-dimensional connected domain where the number of voxels in the foreground area is greater than or equal to the set threshold υ under each threshold μ between μ 0 and μ 1 (referred to as the total number of voxels in the foreground area), and/or the total number of voxels M, and/or the total number of voxels in the non-foreground area, L, and the above parameters are added to the queue list N , and/or list M , and/or list L ;

判别参量测定模块,计算各阈值下判别参量β并加入队列listβThe discriminant parameter measurement module calculates the discriminant parameter β under each threshold and joins the queue list β ;

阈值判定模块,按阈值μ从小到大的顺序,依次取其在队列listβ中对应的β值进行判别,直至判别参量β>判别参量阈值ε,取当前β对应的阈值μ0,并输出μ0-ο,作为最佳阈值。The threshold judgment module, in the order of the threshold μ from small to large, takes the corresponding β value in the queue list β for judgment, until the discriminant parameter β> the discriminant parameter threshold ε, takes the threshold value μ 0 corresponding to the current β, and outputs μ 0 -ο, as the optimal threshold.

上述装置中,判别参量β的设定与相应方法中判别参量β的设定一致。In the above device, the setting of the discriminant parameter β is consistent with the setting of the discriminant parameter β in the corresponding method.

优选地,该装置还包括转换模块,用于将RGB彩色图像转换为灰度图像。Preferably, the device further includes a conversion module for converting the RGB color image into a grayscale image.

本发明中的上述装置,对应的可用于执行上述方法的技术方案,其实现原理和技术效果类似,在此不再赘述。The above-mentioned apparatus in the present invention corresponds to a technical solution that can be used to execute the above-mentioned method, and the implementation principle and technical effect thereof are similar, and will not be repeated here.

本领域的技术人员可以理解:实现上述方法的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于计算机可读取存储介质中。该程序在执行时,执行包括上述方法的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps of implementing the above method can be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above method are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

实施例Example

测试环境:使用台式计算机,包含Intel i9芯片一块,64GB内存。采用window10操作系统,基于C++环境,安装ITK包。Test environment: use a desktop computer, including an Intel i9 chip, 64GB memory. Using the window10 operating system, based on the C++ environment, install the ITK package.

实施例1Example 1

对存在大面积高密度影的肺部CT图像进行肺分割,评估本发明的阈值测定方法与传统阈值法结果的差异;方法流程如图3所示。Perform lung segmentation on lung CT images with large areas of high-density shadows, and evaluate the difference between the threshold determination method of the present invention and the results of the traditional threshold method; the method flow is shown in FIG. 3 .

(1)输入存在大面积高密度影的一组肺部CT图像,其中之一如图4所示,具有显著的高密度影区域,图像组中所有CT图像按其对应的原始图像在CT扫描时的产生顺序排布;(2)设定分割阈值间隔ο(本例中默认取10),判别参量阈值ε(本例中取100);(3)选择一个小于分割阈值的值μ0作为阈值搜索初始值,根据临床经验,人体肺部组织的窗位为-450~-600之间,因此,可以选择-600作为其搜索初始值;(4)计算所有CT图像中阈值(μ0-2*ο)下体素数量大于等于设定阈值υ的三维连通域并计算它们的体素总数量N-2;(5)计算所有CT图像中阈值(μ0-ο)下体素数量大于等于设定阈值υ的三维连通域并计算它们的体素总数量N-1;(5)计算所有CT图像中阈值μ0下体素数量大于等于设定阈值υ的三维连通域并计算它们的体素总数量N0;(6)计算判别参量β=(N0-N-1)/(N-1-N-2);(7)若β>ε,则跳到(9),否者继续(8);(8)N-2←N-1,N-1←N0,μ0←μ0+ο,返回(5);(9)取β对应的阈值μ0,输出μ0-o。在该组肺部CT图像下,μ0=-270,则输入-280。图4对应的μ0=-280时候的二值化结果如图8所示。显然,在图8中,高密度影区域增加了很多的像素点,它们中既有之前被隐藏的肺组织像素,也包含部分因为阈值提高而加入的噪音数据。由于这些像素点的出现,使得高密度影区域的轮廓更加清晰。(1) Input a group of lung CT images with large areas of high-density shadows, one of which is shown in Figure 4, with a significant high-density shadow area, all CT images in the image group are scanned in CT according to their corresponding original images (2) Set the segmentation threshold interval ο (take 10 by default in this example), the discriminant parameter threshold ε (take 100 in this example); (3) select a value μ 0 smaller than the segmentation threshold as Threshold search initial value. According to clinical experience, the window level of human lung tissue is between -450 and -600. Therefore, -600 can be selected as the initial search value; (4) Calculate the threshold (μ 0 - 2*ο) the number of voxels is greater than or equal to the three-dimensional connected domain of the set threshold υ and calculate their total number of voxels N −2 ; (5) calculate the number of voxels under the threshold (μ 0 −ο) in all CT images is greater than or equal to the set Set the three-dimensional connected domain of the threshold υ and calculate their total number of voxels N −1 ; (5) Calculate the three-dimensional connected domain of all CT images with the number of voxels greater than or equal to the set threshold υ under the threshold μ 0 and calculate their total voxel number. Number N 0 ; (6) Calculate the discriminant parameter β=(N 0 -N -1 )/(N -1 -N -2 ); (7) If β>ε, skip to (9), otherwise continue ( 8); (8) N -2 ←N -1 , N -1 ←N 0 , μ 0 ←μ 0 +ο, return to (5); (9) Take the threshold μ 0 corresponding to β, and output μ 0 -o . In this group of lung CT images, if μ 0 =-270, input -280. The binarization result when μ 0 =-280 corresponding to FIG. 4 is shown in FIG. 8 . Obviously, in Figure 8, a lot of pixels have been added to the high-density shadow area, including the previously hidden lung tissue pixels and some noise data added due to the increased threshold. Due to the appearance of these pixels, the outline of the high-density shadow area is clearer.

采用人工经验选择法,根据临床经验,肺组织的CT值窗宽约为1500~2000,窗位约为-450~-600,我们选择高于最大窗位值的-350作为阈值,其二值化的结果如图5所示。采用最大类间方差法,其计算的阈值结果值为μ0=-400,其二值化的结果如图6所示。采用迭代法,其计算的阈值结果值为μ0=-400,其二值化的结果如图7所示。显然,由于取值偏低,高密度影区域的像素点较少,轮廓不够完整。Using the manual experience selection method, according to clinical experience, the CT value window width of lung tissue is about 1500 to 2000, and the window level is about -450 to -600. We choose -350, which is higher than the maximum window level, as the threshold. The result of the transformation is shown in Figure 5. Using the maximum inter-class variance method, the calculated threshold value is μ 0 =-400, and the binarization result is shown in FIG. 6 . Using the iterative method, the calculated threshold value is μ 0 =-400, and the binarization result is shown in FIG. 7 . Obviously, due to the low value, there are fewer pixels in the high-density shadow area, and the contour is not complete.

由本发明中基于三维连通性的阈值测定方法、人工经验选择法、最大类间方差法以及迭代法获得的肺分割结果可知,基于三维连通性的阈值测定方法在存在高密度影区域的肺部CT图像分割中所得到的结果明显优于其他方法所得到的结果,人工经验选择法依赖于先验知识,无法根据图像的实际情况进行自动的阈值调整;最大类间方差法和迭代法都依赖于图像的像素特征,当图像中存在较大的像素值反差区域,如肺部CT图像中出现大面积的高密度影区域,该部分的CT值要高于正常的肺组织,此时,这两种方法就会将反差区域,也就是高密度影区域分割出去而导致较大的分割误差。相比这两种方法,基于三维连通性的阈值测定方法则可以保留高密度影区域内有意义的像素,使得轮廓更加完整,有利于后期的图像分析处理,尽管也会在轮廓边缘增加少量噪音,但是可以通过后期的去噪等处理减少其干扰,比之因像素点缺失造成的局部丢失,该不足是值得的。From the lung segmentation results obtained by the three-dimensional connectivity-based threshold determination method, manual empirical selection method, maximum inter-class variance method, and iterative method in the present invention, it can be known that the three-dimensional connectivity-based threshold determination method can be used in lung CT in areas with high density shadows. The results obtained in image segmentation are obviously better than those obtained by other methods. The manual experience selection method relies on prior knowledge and cannot automatically adjust the threshold according to the actual situation of the image; the maximum inter-class variance method and the iterative method both rely on The pixel characteristics of the image, when there is a large contrast area of pixel value in the image, such as a large area of high-density shadow area in the lung CT image, the CT value of this part is higher than that of normal lung tissue. This method will divide the contrast area, that is, the high-density shadow area, and cause a large segmentation error. Compared with these two methods, the threshold determination method based on 3D connectivity can retain meaningful pixels in the high-density shadow area, making the contour more complete, which is conducive to later image analysis and processing, although it will also add a small amount of noise to the edge of the contour. , but its interference can be reduced by post-processing such as denoising, which is worthwhile compared to the local loss caused by missing pixels.

以上结合了优选的实施方式对本发明进行了说明,不过这些实施方式仅是范例性的,仅起到说明性的作用。在此基础上,可以对本发明进行多种替换和改进,这些均落入本发明的保护范围内。The present invention has been described above with reference to the preferred embodiments, but these embodiments are merely exemplary and serve only for illustrative purposes. On this basis, various substitutions and improvements can be made to the present invention, which all fall within the protection scope of the present invention.

Claims (10)

1. An image thresholding method based on three-dimensional connectivity, comprising:
s100, importing all the two-dimensional images acquired at one time to obtain a two-dimensional image group, and obtaining a three-dimensional image aiming at a target in the image through three-dimensional reconstruction of all the two-dimensional images;
s200, setting a partition threshold interval omicron, and judging a parameter threshold;
s300, selecting a threshold value to search an initial value mu0The threshold value is searched for an initial value mu0Less than or equal to a segmentation threshold;
s400, respectively calculating threshold values mu0-2 o, threshold μ0-and a threshold μ -0The total number of voxels N in the next segmented foreground region, and/or the total number of voxels M in the segmented foreground region, and/or the total number of voxels L in the segmented non-foreground region;
s500, setting a judgment parameter β based on the parameters measured in S400, wherein the judgment parameter β is used for measuring whether the total number N of the voxels in the segmented foreground region is increased steeply;
s600, if the discrimination parameter β is larger than the discrimination parameter threshold value, jumping to S800, otherwise, continuing to S700;
S700,μ0←μ0+ o, return to S400;
s800, taking the threshold value mu corresponding to the current β0And output mu0-as optimal threshold.
2. The method of claim 1, wherein the two-dimensional image is a grayscale image, and the foreground region pixel values are lower than the background region pixel values in the image;
if the two-dimensional image is an RGB color image, converting the RGB color image into a gray image;
if the pixel value of the foreground area in the image is higher than the pixel value of the background area, the maximum value of the pixel value of the current image is taken, the current value of each pixel is subtracted from the maximum value to serve as the new value of the pixel, and therefore a new image is constructed.
3. The method of claim 1, wherein the criterion β is a differential neighbor ratio of the total number N of voxels in the segmented foreground region, or
The criterion β is the difference neighbor ratio of the total number M of divided voxels, or
The discrimination parameter β is a differential neighborhood ratio of the total number L of voxels in the non-foreground region that have been segmented.
4. The method of claim 1, wherein the criterion β is a difference neighbor ratio between the absolute value of the ratio of the total number of segmented foreground region voxels N to the total number of segmented voxels M, or
The discrimination parameter β is a difference neighborhood ratio of absolute values of ratios of the total number M of the divided voxels to the total number N of the divided voxels in the foreground region.
5. The method according to claim 1, wherein the discriminant parameter β is a difference neighborhood ratio of the absolute value of the ratio of the total number of voxels N in the segmented foreground region to the total number of voxels L in the segmented non-foreground region, or
The discrimination parameter β is a difference neighbor ratio of absolute values of ratios of the total number of non-foreground region voxels L and the total number N of foreground region voxels.
6. The method of claim 1, wherein the discriminant parameter β is a difference neighbor ratio of the absolute value of the ratio of the total number of voxels L in the segmented non-foreground region to the total number of voxels M, or
The discrimination parameter β is a difference neighborhood ratio of the absolute value of the ratio of the total number M of the divided voxels to the total number L of the divided voxels in the non-foreground region.
7. Method according to one of claims 1 to 6, characterized in that, when the search range of the threshold μ can be predicted, the method can be implemented by:
s100, importing all the two-dimensional images acquired at one time to obtain a two-dimensional image group, and obtaining a three-dimensional image aiming at a target in the image through three-dimensional reconstruction of all the two-dimensional images;
s200, setting a partition threshold interval omicron, and judging a parameter threshold;
s300, selecting a value smaller than the segmentation threshold as a threshold to search a lower bound mu0(ii) a Selecting a value greater than the segmentation threshold as the upper threshold search μ1
S400, calculating mu at intervals of o0To mu1The total number of voxels N in the segmented foreground region and/or the total number of voxels M in the segmented foreground region and/or the total number of voxels L in the segmented non-foreground region under each threshold value mu are added into the queue listNAnd/or listMAnd/or listL
S500, setting a discrimination parameter β based on the parameters measured in S400, wherein the discrimination parameter β is used for measuring whether the total number N of the voxels in the divided foreground region is increased steeply, calculating the discrimination parameters β under each threshold value and adding the discrimination parameters into a queue listβ
S600, according to the threshold value mu, from small to smallBig order, get it in queue list in turnβThe β value corresponding to (1) is judged until reaching β>;
S700, taking the threshold value mu corresponding to the current β and outputting mu-o as the optimal threshold value.
8. An image thresholding device based on three-dimensional connectivity for implementing the method of one of the preceding claims 1 to 6, characterized in that it comprises:
the import module is used for importing all the two-dimensional images acquired at one time to obtain a two-dimensional image group, and three-dimensional images aiming at targets in the images can be obtained through three-dimensional reconstruction of all the two-dimensional images;
a parameter setting module for inputting the value or calculation mode of the set parameter, including dividing threshold value interval omicron, judging parameter threshold value and threshold value search initial value mu0Assigning values and selecting a calculation mode of the discrimination parameter β;
a voxel quantity determination module for determining the threshold value mu0-2 o, threshold μ0-and μ -0The total number of voxels N in the next segmented foreground region, and/or the total number of voxels M in the segmented foreground region, and/or the total number of voxels L in the segmented non-foreground region;
a discrimination parameter measuring module for sequentially measuring discrimination parameters β according to the order of the threshold value mu from small to large;
a threshold judging module for judging the value relationship between the discrimination parameter β and the discrimination parameter threshold, if the discrimination parameter β>Judging parameter threshold value, and taking current threshold value mu corresponding to β0And output mu0And if the discrimination parameter β is less than or equal to the discrimination parameter threshold, the current threshold is increased by a segmentation threshold interval and then is used as a new search threshold, and the voxel number determination module and the discrimination parameter determination module are started to perform next threshold operation again.
9. An image thresholding device based on three-dimensional connectivity for implementing the method of claim 7, wherein the device comprises:
the import module is used for importing all the two-dimensional images acquired at one time to obtain a two-dimensional image group, and three-dimensional images aiming at targets in the images can be obtained through three-dimensional reconstruction of all the two-dimensional images;
a parameter setting module for inputting the value or calculation mode of the set parameter, including dividing threshold interval omicron, judging parameter threshold, and searching lower limit mu of threshold0And threshold search upper bound mu1Assigning values and selecting a calculation mode of the discrimination parameter β;
a voxel number determination module for calculating mu at intervals of omicron0To mu1The total number of voxels N in the segmented foreground region and/or the total number of voxels M in the segmented foreground region and/or the total number of voxels L in the segmented non-foreground region under each threshold value mu are added into the queue listNAnd/or listMAnd/or listL
A discrimination parameter measuring module for calculating discrimination parameters β under each threshold value and adding the discrimination parameters into the queue listβ
A threshold value judging module, which takes the threshold values mu in the queue list in turn according to the sequence from small to large of the threshold values muβUntil the corresponding β value reaches the judgment parameter β>Judging parameter threshold value, and taking current threshold value mu corresponding to β0And output mu0-as optimal threshold.
10. The apparatus of claim 9, further comprising a conversion module for converting the RGB color image into a grayscale image.
CN202010188542.1A 2020-03-17 2020-03-17 Image threshold value determination method and device based on three-dimensional connectivity Active CN111402284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010188542.1A CN111402284B (en) 2020-03-17 2020-03-17 Image threshold value determination method and device based on three-dimensional connectivity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010188542.1A CN111402284B (en) 2020-03-17 2020-03-17 Image threshold value determination method and device based on three-dimensional connectivity

Publications (2)

Publication Number Publication Date
CN111402284A true CN111402284A (en) 2020-07-10
CN111402284B CN111402284B (en) 2023-07-25

Family

ID=71428870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010188542.1A Active CN111402284B (en) 2020-03-17 2020-03-17 Image threshold value determination method and device based on three-dimensional connectivity

Country Status (1)

Country Link
CN (1) CN111402284B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643263A (en) * 2021-08-18 2021-11-12 北京理工大学 Identification method and system for upper limb bone positioning and forearm bone fusion deformity

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2013378A1 (en) * 1989-05-31 1990-11-30 Robert J.T. Morris Technique for object orientation detection using a feed-forward neural network
JP2004097535A (en) * 2002-09-10 2004-04-02 Toshiba Corp Method for segmenting medical three-dimensional image data
JP2005117504A (en) * 2003-10-09 2005-04-28 Canon Inc Image processing apparatus and image processing method
KR20070015056A (en) * 2005-07-29 2007-02-01 소니 가부시끼 가이샤 Solid-state imaging device, driving method and imaging device of solid-state imaging device
US20100098331A1 (en) * 2008-09-26 2010-04-22 Sony Corporation System and method for segmenting foreground and background in a video
CN102637253A (en) * 2011-12-30 2012-08-15 清华大学 Video foreground object extracting method based on visual saliency and superpixel division
CN102915530A (en) * 2011-08-01 2013-02-06 佳能株式会社 Method and device for segmentation of input image
CN103778624A (en) * 2013-12-20 2014-05-07 中原工学院 Fabric defect detection method based on optical threshold segmentation
CA3104723A1 (en) * 2013-04-29 2014-10-29 Intelliview Technologies Inc. Object detection
CN104537669A (en) * 2014-12-31 2015-04-22 浙江大学 Arteriovenous retinal vessel segmentation method for eye fundus image
WO2016177337A1 (en) * 2015-05-05 2016-11-10 Shanghai United Imaging Healthcare Co., Ltd. System and method for image segmentation
CN106709928A (en) * 2016-12-22 2017-05-24 湖北工业大学 Fast noise-containing image two-dimensional maximum between-class variance threshold value method
AU2017100972A4 (en) * 2017-06-28 2017-08-17 Macau University Of Science And Technology Systems and Methods for Reducing Computer Resources Consumption to Reconstruct Shape of Multi-Object Image
AU2017201612A1 (en) * 2016-03-11 2017-09-28 Gruppo Cimbali S.P.A. Method for automatically assessing the quality of a dispensed beverage
US20180122083A1 (en) * 2014-10-09 2018-05-03 Shenzhen A&E Intelligent Technology Institute Co., Ltd. Method and device for straight line detection and image processing
CN109658424A (en) * 2018-12-07 2019-04-19 中央民族大学 A kind of improved robust two dimension OTSU threshold image segmentation method
CN109859231A (en) * 2019-01-17 2019-06-07 电子科技大学 A kind of leaf area index extraction threshold segmentation method based on optical imagery

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2013378A1 (en) * 1989-05-31 1990-11-30 Robert J.T. Morris Technique for object orientation detection using a feed-forward neural network
JP2004097535A (en) * 2002-09-10 2004-04-02 Toshiba Corp Method for segmenting medical three-dimensional image data
JP2005117504A (en) * 2003-10-09 2005-04-28 Canon Inc Image processing apparatus and image processing method
KR20070015056A (en) * 2005-07-29 2007-02-01 소니 가부시끼 가이샤 Solid-state imaging device, driving method and imaging device of solid-state imaging device
US20100098331A1 (en) * 2008-09-26 2010-04-22 Sony Corporation System and method for segmenting foreground and background in a video
CN102915530A (en) * 2011-08-01 2013-02-06 佳能株式会社 Method and device for segmentation of input image
CN102637253A (en) * 2011-12-30 2012-08-15 清华大学 Video foreground object extracting method based on visual saliency and superpixel division
CA3104723A1 (en) * 2013-04-29 2014-10-29 Intelliview Technologies Inc. Object detection
CN103778624A (en) * 2013-12-20 2014-05-07 中原工学院 Fabric defect detection method based on optical threshold segmentation
US20180122083A1 (en) * 2014-10-09 2018-05-03 Shenzhen A&E Intelligent Technology Institute Co., Ltd. Method and device for straight line detection and image processing
CN104537669A (en) * 2014-12-31 2015-04-22 浙江大学 Arteriovenous retinal vessel segmentation method for eye fundus image
WO2016177337A1 (en) * 2015-05-05 2016-11-10 Shanghai United Imaging Healthcare Co., Ltd. System and method for image segmentation
AU2017201612A1 (en) * 2016-03-11 2017-09-28 Gruppo Cimbali S.P.A. Method for automatically assessing the quality of a dispensed beverage
CN106709928A (en) * 2016-12-22 2017-05-24 湖北工业大学 Fast noise-containing image two-dimensional maximum between-class variance threshold value method
AU2017100972A4 (en) * 2017-06-28 2017-08-17 Macau University Of Science And Technology Systems and Methods for Reducing Computer Resources Consumption to Reconstruct Shape of Multi-Object Image
CN109658424A (en) * 2018-12-07 2019-04-19 中央民族大学 A kind of improved robust two dimension OTSU threshold image segmentation method
CN109859231A (en) * 2019-01-17 2019-06-07 电子科技大学 A kind of leaf area index extraction threshold segmentation method based on optical imagery

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
关涛等: "基于自适应阈值分割的宫颈细胞图像分类算法", 《信号处理》, vol. 28, no. 09 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643263A (en) * 2021-08-18 2021-11-12 北京理工大学 Identification method and system for upper limb bone positioning and forearm bone fusion deformity

Also Published As

Publication number Publication date
CN111402284B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
Rajan et al. Brain tumor detection and segmentation by intensity adjustment
Reeves et al. On measuring the change in size of pulmonary nodules
US10176408B2 (en) Systems and methods for analyzing pathologies utilizing quantitative imaging
KR20230059799A (en) A Connected Machine Learning Model Using Collaborative Training for Lesion Detection
Huang et al. Liver tumor detection and segmentation using kernel-based extreme learning machine
US8090178B2 (en) System and method for automatic detection of internal structures in medical images
CN116109663B (en) Segmentation method of gastric CT image based on multi-threshold segmentation
CN110766051A (en) Lung nodule morphological classification method based on neural network
KR102807183B1 (en) Dual attention multiple instance learning method
JP2016116843A (en) Image processing apparatus, image processing method and image processing program
CN118172380B (en) An intelligent identification and segmentation method for orthopedic leg bones based on local threshold
US11684333B2 (en) Medical image analyzing system and method thereof
CN109064470A (en) A kind of image partition method and device based on adaptive fuzzy clustering
KR101135205B1 (en) A pulmonary vessel extraction method for automatical disease detection using chest ct images
US9317926B2 (en) Automatic spinal canal segmentation using cascaded random walks
Adiwijaya et al. Follicle detection on the usg images to support determination of polycystic ovary syndrome
CN111415340B (en) Organ segmentation method and device for large-area high-density image CT image
JP2025500348A (en) Systems and methods for classifying lesions
CN116934754B (en) Liver image identification method and device based on graph neural network
Zhang et al. Automated microwave tomography (Mwt) image segmentation: State-of-the-art implementation and evaluation
CN111402284B (en) Image threshold value determination method and device based on three-dimensional connectivity
CN107564021A (en) Detection method, device and the digital mammographic system of highly attenuating tissue
RU2656761C1 (en) Method and system of segmentation of lung foci images
Gao et al. Highly automatic quantification of myocardial oedema in patients with acute myocardial infarction using bright blood T2-weighted CMR
CN117994271A (en) Human brain image segmentation method based on watershed algorithm

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