WO2022041460A1 - 基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质 - Google Patents

基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质 Download PDF

Info

Publication number
WO2022041460A1
WO2022041460A1 PCT/CN2020/124354 CN2020124354W WO2022041460A1 WO 2022041460 A1 WO2022041460 A1 WO 2022041460A1 CN 2020124354 W CN2020124354 W CN 2020124354W WO 2022041460 A1 WO2022041460 A1 WO 2022041460A1
Authority
WO
WIPO (PCT)
Prior art keywords
peak
image
peaks
chromaticity
segmentation
Prior art date
Application number
PCT/CN2020/124354
Other languages
English (en)
French (fr)
Inventor
朱绍明
任雪
Original Assignee
苏州科瓴精密机械科技有限公司
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 苏州科瓴精密机械科技有限公司 filed Critical 苏州科瓴精密机械科技有限公司
Priority to EP20951128.6A priority Critical patent/EP4206974A1/en
Priority to US18/043,428 priority patent/US20230351603A1/en
Publication of WO2022041460A1 publication Critical patent/WO2022041460A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the present invention relates to an image segmentation method, system, image segmentation device and readable storage medium based on chrominance components, and in particular to a chrominance component-based image segmentation method, system, image segmentation device and readable storage medium that effectively reduce false segmentation. Read the storage medium.
  • Image segmentation plays an extremely important role in image processing and computer vision, and it is also one of the classic problems of image processing. It is an important part of image analysis and computer vision systems, and determines the quality of digital image analysis and the quality of visual information processing results. Since color images provide richer information than grayscale images, people pay more and more attention to the segmentation of color images.
  • the commonly used color digital image segmentation methods include: histogram threshold method, region-based method, edge-based method, feature space clustering method, neural network method and so on.
  • the present invention provides an image segmentation method, system, image segmentation device and readable storage medium based on chrominance components that effectively reduce false segmentation.
  • the present invention provides an image segmentation method based on chrominance components; the method includes the following steps:
  • the image is divided into multiple regions of different chromaticity according to the segmentation threshold.
  • the acquiring the chrominance components of the image includes:
  • the HSV image is separated and the H channel image and chrominance components are obtained.
  • the acquiring the chrominance components of the image includes:
  • the original image including a first color space
  • the generating a chrominance component histogram according to the chrominance components includes:
  • the chromaticity component histogram counts the frequencies corresponding to different chromaticity values
  • the preset peak-valley setting conditions include: the frequency of crests>k*the frequency of troughs; the spacing between adjacent peaks conforms to the preset spacing between peaks; Peak frequency > frequency threshold; where k is a constant, including positive integers, fractions or decimals, etc.
  • the obtaining the segmentation threshold according to the peaks and troughs includes:
  • the segmentation threshold is obtained by the peak-valley segmentation method; if the number of peaks is less than 2, the segmentation threshold is obtained by the Otsu threshold method.
  • the obtaining the segmentation threshold by the peak-valley segmentation method includes:
  • a segmentation threshold value corresponding to an area with different chromaticity is obtained.
  • the present invention also provides an image segmentation system based on chrominance components, the system comprising:
  • a chrominance component acquisition module for acquiring chrominance components of an image
  • a statistics module which is used for generating a chrominance component histogram according to the chrominance components
  • a peak-valley identification module which is used for determining the peaks and valleys in the chromaticity component histogram according to the preset chromaticity interval and the preset peak-valley setting conditions
  • a threshold processing module which is used to obtain segmentation thresholds according to peaks and valleys
  • the image segmentation module is used to divide the image into multiple regions of different chromaticity according to the segmentation threshold.
  • the present invention also provides an image processing device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the chrominance component-based image segmentation method when the computer program is executed.
  • the present invention also provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the chrominance component-based image segmentation method.
  • the present invention obtains the segmentation threshold according to the peaks and troughs, and the segmentation threshold is dynamically adjusted according to different images, and no fixed segmentation threshold is used, thereby effectively reducing erroneous segmentation.
  • the present invention performs filtering and smoothing processing on the chrominance component histogram, reduces interference signals in the chrominance component histogram, and further reduces erroneous segmentation.
  • the present invention determines the peaks and troughs in the chromaticity component histogram according to the preset chromaticity interval and preset peak-valley setting conditions, and improves the speed of identifying the peaks and troughs.
  • FIG. 1 is a flowchart of a first embodiment of an image segmentation method based on chrominance components of the present invention
  • FIG. 2 is a flow chart of a second embodiment of an image segmentation method based on chrominance components of the present invention
  • FIG. 3 is a flowchart of a third embodiment of an image segmentation method based on chrominance components of the present invention
  • Fig. 4 is the flow chart of step S40 in Fig. 1;
  • Fig. 5 is the flowchart of step S403 in Fig. 4;
  • Fig. 7 is the result that the second image is processed through the image segmentation method based on the chrominance component of the present invention.
  • Fig. 8 is the result that the third image is processed through the image segmentation method based on the chrominance component of the present invention.
  • Fig. 9 is the result that the fourth image is processed by the image segmentation method based on the chrominance component of the present invention.
  • FIG. 10 is a schematic block diagram of an image segmentation system based on chrominance components of the present invention.
  • the present invention provides an image segmentation method based on chrominance components; the method includes the following steps:
  • Step S10 acquiring the chrominance component of the image
  • Step S20 generating a chrominance component histogram according to the chrominance components
  • Step S30 Determine peaks and troughs in the chrominance component histogram according to preset chromaticity intervals and preset peak-valley setting conditions;
  • Step S40 obtaining a segmentation threshold according to the peaks and valleys
  • Step S50 Divide the image into multiple regions with different chromaticities according to the segmentation threshold.
  • the chrominance components in the step S10 can be obtained directly or indirectly, the chrominance components in the HSV image can be obtained after being separated directly, and the chrominance components of images such as RGB can be obtained after processing such as color space conversion.
  • the step S10 includes:
  • Step S101 Acquire the HSV image orgMat
  • Step S102 Perform separation processing on the HSV image and acquire the H-channel image outsMat and chrominance components.
  • the acquired chrominance component comes from an HSV image
  • the HSV image includes a chrominance component, a luminance component and a saturation component.
  • the step S10 includes:
  • Step S110 acquiring an original image, where the original image includes a first color space
  • Step S120 Convert the original image from the first color space to the HSV color space, and obtain chrominance components.
  • the sources of the original images are different, and the original images from different sources have different formats, and the conversion processing is performed according to the format of the original images so as to obtain the chrominance components.
  • the first color space may be an RGB color space, and then the original The image is converted from the RGB color space to the HSV color space.
  • step S20 includes:
  • the preset chromaticity interval in the step S30 can be determined according to needs, and different preset chromaticity intervals are set for different usage scenarios.
  • the image segmentation method the image is segmented for lawn identification, and the preset chromaticity interval can be set to 15-95.
  • the preset peak and valley setting conditions in step S30 include:
  • Preset peak and valley setting condition 1 crest frequency>k*trough frequency, where k is a constant, including positive integers, fractions or decimals, etc.;
  • Preset peak and valley setting condition 2 The distance between adjacent peaks conforms to the preset peak distance
  • Preset peak and valley setting condition 3 peak frequency > frequency threshold.
  • the peaks and valleys in the chrominance component histogram are determined only if the preset peak-valley setting condition 1, the preset peak-valley setting condition 2 and the preset peak-valley setting condition 3 are satisfied at the same time. If the preset condition 1 and the preset peak-valley setting condition 3 are not satisfied, but the preset peak-valley setting condition 2 is not satisfied, the peak with the largest peak frequency is selected as the peak in the chrominance component histogram, and the rest of the peaks are not regarded as all peaks. peaks in the chrominance component histogram.
  • the step S40 includes:
  • Step S401 Count the number j of the peaks
  • Step S402 determine whether the number j of crests is not less than 2; if the number j of crests is not less than 2, execute step S403; if the number j of crests is less than 2, execute step S404;
  • Step S403 obtaining a segmentation threshold through a peak-valley segmentation method
  • Step S404 Obtain the segmentation threshold through the Otsu threshold method.
  • the step S403 includes:
  • Step S4031 Find out a group of peaks and valleys with the largest peak-to-valley ratio from the peaks and valleys as the target peaks and valleys, and obtain the position of the valleys in the target peaks and valleys as the first position;
  • Step S4032 Find the second position where the largest peak and valley on the left is located on the left side of the first position, find the third position where the largest peak and valley on the right side is located on the right side of the first position, and obtain the corresponding value of the second position.
  • the chromaticity value is the second peak chromaticity value h1i
  • the obtained chromaticity value corresponding to the third position is the third peak chromaticity value h2i;
  • Step S4033 Find the chromaticity value corresponding to the minimum frequency value between the second position and the third position, and divide the chromaticity value li;
  • Step S4034 Obtain segmentation thresholds [lowValue, highValue] corresponding to regions with different chromaticities according to the second peak chromaticity value h1i, the third peak chromaticity value h2i, and the segmented chromaticity value li.
  • the second peak chromaticity value h1i and the preset second peak threshold the third peak chromaticity value h2i and the preset third peak threshold are compared to obtain a peak chromaticity value comparison result, and according to the The comparison result of the peak chromaticity values obtains the segmentation thresholds corresponding to the regions with different chromaticities.
  • the preset color The minimum value of the chromaticity interval (it can also be other values in the preset chromaticity interval) is set as the minimum value lowValue of the segmentation threshold, and the segmentation chromaticity value li is set as the maximum value highValue of the segmentation threshold .
  • the segmentation color The degree value li is set as the minimum value lowValue of the segmentation threshold, and the maximum value of the preset chromaticity interval (which can also be other values of the preset chromaticity interval) is set as the maximum value of the segmentation threshold highValue.
  • the Otsu threshold method (OTSU) is used to obtain the segmentation chromaticity value li, and the segmentation threshold [lowValue ,highValue].
  • the chromaticity value and the chromaticity value of the third peak are preset according to the second preset rule.
  • the chromaticity value of the lowest dividing point is mi
  • the frequency corresponding to mi is greater than the frequency corresponding to mi+1 and mi+2.
  • the chromaticity value of some grass in the grass is in the yellow-red range (specific chromaticity). By finding the lowest dividing point, it can avoid dividing the yellow-red grass into non-grass areas after segmentation. .
  • the second peak chromaticity value and the third peak chromaticity value are preset according to the number of peaks and according to the first preset rule.
  • the second peak chromaticity value h1i is set to the lowest dividing point chromaticity value mi
  • the third peak chromaticity value h2i is set to the maximum value of the preset chromaticity interval (which can also be other values in the preset chromaticity interval).
  • the chromaticity value of the peak is h1
  • the second peak chromaticity value h1i is set as the lowest dividing point chromaticity value
  • the third peak chromaticity value is set as h1.
  • the second peak chromaticity value h1i and the third peak chromaticity value h2i are preset according to the number of peaks and according to the second preset rule.
  • the second peak chromaticity value h1i is set to the minimum value of the preset chromaticity interval (it can also be other values in the preset chromaticity interval)
  • the third peak chromaticity value is set to h2i is set as the maximum value of the preset chromaticity interval (it can also be other values in the preset chromaticity interval).
  • the chromaticity value of the peak is h1
  • the second peak chromaticity value h1i is set as h1
  • the third peak chromaticity value is set as h1.
  • the divided chromaticity value li, the second peak chromaticity value h1i and the third peak chromaticity value h2i are compared to obtain a peak chromaticity value comparison result, and according to the The comparison results of the peak chromaticity values are used to obtain segmentation thresholds corresponding to regions with different chromaticities.
  • the comparison results when the number of peaks is 0 include:
  • the split chromaticity value li is set to the minimum value lowValue of the segmentation threshold, and
  • the maximum value of the preset chromaticity interval (which may also be other values in the preset chromaticity interval) is set as the maximum value highValue of the segmentation threshold.
  • the minimum value of the preset chromaticity interval (which can also be the preset color other values in the interval) are set as the minimum value lowValue of the segmentation threshold, and the segmentation chrominance value li is set as the maximum value highValue of the segmentation threshold.
  • the second peak chromaticity value h1i is set as the The minimum value lowValue of the segmentation threshold is set, and the third peak chromaticity value h2i is set as the maximum value highValue of the segmentation threshold.
  • the second peak chromaticity value h1i is compared with the preset second peak threshold, and the third peak chromaticity value h2i is compared with the preset third peak threshold to obtain the peak chromaticity
  • the value comparison result is obtained, and according to the peak chromaticity value comparison result, the segmentation thresholds corresponding to the regions of different chromaticity are obtained.
  • the comparison process in which the number of crests is 1 is the same as the comparison process in which the number of crests j is not less than 2. Please refer to the specific process of step S4034.
  • step S10 After the image orgMat in step S10 is separated to obtain the H channel image otusMat, the first chrominance component histogram orgLabelsMat and the second chrominance component histogram labelsMat are generated in step S20; Step S30 identifies peaks and troughs, and then obtains the segmentation result dstMat after steps S40 and S50, and dstMat shows that the image has been segmented into two regions.
  • the present invention also provides an image segmentation system 10 based on chrominance components, the system includes:
  • a chrominance component acquisition module 11 which is used to acquire chrominance components of an image
  • a statistics module 12 which is used for generating a chrominance component histogram according to the chrominance components
  • a peak-valley identification module 13 which is used for determining the peaks and valleys in the chromaticity component histogram according to the preset chromaticity interval and the preset peak-valley setting conditions;
  • Threshold processing module 14 which is used to obtain segmentation thresholds according to peaks and valleys;
  • the image segmentation module 15 is used for dividing the image into a plurality of regions with different chromaticity according to the segmentation threshold.
  • the present invention also provides an image processing device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the chrominance component-based image segmentation method when the computer program is executed.
  • the present invention also provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the chrominance component-based image segmentation method.
  • the present invention obtains the segmentation threshold according to the peaks and troughs, and the segmentation threshold is dynamically adjusted according to different images, and a fixed segmentation threshold is no longer used, thereby effectively reducing erroneous segmentation.
  • the present invention performs filtering and smoothing processing on the chrominance component histogram, reduces interference signals in the chrominance component histogram, and further reduces erroneous segmentation.
  • the present invention determines the peaks and troughs in the chromaticity component histogram according to the preset chromaticity interval and preset peak-valley setting conditions, and improves the speed of identifying the peaks and troughs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

