CN111986203B - Depth image segmentation method and device - Google Patents
Depth image segmentation method and device Download PDFInfo
- Publication number
- CN111986203B CN111986203B CN202010655269.9A CN202010655269A CN111986203B CN 111986203 B CN111986203 B CN 111986203B CN 202010655269 A CN202010655269 A CN 202010655269A CN 111986203 B CN111986203 B CN 111986203B
- Authority
- CN
- China
- Prior art keywords
- depth image
- island
- depth
- target
- image
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000003709 image segmentation Methods 0.000 title claims abstract description 18
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 32
- 230000015654 memory Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 7
- 230000000630 rising effect Effects 0.000 claims description 5
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 230000015572 biosynthetic process Effects 0.000 claims description 2
- 239000002243 precursor Substances 0.000 claims 1
- 230000011218 segmentation Effects 0.000 abstract description 27
- 235000001674 Agaricus brunnescens Nutrition 0.000 description 48
- 241000222519 Agaricus bisporus Species 0.000 description 26
- 239000000758 substrate Substances 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000018109 developmental process Effects 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 241000222518 Agaricus Species 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 206010013647 Drowning Diseases 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012625 in-situ measurement Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/40—Filling a planar surface by adding surface attributes, e.g. colour or texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及一种深度图像的分割方法及装置,属于图像处理技术领域。本发明将深度图像中的背景看作是海底,将目标本身看作耸立的岛屿,以深度图像的深度值下限作为初始水平面,逐步控制水平面的上升,在上升过程背景和低矮的目标逐渐被淹没,以水平面为界限生成一系列水洼图,对各水洼图进行识别,得到孤岛区域;基于水平面上升过程中,目标形成的孤岛区域面积在某一段水位区间上几乎不发生变化,而背景凸起部位形成的孤岛区域面积会逐渐变小且很快被淹没的原理,从孤岛图像中识别出目标,从而实现对深度图像中目标的分割。本发明充分了考虑了目标背景表面深度差异较大情况,能够准确实现深度图像的目标分割。
The invention relates to a depth image segmentation method and device, belonging to the technical field of image processing. In the invention, the background in the depth image is regarded as the seabed, the target itself is regarded as a towering island, and the lower limit of the depth value of the depth image is used as the initial level to gradually control the rise of the level. Inundation, a series of puddle maps are generated with the horizontal plane as the boundary, and each puddle map is identified to obtain the isolated island area; based on the process of water level rise, the area of the isolated island area formed by the target hardly changes in a certain water level interval, while the background According to the principle that the area of the island area formed by the raised part will gradually become smaller and quickly submerged, the target can be identified from the island image, so as to realize the segmentation of the target in the depth image. The invention fully considers the situation that the depth difference of the target background surface is large, and can accurately realize the target segmentation of the depth image.
Description
技术领域technical field
本发明涉及一种深度图像的分割方法及装置,属于图像处理技术领域。The invention relates to a depth image segmentation method and device, belonging to the technical field of image processing.
背景技术Background technique
随着人工智能和机器视觉技术的发展,各行各业对图像数据的需求量逐年增大,对图像分割技术的要求也越来越高,从而推动了自动化、智能化技术的发展。面对复杂的图像数据,如何精确的找到并分割出所需目标已成为制约图像处理技术发展的重要瓶颈,可以说图像的准确分割已成为图像处理领域最基础也是最重要的问题并亟需解决。近年来,随着双目视觉技术的发展,深度图像越来越多的用于目标检测、三维重建等领域。深度图像也被称为距离影像,它是将图像采集器到场景中各点的距离(深度)作为像素值的图像,其直接反映了物体可见表面的几何形状。在目标检测领域,传统的深度图像分割,主要采用阈值分割法,阈值分割大致分为固定阈值分割和动态阈值分割。例如名称为《基于SR300深度相机的褐蘑菇原位测量技术》(王玲、徐伟、杜开炜等)提出了一种褐蘑菇深度图像的分割方法,该方法针干扰背景,在深度图像中利用基质表面深度值众数,结合蘑菇菌柄的高度,自适应选择动态阈值,实现背景分割提取出菇盖轮廓的二值图,从而实现对褐蘑菇深度图像的分割。该方法虽然能够实现对褐蘑菇深度图像的分割,而实际上褐蘑菇的基质表面深度差异较大,若只采用基质表面深度值众数作为分割的动态阈值,会导致分割不准确。在面对复杂背景下的深度图像分割,无论是固定阈值法和动态阈值法,都不能取得良好的分割效果。因此,现急需一种使用范围更广、分割效果更好的深度图像分割方法。With the development of artificial intelligence and machine vision technology, the demand for image data in all walks of life is increasing year by year, and the requirements for image segmentation technology are getting higher and higher, thus promoting the development of automation and intelligent technology. In the face of complex image data, how to accurately find and segment the desired target has become an important bottleneck restricting the development of image processing technology. It can be said that accurate image segmentation has become the most basic and important problem in the field of image processing and needs to be solved urgently. . In recent years, with the development of binocular vision technology, depth images are increasingly used in object detection, 3D reconstruction and other fields. A depth image, also known as a range image, is an image that takes the distance (depth) from the image collector to each point in the scene as a pixel value, which directly reflects the geometry of the visible surface of an object. In the field of target detection, the traditional depth image segmentation mainly adopts the threshold segmentation method, which is roughly divided into fixed threshold segmentation and dynamic threshold segmentation. For example, the name "In-situ Measurement Technology of Brown Mushroom Based on SR300 Depth Camera" (Wang Ling, Xu Wei, Du Kaiwei, etc.) proposed a segmentation method for the depth image of brown mushroom, which interferes with the background, and in the depth image Using the mode of the depth value of the substrate surface, combined with the height of the mushroom stipe, adaptively selects the dynamic threshold, and realizes the background segmentation to extract the binary image of the mushroom cap contour, so as to realize the segmentation of the depth image of the brown mushroom. Although this method can realize the segmentation of the depth image of the brown mushroom, in fact, the depth of the substrate surface of the brown mushroom is quite different. If only the mode of the substrate surface depth value is used as the dynamic threshold of the segmentation, the segmentation will be inaccurate. In the face of depth image segmentation under complex background, neither the fixed threshold method nor the dynamic threshold method can achieve a good segmentation effect. Therefore, a depth image segmentation method with wider application range and better segmentation effect is urgently needed.
本发明对深度图像提供的丰富三维结构信息进行充分利用与挖掘,根据目标纵深结构特点,开发了一种深度图像目标分割方法及装置。The invention fully utilizes and mines the rich three-dimensional structure information provided by the depth image, and develops a depth image target segmentation method and device according to the characteristics of the target's depth structure.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种深度图像的分割方法及装置,以解决目前深度图像分割不准确的问题。The purpose of the present invention is to provide a depth image segmentation method and device to solve the current problem of inaccurate depth image segmentation.
本发明为解决上述技术问题而提供一种深度图像的分割方法,该分割方法包括以下步骤:In order to solve the above-mentioned technical problems, the present invention provides a method for segmenting a depth image, which comprises the following steps:
1)获取包含有目标的深度图像;1) Obtain a depth image containing the target;
2)对获取深度图像进行深度值转换,将深度图像的深度值转换为目标物体与基准面之间的距离;2) Perform depth value conversion on the acquired depth image, and convert the depth value of the depth image into the distance between the target object and the reference plane;
3)将转换后的深度图像的深度值下限作为水平面,将所述水平面按照设定步长逐步上升直至达到设定高度;在每次水平面上升过程中,以水平面为界限对深度图像进行二值化处理,生成对应的水洼图,从各水洼图中提出与边界分离的孤岛区域;3) The lower limit of the depth value of the converted depth image is used as the horizontal plane, and the horizontal plane is gradually raised according to the set step size until reaching the set height; in each horizontal plane rising process, the depth image is binarized with the horizontal plane as the limit. The corresponding puddle map is generated, and the isolated island area separated from the boundary is proposed from each puddle map;
4)对从各水洼图中提取出孤岛区域进行分析,选取在水平面上升过程中孤岛区域面积变化率小于设定阈值的孤岛区域作为目标。4) Analyze the isolated island area extracted from each puddle map, and select the isolated island area whose area change rate is less than the set threshold during the rise of the water level as the target.
本发明还提供了一种深度图像的分割装置,该分割装置包括处理器和存储器,所述处理器执行由所述存储器存储的计算机程序,以实现本发明的深度图像的分割方法。The present invention also provides a depth image segmentation device, the segmentation device includes a processor and a memory, and the processor executes a computer program stored in the memory to implement the depth image segmentation method of the present invention.
本发明将深度图像中的背景看作是海底,将目标本身看作耸立的岛屿,以深度图像的深度值下限作为初始水平面,逐步控制水平面的上升,在上升过程背景和低矮的目标逐渐被淹没,以水平面为界限生成一系列水洼图,对各水洼图进行识别,得到孤岛区域;基于水平面上升过程中,目标形成的孤岛区域面积在某一段水位区间上几乎不发生变化,而背景凸起部位形成的孤岛区域面积会逐渐变小且很快被淹没的原理,从孤岛图像中识别出目标,从而实现对深度图像中目标的分割。本发明充分了考虑了目标所在基质表面深度差异较大情况,能够准确实现深度图像的分割。In the invention, the background in the depth image is regarded as the seabed, the target itself is regarded as a towering island, and the lower limit of the depth value of the depth image is used as the initial level to gradually control the rise of the level. Inundation, a series of puddle maps are generated with the horizontal plane as the boundary, and each puddle map is identified to obtain an isolated island area; based on the process of water level rise, the area of the isolated island area formed by the target hardly changes in a certain water level interval, while the background According to the principle that the area of the island area formed by the raised part will gradually become smaller and quickly submerged, the target can be identified from the island image, so as to realize the segmentation of the target in the depth image. The invention fully considers the situation that the depth difference of the substrate surface where the target is located is large, and can accurately realize the segmentation of the depth image.
进一步,为了更准确得到孤岛区域,所述步骤3)中孤岛区域的形成过程如下:对生成的水洼图进行填充,形成对应填充图;将水洼图减去对应的填充图得到孤岛图,从孤岛图中得到孤岛区域。Further, in order to obtain the isolated island region more accurately, the formation process of the isolated island region in the step 3) is as follows: fill the generated puddle map to form a corresponding fill map; subtract the corresponding fill map from the puddle map to obtain the isolated island map, Get the island area from the island map.
进一步地,为更加准确筛选出目标,所述步骤4)中目标选取的依据为:Further, in order to screen out the target more accurately, the basis that the target is selected in the described step 4) is:
ISj为水位为j时某一个孤岛区域,AISj为孤岛区域ISj的面积,k为水位回溯的深度,R为面积变化率指标,T为孤岛面积阈值,ISj-k为水位回溯至j-k时ISj的前身。IS j is an isolated island area when the water level is j, AIS j is the area of the isolated island area IS j , k is the depth of the water level backtracking, R is the area change rate index, T is the island area threshold, IS jk is the water level backtracking to jk The predecessor of IS j .
进一步地,为避免重复判断,该方法还包括在确定出目标,将该目标从下一幅孤岛图中删除。Further, in order to avoid repeated judgments, the method further includes deleting the target from the next island map after determining the target.
进一步地,为提高分割的准确性,所述步骤1)中还包括对获取的深度图像进行异常点去除的步骤。Further, in order to improve the accuracy of segmentation, the step 1) also includes the step of removing abnormal points from the acquired depth image.
附图说明Description of drawings
图1是本发明深度图像的分割方法的流程图;Fig. 1 is the flow chart of the segmentation method of the depth image of the present invention;
图2是本发明深度图像的分割方法中淹没法的流程图;Fig. 2 is the flow chart of the submerged method in the segmentation method of the depth image of the present invention;
图3是本发明淹没法的原理示意图;Fig. 3 is the principle schematic diagram of the flooding method of the present invention;
图4是本发明方法实施例一中水洼图的演变过程示意图;Fig. 4 is the schematic diagram of the evolution process of the puddle map in the first embodiment of the method of the present invention;
图5是本发明方法实施例二中水洼图、填充图和孤岛图的演变过程示意图;5 is a schematic diagram of the evolution process of a sag map, a filled map and an isolated island map in
图6-a是本发明方法实施例一中获取的双孢菇深度图像;Fig. 6-a is the depth image of Agaricus bisporus obtained in the
图6-b是本发明方法实施例一中双孢菇深度图像的分割结果示意图;Figure 6-b is a schematic diagram of the segmentation result of the depth image of Agaricus bisporus in
图7是本发明深度图像的分割装置的结构示意图;7 is a schematic structural diagram of a depth image segmentation device of the present invention;
其中1为背景基质,2为阴影,3为目标,4为凸起,5为水平面。Where 1 is the background matrix, 2 is the shadow, 3 is the target, 4 is the bump, and 5 is the horizontal plane.
具体实施方式Detailed ways
下面结合附图对本发明的具体实施方式做进一步地说明。The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
方法实施例一
针对目前深度图像分割中存在问题,本发明提供了一种深度图像的分割方法,该方法将深度图像中的背景看作是海底,将目标本身看作耸立的岛屿,向干枯的海域不断注水,随着水平面的上升,背景和低矮的目标逐渐被淹没,生成一系列水洼图,对各水洼图进行识别,得到孤岛区域;基于水平面上升过程中,目标形成的孤岛面积在某一段水位区间上几乎不发生变化,而目标所在背景凸起部位形成的孤岛面积会逐渐变小且很快被淹没的原理,从孤岛区域中识别出目标,从而实现对深度图像中目标的分割。本发明适用于深度图像中背景为平面且目标与背景具有一定纵深的情况的图像背景的准确分割,例如在菇床上生长的双孢菇、褐菇等目标的检测,下面以双孢菇的深度图像为例,对本发明的图像分割方法进行详细说明,该方法的实现流程如图1所示,具体实现过程如下:Aiming at the problems existing in the current depth image segmentation, the present invention provides a depth image segmentation method, which regards the background in the depth image as the seabed, regards the target itself as a towering island, and continuously injects water into the dry sea area. As the water level rises, the background and low targets are gradually submerged, and a series of water puddle maps are generated, and each water puddle map is identified to obtain the island area; based on the process of the water level rising, the island area formed by the target is at a certain water level. There is almost no change in the interval, and the area of the island formed by the convex part of the background where the target is located will gradually become smaller and quickly submerged. The target is identified from the island area, thereby realizing the segmentation of the target in the depth image. The present invention is suitable for accurate segmentation of the image background in the case where the background in the depth image is flat and the target and the background have a certain depth, such as the detection of targets such as Agaricus bisporus and brown mushroom growing on the mushroom bed. The following takes the depth image of Agaricus bisporus as an example. The image segmentation method of the invention is described in detail. The implementation process of the method is shown in Figure 1, and the specific implementation process is as follows:
1.获取双孢菇的深度图像。1. Obtain the depth image of Agaricus bisporus.
本发明采用RealSense SR300型RGBD相机拍摄双孢菇图像,由于本实施例中针对的是菇房,因此深度相机安装在双孢菇行架采摘机器人上,可随机械臂在菇床平面内进行直线运动,深度相机安装在双孢菇行架采摘机器人上,可随机械臂在菇床平面内进行运动。由于菇架上方空间为300mm-400mm,选用RealSense SR300型RGBD相机的有效拍摄距离为100mm-1500mm,满足图像采集要求。为保证行架平台的移动精度,采用伺服电机配合0.02mm的滑台模组进行驱动,行架平台运动到指定位置,相机对指定区域进行图像采集。The present invention uses the RealSense SR300 RGBD camera to capture the image of Agaricus bisporus. Since this embodiment is aimed at the mushroom house, the depth camera is installed on the Agaricus bisporus rack picking robot, and can move linearly with the robotic arm in the mushroom bed plane. It is installed on the picking robot of Agaricus bisporus rack and can move with the mechanical arm in the plane of the mushroom bed. Since the space above the mushroom stand is 300mm-400mm, the effective shooting distance of the RealSense SR300 RGBD camera is 100mm-1500mm, which meets the requirements of image acquisition. In order to ensure the moving accuracy of the carriage platform, the servo motor is used to drive the 0.02mm sliding table module, the carriage platform moves to the designated position, and the camera captures the image of the designated area.
2.对获取的深度图像进行预处理。2. Preprocess the acquired depth image.
深度图像中有两种异常点,一种是由于结构光被遮挡后成的深度值为0的点;另外一种是由于成像系统的误差或者光线的影响等造成的明显偏离正常值的像素点;预处理的主要目的是消除这两类数据点。首先统计非0像素点深度值的下四位分数(Q1)和上四位分数(Q3),然后计Q3与Q1的差值为ΔQ,最后只保留区间[Q1-ΔQ,Q3+ΔQ]以内的像素点,实现异常点的去除。There are two kinds of abnormal points in the depth image, one is the point with a depth value of 0 after the structured light is blocked; the other is the pixel point that deviates from the normal value obviously due to the error of the imaging system or the influence of light, etc. ; The main purpose of preprocessing is to eliminate both types of data points. First, count the lower four-digit score (Q1) and the upper four-digit score (Q3) of the depth value of non-zero pixels, then calculate the difference between Q3 and Q1 as ΔQ, and finally keep only the interval [Q1-ΔQ, Q3+ΔQ] pixel points to achieve the removal of outliers.
3.对预处理后的深度图像进行深度值转换。3. Perform depth value conversion on the preprocessed depth image.
深度图像的深度值原点在相机传感器中心,图像上各点深度值代表该点距离传感器的距离,为了便于使用“淹没法”进行图像处理,将剩余的像素点统一加上h,从而将深度图像的深度值转换为目标物体与基准面之间的距离。此处,我们使用本层菇架的支撑面作为基准面,结合菇架上方空间范围300mm-400mm,菇床基质厚度200mm,h取值为550mm得到像素点的新深度值。The origin of the depth value of the depth image is at the center of the camera sensor, and the depth value of each point on the image represents the distance from the point to the sensor. In order to facilitate the use of "drowning method" for image processing, the remaining pixels are uniformly added to h, so as to combine the depth image The depth value of is converted to the distance between the target object and the datum. Here, we use the support surface of the mushroom stand on this layer as the reference surface, combine the space range above the mushroom stand 300mm-400mm, the thickness of the mushroom bed substrate 200mm, and the value of h is 550mm to obtain the new depth value of the pixel point.
4.对深度图像进行淹没法处理,得到孤岛区域。4. Submerge the depth image and get the island area.
在采集双孢菇深度图像时,如图3所示,双孢菇菇盖下方的阴影2信息无法获取,从俯视角度看,深度图像上的双孢菇近似于圆柱体压缩而成。因此本发明将双孢菇深度图像中的背景基质1(本实施例指的是菇床基质)看作是海底,将目标3(本实施例指的是双孢菇)看作耸立的岛屿,如图3所示,提出淹没法,该方法通过向干枯的海域不断注水的过程中,海底的小山丘(图3中的凸起4)被淹没,只有耸立的孤岛才会在水位持续上涨的过程中稳定的保留下来,从而实现对目标的分割。具体过程如下:When collecting the depth image of Agaricus bisporus, as shown in Figure 3, the
将水平面5从图像深度值下限(即海底)逐渐上升(每次上升设定长度,本实施例中指的是1mm);以水平面(水位值)为基准,将水平面以下的像素点重置为1,将水平面以上的像素点重置为0,从而生成一系列水洼图,如图4所示,水平面每上升次一次,对应形成一幅水洼图。对每幅水洼图中像素点为0的区域进行识别,确定出每幅水洼图中的孤岛区域。本发明采用Matlab中的regionprops命令可以从水洼图中识别出孤岛区域。Gradually raise the
5.对孤岛区域进行分析,确定目标图像。5. Analyze the island area to determine the target image.
为了从孤岛目标中区分双孢菇目标,需要对每一幅孤岛图像进行孤岛分析。由于双孢菇菇柄具有一定的高度,且菇盖具有一定的厚度,因此在水位上升过程中,双孢菇目标形成的孤岛面积在某一段水位区间上几乎不发生变化;而基质凸起部位形成的孤岛面积会逐渐变小且很快被淹没,从而将蘑菇目标与基质中的突起物进行区分。当水位上升过程中某一孤岛满足以下条件时,将被判定为蘑菇目标:In order to distinguish the Agaricus bisporus target from the island target, it is necessary to perform island analysis on each island image. Because the stalk of Agaricus bisporus has a certain height and the cap has a certain thickness, the area of the isolated island formed by the target of Agaricus bisporus hardly changes in a certain water level interval during the rise of the water level. will gradually become smaller and quickly submerge, distinguishing mushroom targets from protrusions in the substrate. When an isolated island meets the following conditions during the rising water level, it will be judged as a mushroom target:
式中,ISj为水位为j时某一个孤岛区域,AISj为孤岛ISj的面积,k为水位回溯的深度,R为面积变化率指标,T为孤岛面积阈值,ISj-k为水位回溯至j-k时ISj的前身。In the formula, IS j is an isolated island area when the water level is j, AIS j is the area of the isolated island IS j , k is the depth of the water level backtracking, R is the area change rate index, T is the island area threshold, IS jk is the water level backtracking to The predecessor of IS j when jk.
孤岛分析的准确率由水位回溯深度k、面积变化率指标R和孤岛面积阈值T决定,经过统计分析,成熟双孢菇的菇柄长度为8-13mm,考虑到菇床基质平整性问题对孤岛分析的影响,选取追溯到值k为5mm;此过程中,孤岛面积变化率[0.8-1.1]之间,因此R取值为0.2。考虑到成熟双孢菇直径大于15mm,在深度图像中像素点的个数大于1600,取T为1500过滤干扰目标。The accuracy of the isolated island analysis is determined by the water level backtracking depth k, the area change rate index R, and the isolated island area threshold T. After statistical analysis, the length of the mushroom stalk of the mature Agaricus bisporus is 8-13 mm. Influence, the traceback value k is selected to be 5mm; in this process, the change rate of the island area is between [0.8-1.1], so the value of R is 0.2. Considering that the diameter of mature Agaricus bisporus is greater than 15mm, and the number of pixels in the depth image is greater than 1600, take T as 1500 to filter the interference target.
6.提取目标图像的轮廓,实现对目标图像的分割。6. Extract the contour of the target image and realize the segmentation of the target image.
将孤岛分析中找到的双孢菇轮廓点坐标储存在数组中,为避免同一个双孢菇目标重复被找到,当双孢菇目标第一次找到时,在生成下一幅孤岛图时将已知的双孢菇目标减掉,依次循环,找出并储存每一张孤岛图中的双孢菇轮廓点坐标。最后,用所有双孢菇轮廓坐标点绘制出“双孢菇-菇床基质”分割结果。Store the coordinates of the Agaricus bisporus contour points found in the island analysis in an array. In order to avoid the same Agaricus bisporus target being found repeatedly, when the Agaricus bisporus target is found for the first time, the known Agaricus bisporus target will be subtracted when the next island map is generated. , cycle in turn, find out and store the coordinates of the contour point of Agaricus bisporus in each isolated island map. Finally, draw the segmentation result of "Agaricus bisporus-mushroom bed matrix" with all the outline coordinate points of Agaricus bisporus.
本实施例中的原始双孢菇深度图像如图6-a所示,采用上述方法得到的分割结果如图6-b所示。The original depth image of Agaricus bisporus in this embodiment is shown in Figure 6-a, and the segmentation result obtained by the above method is shown in Figure 6-b.
方法实施例二
本发明的识别方法与识别方法实施例一中方式基本一样,不同点在于“淹没法”中由水洼图得到孤岛图像的过程不一样,其流程如图2所示。The identification method of the present invention is basically the same as that in the first embodiment of the identification method, the difference is that the process of obtaining the island image from the puddle map is different in the "flooding method", and the process is shown in FIG. 2 .
采用Matlab中的regionprops命令虽然可以从水洼图中识别出孤岛区域,但是将造成图4中大片的黑色区域识别成孤岛区域,因为此时孤岛和尚未淹没区域的像素值均为0(即显示黑色)。Although the regionprops command in Matlab can be used to identify the island area from the puddle map, it will cause the large black area in Figure 4 to be identified as the island area, because the pixel values of the island and the unsubmerged area are both 0 at this time (that is, the display black).
因此本实施例中在得到水洼图后,采用填充图的方式得到孤岛区域填充的意思即使将封闭的区域进行填充(将封闭区域像素点值由0填充为1,即从黑色变成白色),在水洼图中圈出来的目标被填充掉了水洼图中圈出来的目标是孤立的封闭区域,在进行填充操作时直接将其填充掉了,如图5所示,然后水洼图减去填充图得到孤岛图,孤岛图中白色的目标便是被填充消失的封闭区域(这些封闭的区域暂时被认为是双孢菇目标,随后还要进一步筛选)。Therefore, in this embodiment, after the puddle map is obtained, the filling map is used to obtain the filling of the island area, even if the closed area is filled (the pixel value of the closed area is filled from 0 to 1, that is, from black to white) , the target circled in the puddle map is filled out. The target circled in the puddle map is an isolated closed area, which is directly filled during the filling operation, as shown in Figure 5, and then the puddle map Subtract the fill map to get the island map, and the white targets in the island map are the closed areas that have been filled and disappeared (these closed areas are temporarily considered to be the targets of Agaricus bisporus, and will be further screened later).
采用填充图得到孤岛区域的效果是:在孤岛区域中,孤岛目标的像素值为1(即显示为白色),更好的将孤岛目标的位置及面积大小提取出来。The effect of using the fill map to obtain the island area is: in the island area, the pixel value of the island target is 1 (that is, displayed as white), which can better extract the location and area of the island target.
装置实施例Device embodiment
本实施例提出的装置,如图7所示,包括处理器、存储器,存储器中存储有可在处理器上运行的计算机程序,所述处理器在执行计算机程序时实现上述方法实施例的方法。也就是说,以上方法实施例中的方法应理解可由计算机程序指令实现菇类深度图像的分割方法的流程。可提供这些计算机程序指令到处理器,使得通过处理器执行这些指令产生用于实现上述方法流程所指定的功能。The apparatus proposed in this embodiment, as shown in FIG. 7 , includes a processor and a memory. The memory stores a computer program that can be run on the processor, and the processor implements the methods of the above method embodiments when executing the computer program. That is to say, the methods in the above method embodiments should be understood as the flow of the method for segmenting the mushroom depth image by computer program instructions. The computer program instructions may be provided to a processor such that execution by the processor of the instructions results in the implementation of the functions specified by the above-described method flows.
本实施例所指的处理器是指微处理器MCU或可编程逻辑器件FPGA等的处理装置;本实施例所指的存储器包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方式的媒体加以存储。例如:利用电能方式存储信息的各式存储器,RAM、ROM等;利用磁能方式存储信息的的各式存储器,硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的各式存储器,CD或DVD。当然,还有其他方式的存储器,例如量子存储器、石墨烯存储器等等。The processor referred to in this embodiment refers to a processing device such as a microprocessor MCU or a programmable logic device FPGA; the memory referred to in this embodiment includes a physical device for storing information, usually after digitizing the information for use electrical, magnetic, or optical media. For example: all kinds of memories that use electrical energy to store information, RAM, ROM, etc.; all kinds of memories that use magnetic energy to store information, hard disks, floppy disks, magnetic tapes, magnetic core memories, magnetic bubble memories, U disks; use optical methods to store information of all kinds of memory, CD or DVD. Of course, there are other ways of memory, such as quantum memory, graphene memory, and so on.
通过上述存储器、处理器以及计算机程序构成的装置,在计算机中由处理器执行相应的程序指令来实现,处理器可以搭载各种操作系统,如windows操作系统、linux系统、android、iOS系统等。作为其他实施方式,装置还可以包括显示器,显示器用于将诊断结果展示出来,以供工作人员参考。The device constituted by the above-mentioned memory, processor and computer program is realized by the processor executing corresponding program instructions in the computer, and the processor can be equipped with various operating systems, such as windows operating system, linux system, android, iOS system, etc. As other implementation manners, the apparatus may further include a display, which is used for displaying the diagnosis results for the reference of the staff.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010655269.9A CN111986203B (en) | 2020-07-09 | 2020-07-09 | Depth image segmentation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010655269.9A CN111986203B (en) | 2020-07-09 | 2020-07-09 | Depth image segmentation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111986203A CN111986203A (en) | 2020-11-24 |
CN111986203B true CN111986203B (en) | 2022-10-11 |
Family
ID=73438661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010655269.9A Active CN111986203B (en) | 2020-07-09 | 2020-07-09 | Depth image segmentation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111986203B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113284137B (en) * | 2021-06-24 | 2023-07-18 | 中国平安人寿保险股份有限公司 | Paper fold detection method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105069808A (en) * | 2015-08-31 | 2015-11-18 | 四川虹微技术有限公司 | Video image depth estimation method based on image segmentation |
WO2017071160A1 (en) * | 2015-10-28 | 2017-05-04 | 深圳大学 | Sea-land segmentation method and system for large-size remote-sensing image |
CN110414411A (en) * | 2019-07-24 | 2019-11-05 | 中国人民解放军战略支援部队航天工程大学 | Candidate Region Detection Method for Sea Vessels Based on Visual Saliency |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10229492B2 (en) * | 2015-06-17 | 2019-03-12 | Stoecker & Associates, LLC | Detection of borders of benign and malignant lesions including melanoma and basal cell carcinoma using a geodesic active contour (GAC) technique |
-
2020
- 2020-07-09 CN CN202010655269.9A patent/CN111986203B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105069808A (en) * | 2015-08-31 | 2015-11-18 | 四川虹微技术有限公司 | Video image depth estimation method based on image segmentation |
WO2017071160A1 (en) * | 2015-10-28 | 2017-05-04 | 深圳大学 | Sea-land segmentation method and system for large-size remote-sensing image |
CN110414411A (en) * | 2019-07-24 | 2019-11-05 | 中国人民解放军战略支援部队航天工程大学 | Candidate Region Detection Method for Sea Vessels Based on Visual Saliency |
Non-Patent Citations (2)
Title |
---|
"POSEIDON: An Analytical End-to-End Performance Prediction Model for Submerged Object Detection and Recognition by Lidar Fluorosensors in the Marine Environment";Stefania Matteoli等;《IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing》;20171130;第10卷(第11期);第5110-5133页 * |
"基于Hough变换和连通体分析的混合圆形体检测算法";闫士举等;《自动化学报》;20080430;第34卷(第4期);第408-413页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111986203A (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109146948B (en) | Vision-based analysis method of crop growth phenotype parameter quantification and yield correlation | |
CN104981105B (en) | A kind of quickly accurate detection and method for correcting error for obtaining element central and deflection angle | |
CN111724433B (en) | Crop phenotype parameter extraction method and system based on multi-view vision | |
CN104036524A (en) | Fast target tracking method with improved SIFT algorithm | |
CN112395984B (en) | Method for detecting seedling guide line of unmanned agricultural machine | |
CN108470338B (en) | A water level monitoring method | |
CN110648362B (en) | A Binocular Stereo Vision Badminton Positioning Recognition and Attitude Calculation Method | |
CN111598780A (en) | Terrain adaptive interpolation filtering method suitable for airborne LiDAR point cloud | |
CN111553948B (en) | A positioning method of cutting head of roadheader based on double tracers | |
CN111986203B (en) | Depth image segmentation method and device | |
CN108280833B (en) | A skeleton extraction method for plant root bifurcation features | |
CN108182374A (en) | A kind of picking point recognition methods for fruit string | |
CN106846324B (en) | A Kinect-based Height Measurement Method for Irregular Objects | |
CN110851978B (en) | Camera position optimization method based on visibility | |
CN108986160A (en) | A kind of image laser center line extraction method containing specular light interference | |
CN112016354B (en) | Method for detecting loading state of grain tank of grain transporting vehicle based on visual identification | |
WO2024077979A1 (en) | Mushroom cluster contour segmentation and reconstruction method based on improved solov2 | |
CN107437254B (en) | A method for discriminating adjacent overlapping morphological fruits in orchards | |
CN114359314B (en) | Real-time visual key detection and localization method for humanoid piano playing robot | |
CN113686600B (en) | Performance identification device for rotary cultivator and ditcher | |
CN117036944A (en) | Tree carbon sink amount calculating method and system based on point cloud data and image recognition | |
CN116452473A (en) | A new method for counting and locating sturgeon | |
CN108682033A (en) | A kind of phase safflower filament two-dimensional image center in full bloom point extracting method | |
CN114283167A (en) | Cleaning area detection method based on vision | |
CN114708384A (en) | Visual SLAM mapping method based on linear guide feature extraction |
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 |