一种基于色度分量的图像分割方法;所述方法包括以下步骤:获取图像的色度分量(S10);根据所述色度分量生成色度分量直方图(S20);根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷(S30);根据波峰与波谷获取分割阈值(S40);根据分割阈值将图像分成多个不同色度的区域(S50)。根据波峰与波谷获取分割阈值,分割阈值会根据不同的图像动态调整,不再使用固定的分割阈值,从而有效减少误分割。

Description

基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质 技术领域
本发明涉及一种基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质,尤其涉及一种有效减少误分割的基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质。
背景技术
图像分割在图像处理以及计算机视觉中扮演着极其重要的角色,也是图像处理的经典难题之一。它是图像分析和计算机视觉系统的重要组成部分,并决定了数字图像分析的质量和对视觉信息处理结果的好坏。由于彩色图像提供了比灰度图像更为丰富的信息,因此对彩色图像的分割处理日益受到人们的重视。目前,常用的彩色数字图像分割方法包括:直方图阈值法、基于区域的方法、基于边缘的方法、特征空间聚类方法、神经网络方法等等。
但是,根据草坪颜色范围或固定阈值直接进行分割,可能会出现漏判、误判。
发明内容
本发明提供一种有效减少误分割的基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质。
本发明提供一种基于色度分量的图像分割方法;所述方法包括以下步骤:
获取图像的色度分量;
根据所述色度分量生成色度分量直方图;
根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
根据波峰与波谷获取分割阈值;
根据分割阈值将图像分成多个不同色度的区域。
可选地,所述获取图像的色度分量包括:
获取HSV图像;
将所述HSV图像进行分离处理并获取H通道图像与色度分量。
可选地,所述获取图像的色度分量包括:
获取原始图像,所述原始图像包括第一颜色空间;
将原始图像从第一颜色空间转换到HSV的颜色空间,并获得色度分量。
可选地,所述根据所述色度分量生成色度分量直方图包括:
根据所述色度分量生成第一色度分量直方图;
将所述第一色度分量直方图进行滤波处理与平滑处理,并获得第二色度分量直方图。
可选地,所述色度分量直方图统计不同色度值所对应的频数,所述预设峰谷设定条件包括:波峰频数>k*波谷频数;相邻波峰间距符合预设波峰间距;波峰频数>频数阈值;其中k为常数,包括正整数、分数或小数等。
可选地,所述根据波峰与波谷获取分割阈值包括:
统计所述波峰的数量;
判断波峰数量是否不小于2个;若波峰数量不小于2个,则通过峰谷分割法获取分割阈值;若波峰数量小于2个,则通过大津阈值法获取分割阈值。
可选地,所述通过峰谷分割法获取分割阈值包括:
从所述波峰与波谷中找出峰谷比最大的一组峰谷为目标峰谷,并取得所述目标峰谷中的波谷的位置为第一位置;
在第一位置左侧找出左侧的最大峰谷所在的第二位置,在第一位置右侧找出右侧的最大峰谷所在的第三位置,并获取第二位置对应的色度值为第二波峰色度值,获取第三位置对应的色度值为第三波峰色度值;
在第二位置与第三位置之间找出频数最小值所对应的色度值为分割色度值;
根据所述第二波峰色度值、所述第三波峰色度值与所述分割色度值获取不同色度的区域所对应的分割阈值。
本发明还提供一种基于色度分量的图像分割系统,所述系统包括:
色度分量获取模块,其用于获取图像的色度分量;
统计模块,其用于根据所述色度分量生成色度分量直方图;
峰谷识别模块,其用于根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
阈值处理模块,其用于根据波峰与波谷获取分割阈值;
图像分割模块,其用于根据分割阈值将图像分成多个不同色度的区域。
本发明还提供一种图像处理设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现所述基于色度分量的图像分割方法的步骤。
本发明还提供一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现所述基于色度分量的图像分割方法的步骤。
相较于现有技术,本发明根据波峰与波谷获取分割阈值,分割阈值会根据不同的图像动态调整,不再使用固定的分割阈值,从而有效减少误分割。本发明对色度分量直方图进行滤波处理与平滑处理,减少色度分量直方图中的干扰信号,进一步减少误分割。本发明根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷,提高识别波峰与波谷的速度。
附图说明
图1为本发明基于色度分量的图像分割方法的第一实施例的流程图;
图2为本发明基于色度分量的图像分割方法的第二实施例的流程图;
图3为本发明基于色度分量的图像分割方法的第三实施例的流程图;
图4为图1中步骤S40的流程图;
图5为图4中步骤S403的流程图;
图6为第一图像经过本发明基于色度分量的图像分割方法进行处理的结果;
图7为第二图像经过本发明基于色度分量的图像分割方法进行处理的结果;
图8为第三图像经过本发明基于色度分量的图像分割方法进行处理的结果;
图9为第四图像经过本发明基于色度分量的图像分割方法进行处理的结果;
图10为本发明基于色度分量的图像分割系统的原理方框图。
具体实施方式
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
请参阅图1所示,本发明提供一种基于色度分量的图像分割方法;所述方法包括以下步骤:
步骤S10:获取图像的色度分量;
步骤S20:根据所述色度分量生成色度分量直方图;
步骤S30:根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
步骤S40:根据波峰与波谷获取分割阈值;
步骤S50:根据分割阈值将图像分成多个不同色度的区域。
其中,所述步骤S10中的色度分量可直接或间接获得,HSV图像中的色度分量可直接分离后获得,而RGB等图像的色度分量可通过颜色空间转换等处理后获得。
请参阅图2所示,在本发明的另一个实施例中,所述步骤S10包括:
步骤S101:获取HSV图像orgMat;
步骤S102:将所述HSV图像进行分离处理并获取H通道图像outsMat与色度分量。
其中,所获取的色度分量来自于HSV图像,所述HSV图像包括色度分 量、亮度分量与饱和度分量。
请参阅图3所示,在本发明的另一个实施例中,所述步骤S10包括:
步骤S110:获取原始图像,所述原始图像包括第一颜色空间;
步骤S120:将原始图像从第一颜色空间转换到HSV的颜色空间,并获得色度分量。
其中,原始图像的来源不同,不同来源原始图像具有不同的格式,根据原始图像的格式进行转换处理以便于获得色度分量,例如,所述第一颜色空间可为RGB的颜色空间,再对原始图像从RGB的颜色空间转换到HSV的颜色空间。
在本发明的另一个实施例中,所述步骤S20包括:
根据所述色度分量生成第一色度分量直方图orgLabelsMat;
将所述第一色度分量直方图orgLabelsMat进行滤波处理与平滑处理,并获得第二色度分量直方图labelsMat。
在本发明的另一个实施例中,所述步骤S30中的预设色度区间可根据需要而定,不同的使用场景设置不同的预设色度区间,例如,通过本发明基于色度分量的图像分割方法将图像分割后用于草坪识别,可将所述预设色度区间设置为15-95。
在本发明的另一个实施例中,所述步骤S30中的预设峰谷设定条件包括:
预设峰谷设定条件1:波峰频数>k*波谷频数,其中,k为常数,包括正整数、分数或小数等;
预设峰谷设定条件2:相邻波峰间距符合预设波峰间距,
预设峰谷设定条件3:波峰频数>频数阈值。
同时满足预设峰谷设定条件1、预设峰谷设定条件2与预设峰谷设定条件3才确定所述色度分量直方图中的波峰与波谷,若满足预设峰谷设定条件1与预设峰谷设定条件3,但不满足预设峰谷设定条件2,则选择波峰频数最大的波峰作为所述色度分量直方图中的波峰,其余波峰不视为所述色度分量直方图中的波峰。
请参阅图4所示,在本发明的另一个实施例中,所述步骤S40包括:
步骤S401:统计所述波峰的数量j;
步骤S402:判断波峰数量j是否不小于2个;若波峰数量j不小于2个,则执行步骤S403;若波峰数量j小于2个,则执行步骤S404;
步骤S403:通过峰谷分割法获取分割阈值;
步骤S404:通过大津阈值法获取分割阈值。
请参阅图5所示,在本发明的另一个实施例中,所述步骤S403包括:
步骤S4031:从所述波峰与波谷中找出峰谷比最大的一组峰谷为目标峰谷,并取得所述目标峰谷中的波谷的位置为第一位置;
步骤S4032:在第一位置左侧找出左侧的最大峰谷所在的第二位置,在第一位置右侧找出右侧的最大峰谷所在的第三位置,并获取第二位置对应的色度值为第二波峰色度值h1i,获取第三位置对应的色度值为第三波峰色度值h2i;
步骤S4033:在第二位置与第三位置之间找出频数最小值所对应的色度值为分割色度值li;
步骤S4034:根据所述第二波峰色度值h1i、所述第三波峰色度值h2i与所述分割色度值li获取不同色度的区域所对应的分割阈值[lowValue,highValue]。根据所述第二波峰色度值h1i与预设第二波峰阈值、所述第三波峰色度值h2i 与预设第三波峰阈值进行比较处理以获得波峰色度值比较结果,并根据所述波峰色度值比较结果获取不同色度的区域所对应的分割阈值。
当所述波峰色度值比较结果满足“第二波峰色度值h1i>预设第二波峰阈值,且第三波峰色度值h2i>预设第三波峰阈值”,则将所述预设色度区间的最小值(也可为所述预设色度区间的其它数值)设置为所述分割阈值的最小值lowValue,并将所述分割色度值li设置为所述分割阈值的最大值highValue。
当所述波峰色度值比较结果不满足“第二波峰色度值h1i>预设第二波峰阈值,且第三波峰色度值h2i>预设第三波峰阈值”,则将所述分割色度值li设置为所述分割阈值的最小值lowValue,并将所述预设色度区间的最大值(也可为所述预设色度区间的其它数值)设置为所述分割阈值的最大值highValue。
例如,预设色度区间[15,95],预设第二波峰阈值=30,预设第三波峰阈值=75,若h1i>30且h2i>75(大波峰偏蓝),则lowValue=15,highValue=li;否则,则lowValue=li,highValue=95。
在本发明的另一个实施例中,若波峰数量j小于2个,则利用大津阈值法(OTSU)获取分割色度值li,并根据波峰数量获取不同色度的区域所对应的分割阈值[lowValue,highValue]。
为了精确分割图像中预设色度区间中特定色度的区域,从预设色度区间的最小值开始寻找最低分界点,若存在最低分界点,则按照第一预设规则预设第二波峰色度值与第三波峰色度值;若不存在最低分界点,则按照第二预设规则预设第二波峰色度值与第三波峰色度值。其中,所述最低分界点色度值为mi,且满足mi对应频数大于mi+1、mi+2所对应的频数。以草地图像分割为例,草地中有部分草的色度值位于黄红色度范围(特定色度),通过寻找最低分界点 可避免将黄红色度的草经分割处理后分割为非草的区域。
若存在最低分界点,再根据所述波峰数量以第一预设规则预设第二波峰色度值与第三波峰色度值。当波峰数量为0时,将第二波峰色度值h1i设定为最低分界点色度值mi,并将第三波峰色度值h2i设定为预设色度区间的最大值(也可为所述预设色度区间的其它数值)。当波峰数量为1时,所述波峰的色度值为h1,将第二波峰色度值h1i设定为最低分界点色度值,并将第三波峰色度值设定为h1。
若不存在最低分界点,再根据所述波峰数量以第二预设规则预设第二波峰色度值h1i与第三波峰色度值h2i。当波峰数量为0时,将第二波峰色度值h1i设定为预设色度区间的最小值(也可为所述预设色度区间的其它数值),并将第三波峰色度值h2i设定为预设色度区间的最大值(也可为所述预设色度区间的其它数值)。当波峰数量为1时,所述波峰的色度值为h1,将第二波峰色度值h1i设定为h1,并将第三波峰色度值设定为h1。
当波峰数量为0时,将所述分割色度值li、所述第二波峰色度值h1i与所述第三波峰色度值h2i进行比较处理以获得波峰色度值比较结果,并根据所述波峰色度值比较结果获取不同色度的区域所对应的分割阈值。
当波峰数量为0时的比较结果包括:
1-1当所述波峰色度值比较结果满足“分割色度值li>第三波峰色度值h2i”,则将所述分割色度值li设置为所述分割阈值的最小值lowValue,并将所述预设色度区间的最大值(也可为所述预设色度区间的其它数值)设置为所述分割阈值的最大值highValue。
1-2当所述波峰色度值比较结果满足“分割色度值li<第二波峰色度值 h1i”,则将所述预设色度区间的最小值(也可为所述预设色度区间的其它数值)设置为所述分割阈值的最小值lowValue,并将所述分割色度值li设置为所述分割阈值的最大值highValue。
1-3当所述波峰色度值比较结果满足“第二波峰色度值h1i≤分割色度值li≤第三波峰色度值h2i”,则将第二波峰色度值h1i设置为所述分割阈值的最小值lowValue,并将第三波峰色度值h2i设置为所述分割阈值的最大值highValue。
而当波峰数量为1时,将所述第二波峰色度值h1i与预设第二波峰阈值、所述第三波峰色度值h2i与预设第三波峰阈值进行比较处理以获得波峰色度值比较结果,并根据所述波峰色度值比较结果获取不同色度的区域所对应的分割阈值。波峰数量为1的比较处理与波峰数量j不小于2个的比较处理相同,请参照步骤S4034的具体过程。
请参阅图6-图9所示,步骤S10中的图像orgMat,在分离获得H通道图像otusMat后,经步骤S20生成第一色度分量直方图orgLabelsMat与第二色度分量直方图labelsMat;并通过步骤S30识别波峰与波谷,再经步骤S40与步骤S50后获取分割结果dstMat,dstMat显示已将图像分割成两个区域。
请参阅10所示,本发明还提供一种基于色度分量的图像分割系统10,所述系统包括:
色度分量获取模块11,其用于获取图像的色度分量;
统计模块12,其用于根据所述色度分量生成色度分量直方图;
峰谷识别模块13,其用于根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
阈值处理模块14,其用于根据波峰与波谷获取分割阈值;
图像分割模块15,其用于根据分割阈值将图像分成多个不同色度的区域。
本发明还提供一种图像处理设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现所述基于色度分量的图像分割方法的步骤。
本发明还提供一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现所述基于色度分量的图像分割方法的步骤。
综上所述,本发明根据波峰与波谷获取分割阈值,分割阈值会根据不同的图像动态调整,不再使用固定的分割阈值,从而有效减少误分割。本发明对色度分量直方图进行滤波处理与平滑处理,减少色度分量直方图中的干扰信号,进一步减少误分割。本发明根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷,提高识别波峰与波谷的速度。
此外,应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种基于色度分量的图像分割方法;其特征在于,所述方法包括以下步骤:
    获取图像的色度分量;
    根据所述色度分量生成色度分量直方图;
    根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
    根据波峰与波谷获取分割阈值;
    根据分割阈值将图像分成多个不同色度的区域。
  2. 根据权利要求1所述的基于色度分量的图像分割方法,其特征在于,所述获取图像的色度分量包括:
    获取HSV图像;
    将所述HSV图像进行分离处理并获取H通道图像与色度分量。
  3. 根据权利要求1所述的基于色度分量的图像分割方法,其特征在于,所述获取图像的色度分量包括:
    获取原始图像,所述原始图像包括第一颜色空间;
    将原始图像从第一颜色空间转换到HSV的颜色空间,并获得色度分量。
  4. 根据权利要求1所述的基于色度分量的图像分割方法,其特征在于,所述根据所述色度分量生成色度分量直方图包括:
    根据所述色度分量生成第一色度分量直方图;
    将所述第一色度分量直方图进行滤波处理与平滑处理,并获得第二色度分量直方图。
  5. 根据权利要求1所述的基于色度分量的图像分割方法,其特征在于, 所述色度分量直方图统计不同色度值所对应的频数,所述预设峰谷设定条件包括:波峰频数>k*波谷频数;相邻波峰间距符合预设波峰间距,其中k为常数,包括正整数、分数或小数等。
  6. 根据权利要求1所述的基于色度分量的图像分割方法,其特征在于,所述根据波峰与波谷获取分割阈值包括:
    统计所述波峰的数量;
    判断波峰数量是否不小于2个;若波峰数量不小于2个,则通过峰谷分割法获取分割阈值;若波峰数量小于2个,则通过大津阈值法获取分割阈值。
  7. 根据权利要求6所述的基于色度分量的图像分割方法,其特征在于,所述通过峰谷分割法获取分割阈值包括:
    从所述波峰与波谷中找出峰谷比最大的一组峰谷为目标峰谷,并取得所述目标峰谷中的波谷的位置为第一位置;
    在第一位置左侧找出左侧的最大峰谷所在的第二位置,在第一位置右侧找出右侧的最大峰谷所在的第三位置,并获取第二位置对应的色度值为第二波峰色度值,获取第三位置对应的色度值为第三波峰色度值;
    在第二位置与第三位置之间找出频数最小值所对应的色度值为分割色度值;
    根据所述第二波峰色度值、所述第三波峰色度值与所述分割色度值获取不同色度的区域所对应的分割阈值。
  8. 一种基于色度分量的图像分割系统,其特征在于,所述系统包括:
    色度分量获取模块,其用于获取图像的色度分量;
    统计模块,其用于根据所述色度分量生成色度分量直方图;
    峰谷识别模块,其用于根据预设色度区间与预设峰谷设定条件确定所述色度分量直方图中的波峰与波谷;
    阈值处理模块,其用于根据波峰与波谷获取分割阈值;
    图像分割模块,其用于根据分割阈值将图像分成多个不同色度的区域。
  9. 一种图像处理设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1-7中任一项所述基于色度分量的图像分割方法的步骤。
  10. 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-7中任一项所述基于色度分量的图像分割方法的步骤。
PCT/CN2020/124354 2020-08-31 2020-10-28 基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质 WO2022041460A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20951128.6A EP4206974A1 (en) 2020-08-31 2020-10-28 Chrominance component-based image segmentation method and system, image segmentation device, and readable storage medium
US18/043,428 US20230351603A1 (en) 2020-08-31 2020-10-28 Chrominance Component-Based Image Segmentation Method and System, Image Segmentation Device, and Readable Storage Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010894184.6A CN114119623A (zh) 2020-08-31 2020-08-31 基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质
CN202010894184.6 2020-08-31

Publications (1)

Publication Number Publication Date
WO2022041460A1 true WO2022041460A1 (zh) 2022-03-03

Family

ID=80352493

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124354 WO2022041460A1 (zh) 2020-08-31 2020-10-28 基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质

Country Status (4)

Country Link
US (1) US20230351603A1 (zh)
EP (1) EP4206974A1 (zh)
CN (1) CN114119623A (zh)
WO (1) WO2022041460A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117409029B (zh) * 2023-12-14 2024-02-13 顺通信息技术科技(大连)有限公司 一种地热系统环境影响评估方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211458A (zh) * 2006-12-26 2008-07-02 中南大学 果蝇复眼图像动态阈值的确定方法
CN102800094A (zh) * 2012-07-13 2012-11-28 南京邮电大学 一种快速彩色图像分割方法
CN103106386A (zh) * 2011-11-10 2013-05-15 华为技术有限公司 动态自适应肤色分割方法和装置
CN104021566A (zh) * 2014-06-24 2014-09-03 天津大学 基于GrabCut算法的舌诊图像自动分割方法
US10013608B2 (en) * 2015-07-17 2018-07-03 Tata Consultancy Services Limited Method and system for facilitating real time detection of linear infrastructural objects by aerial imagery

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211458A (zh) * 2006-12-26 2008-07-02 中南大学 果蝇复眼图像动态阈值的确定方法
CN103106386A (zh) * 2011-11-10 2013-05-15 华为技术有限公司 动态自适应肤色分割方法和装置
CN102800094A (zh) * 2012-07-13 2012-11-28 南京邮电大学 一种快速彩色图像分割方法
CN104021566A (zh) * 2014-06-24 2014-09-03 天津大学 基于GrabCut算法的舌诊图像自动分割方法
US10013608B2 (en) * 2015-07-17 2018-07-03 Tata Consultancy Services Limited Method and system for facilitating real time detection of linear infrastructural objects by aerial imagery

Also Published As

Publication number Publication date
US20230351603A1 (en) 2023-11-02
CN114119623A (zh) 2022-03-01
EP4206974A1 (en) 2023-07-05

Similar Documents

Publication Publication Date Title
JP4139615B2 (ja) 前景/背景セグメント化を用いた画像のイベント・クラスタリング
WO2020107866A1 (zh) 一种文字区域获取方法、装置、存储介质及终端设备
US8559708B2 (en) Image preprocessing
US8437054B2 (en) Methods and systems for identifying regions of substantially uniform color in a digital image
US8368956B2 (en) Methods and systems for segmenting a digital image into regions
US7606414B2 (en) Fusion of color space data to extract dominant color
CN110399842B (zh) 视频处理方法、装置、电子设备及计算机可读存储介质
CN109544583B (zh) 一种提取皮革图像感兴趣区域的方法、装置及设备
WO2022041460A1 (zh) 基于色度分量的图像分割方法、系统、图像分割设备及可读存储介质
CN115631350B (zh) 罐印图像的颜色识别方法和装置
CN115311466A (zh) 图像识别方法、电子设备及存储介质
CN107563986B (zh) 图像区域的判断方法和系统
CN114511583A (zh) 图像清晰度检测方法、装置、电子装置和存储介质
US20110058057A1 (en) Image capture device and method, image processing device and method, and program
JP4967045B2 (ja) 背景判別装置、方法及びプログラム
CN110659683A (zh) 图像处理方法、装置及电子设备
CN117095015A (zh) 图像分割方法、装置、计算机设备及可读存储介质
WO2022047961A1 (zh) 图像阴影检测方法、系统、图像分割设备及可读存储介质
TWI384418B (zh) 採用區域架構之影像處理方法及系統
WO2022062048A1 (zh) 粗糙度补偿方法、系统、图像处理设备及可读存储介质
CN109460745B (zh) 一种直线滤除方法、装置、设备及存储介质
CN103679170A (zh) 一种基于局部特征的显著区域检测方法
WO2020253110A1 (zh) 信息展示方法、装置、设备及存储介质
CN115908824B (zh) 一种应用于大型无人机天空区域快速分割方法
CN113627453A (zh) 一种纯色背景图像抠图方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20951128

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020951128

Country of ref document: EP

Effective date: 20230331