CN103489192B - Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf - Google Patents
Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf Download PDFInfo
- Publication number
- CN103489192B CN103489192B CN201310456191.8A CN201310456191A CN103489192B CN 103489192 B CN103489192 B CN 103489192B CN 201310456191 A CN201310456191 A CN 201310456191A CN 103489192 B CN103489192 B CN 103489192B
- Authority
- CN
- China
- Prior art keywords
- image
- arabidopsis
- images
- blade
- cusp
- 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.)
- Expired - Fee Related
Links
- 241000219194 Arabidopsis Species 0.000 title claims abstract description 35
- 238000000034 method Methods 0.000 title abstract description 20
- 241000196324 Embryophyta Species 0.000 claims description 49
- 239000000284 extract Substances 0.000 claims description 32
- 238000001514 detection method Methods 0.000 claims description 24
- 239000011159 matrix material Substances 0.000 claims description 14
- 230000009466 transformation Effects 0.000 claims description 10
- 230000000717 retained effect Effects 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 4
- 238000000354 decomposition reaction Methods 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000001914 filtration Methods 0.000 claims description 2
- 238000006243 chemical reaction Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 claims 1
- 238000000605 extraction Methods 0.000 claims 1
- 238000013316 zoning Methods 0.000 claims 1
- 230000012010 growth Effects 0.000 abstract description 9
- 108090000623 proteins and genes Proteins 0.000 abstract description 7
- 241000219195 Arabidopsis thaliana Species 0.000 description 30
- 238000005259 measurement Methods 0.000 description 8
- 238000003702 image correction Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000001066 destructive effect Effects 0.000 description 5
- 238000003709 image segmentation Methods 0.000 description 5
- 238000007781 pre-processing Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 241000037488 Coccoloba pubescens Species 0.000 description 3
- 230000007423 decrease Effects 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000010845 search algorithm Methods 0.000 description 3
- 238000009659 non-destructive testing Methods 0.000 description 2
- 230000008635 plant growth Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 239000000047 product Substances 0.000 description 2
- 239000013589 supplement Substances 0.000 description 2
- 230000001502 supplementing effect Effects 0.000 description 2
- 244000056139 Brassica cretica Species 0.000 description 1
- 235000003351 Brassica cretica Nutrition 0.000 description 1
- 235000003343 Brassica rupestris Nutrition 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- QKSKPIVNLNLAAV-UHFFFAOYSA-N bis(2-chloroethyl) sulfide Chemical compound ClCCSCCCl QKSKPIVNLNLAAV-UHFFFAOYSA-N 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 235000010460 mustard Nutrition 0.000 description 1
- 230000035790 physiological processes and functions Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种拟南芥叶片个数及叶片尖点到质心的距离的检测方法,利用相机采集拟南芥的图片,应用图像处理方法从图像中提取拟南芥的叶片个数及叶片尖点到质心的距离,实现拟南芥生长过程的无损检测。The invention relates to a method for detecting the number of leaves of Arabidopsis thaliana and the distance from the apex of the leaves to the center of mass. A camera is used to collect pictures of Arabidopsis thaliana, and the number of leaves of Arabidopsis thaliana and the tip of the leaves are extracted from the image by using an image processing method. The distance from the point to the centroid enables non-destructive testing of the growth process of Arabidopsis thaliana.
背景技术Background technique
拟南芥是植物学、基因学、遗传学中的一种重要的模式植物。对拟南芥表型的研究,可以全面、彻底地阐明拟南芥的生理功能,特别是其表型与其基因之间的相互关系,以及不同的环境条件对它生长的影响。植物表型特征的检测方法包括破坏性测量、接触性测量和计算机视觉检测方法。破坏性测量即针对一批植株,随机地抽取一定数量,用破坏性的方法测量其参数。接触性测量即采用接触式传感器测量植物的参数。采用计算机视觉技术进行测量即通过相关设备,包括CCD摄像头、光源等,获得被测对象的光谱图像,利用相关的软件、算法对图像进行处理,获得所需的数据,从而得到植物的表型参数。现有的研究工作主要是利用计算机视觉技术实现对单个叶片的分析或者其它作物的分析。李新国等利用扫描仪获取油菜叶片的图像,并利用Photoshop软件获得叶片像素数,通过分辨率得到叶片的面积(李新国,蔡胜忠,李绍鹏等.应用数字图像技术测定油梨叶面积[J].热带农业科学,2009,29(2):10-13.)。韩殿元等针对白色背景下的叶片提出一种利用颜色进行分割的算法,进而利用背景中的参考矩形板计算叶片的面积(韩殿元,黄心渊,付慧等.基于彩色通道相似性图像分割方法的植物叶面积计算[J].农业工程学报,2012,28(6):179-183.)。李少昆等利用图像技术对玉米和小麦进行图像采集,并提取相关参数(李少昆,张弦.作物株型信息多媒体图像处理技术的研究[J].作物学报,1998,24(3):265-271)。李长缨等利用计算机视觉技术对温室植物生长进行无损监测,获取植物的外部形态特征,包括叶冠投影面积和株高(李长缨,滕光辉,赵春江等.利用计算机视觉技术实现对温室植物生长的无损监测[J].农业工程学报,2003,19(3):140-143.)。Arabidopsis is an important model plant in botany, genetics and genetics. The research on Arabidopsis phenotype can comprehensively and thoroughly clarify the physiological function of Arabidopsis thaliana, especially the relationship between its phenotype and its genes, and the influence of different environmental conditions on its growth. The detection methods of plant phenotypic characteristics include destructive measurement, contact measurement and computer vision detection methods. Destructive measurement is to randomly select a certain number of plants for a batch of plants, and measure their parameters with a destructive method. Contact measurements are measurements of plant parameters using contact sensors. Using computer vision technology to measure is to obtain the spectral image of the measured object through related equipment, including CCD camera, light source, etc., and use related software and algorithms to process the image to obtain the required data, so as to obtain the phenotypic parameters of the plant . Existing research work mainly uses computer vision technology to realize the analysis of individual leaves or other crops. Li Xinguo et al. used a scanner to obtain the images of rapeseed leaves, and used Photoshop software to obtain the number of leaf pixels, and obtained the area of the leaves through the resolution (Li Xinguo, Cai Shengzhong, Li Shaopeng, etc. Determination of avocado leaf area by digital image technology [J]. Tropical Agriculture Science, 2009, 29(2):10-13.). Han Dianyuan et al. proposed an algorithm for segmenting leaves under a white background by color, and then used the reference rectangular plate in the background to calculate the area of the leaves (Han Dianyuan, Huang Xinyuan, Fu Hui, etc. Plant leaf segmentation based on color channel similarity image segmentation method Area calculation [J]. Journal of Agricultural Engineering, 2012, 28(6): 179-183.). Li Shaokun and others use image technology to collect images of corn and wheat, and extract relevant parameters (Li Shaokun, Zhang Xian. Research on multimedia image processing technology for crop plant type information [J]. Acta Crops, 1998, 24(3): 265-271 ). Li Changying et al. used computer vision technology to monitor the growth of greenhouse plants non-destructively, and obtained the external morphological characteristics of plants, including the projected area of leaf crowns and plant height (Li Changying, Teng Guanghui, Zhao Chunjiang, etc.). Using computer vision technology to realize the growth of greenhouse plants Non-destructive monitoring of [J]. Agricultural Engineering Journal, 2003, 19(3): 140-143.).
综上所述,现有的研究存在以下缺陷:In summary, the existing research has the following shortcomings:
1、采用破坏性的测量方法会对植物造成损伤,而且不能对植物的生长进行连续性测量。1. The use of destructive measurement methods will cause damage to plants, and continuous measurement of plant growth cannot be performed.
2、采用传感器测量,直接与植物进行接触,会对植物的生长产生一定的影响,而且其成本高,开发难度也相对较大。2. The use of sensors for measurement and direct contact with plants will have a certain impact on the growth of plants, and its cost is high, and its development is relatively difficult.
3、现有的计算机视觉技术主要集中在单个叶片或者其它作物的表型检测,而对拟南芥的表型检测主要依靠人工实现,工作量大、效率不高。3. The existing computer vision technology mainly focuses on the phenotype detection of a single leaf or other crops, while the phenotype detection of Arabidopsis mainly relies on manual implementation, which has a large workload and low efficiency.
目前围绕拟南芥表型的计算机视觉检测研究,在国内外鲜有文献报道。At present, there are few literature reports on computer vision detection of Arabidopsis phenotypes at home and abroad.
发明内容Contents of the invention
本发明要解决的技术问题是:如何针对拟南芥的特点,利用计算机视觉技术对拟南芥进行无损检测,提取其生长过程中的叶片个数及叶片尖点到质心的距离参数。每个叶片尖点到质心的距离用于反映每个叶 片的大小。植物的叶片个数及每个叶片的大小既可以定量地描述拟南芥的生长情况,也可以用于拟南芥基因功能的研究,即通过这些表型参数描述不同基因的拟南芥在叶片生长情况上面的差异,从而可以推断出不同基因的功能及对拟南芥植物的影响。The technical problem to be solved by the present invention is: how to use computer vision technology to perform non-destructive testing on Arabidopsis thaliana according to the characteristics of Arabidopsis thaliana, and extract the parameters of the number of leaves in the growth process and the distance from the tip of the leaf to the center of mass. The distance from the tip of each blade to the centroid is used to reflect the size of each blade. The number of leaves of a plant and the size of each leaf can not only quantitatively describe the growth of Arabidopsis thaliana, but also be used in the study of Arabidopsis gene function, that is, through these phenotypic parameters to describe the different genes in Arabidopsis thaliana. The differences in growth conditions can infer the functions of different genes and their influence on Arabidopsis plants.
(一)技术方案(1) Technical solution
为了实现上述目的,本发明提供了基于计算机视觉的拟南芥叶片个数及叶片尖点到质心距离的检测方法,包括以下步骤:In order to achieve the above object, the invention provides the number of Arabidopsis thaliana leaves based on computer vision and the detection method of the distance from the tip of the leaf to the center of mass, comprising the following steps:
S1.在拟南芥的种植盆中,放置标定板,利用相机采集拟南芥的RGB图像;S1. In the planting pot of Arabidopsis thaliana, place a calibration plate, and use the camera to collect RGB images of Arabidopsis thaliana;
S2.对采集后的图像进行预处理,实现图像的自动校正和标定,其中图像校正是为了校正图像的畸变,图像标定是为了获得单位像素的真实尺寸;S2. Preprocessing the collected image to realize automatic correction and calibration of the image, wherein the image correction is to correct the distortion of the image, and the image calibration is to obtain the true size of the unit pixel;
S3.对预处理后的图像进行分割,将拟南芥与背景分割,从图像中提取出来;S3. Segment the preprocessed image, segment the Arabidopsis thaliana from the background, and extract it from the image;
S4.提取拟南芥的叶片个数,并计算每个叶片尖点到质心的距离。S4. Extract the number of leaves of Arabidopsis thaliana, and calculate the distance from the tip of each leaf to the centroid.
采集图像中的标定板采用的是蓝框黑白棋盘格,由3×3个边长为4mm的正方形组成。将其放在拟南芥植株一侧,与其一起进行图像采集。The calibration plate in the collected image is a black and white checkerboard with a blue frame, which consists of 3×3 squares with a side length of 4mm. Place it on the side of the Arabidopsis plant and perform image acquisition with it.
步骤S2具体包括如下步骤:Step S2 specifically includes the following steps:
S2.1定位黑白棋盘格S2.1 Position black and white checkerboard
S2.1.1根据蓝色的RGB特征,提取蓝色边框;S2.1.1 Extract the blue border according to the blue RGB feature;
S2.1.2对图像的内部进行孔洞填充,再减去原来的蓝色边框图像,得到新图像;S2.1.2 fill the hole inside the image, and then subtract the original blue border image to obtain a new image;
S2.1.3对新图像进行开运算,去除噪点;再进行闭运算,连接断点,得到黑白棋盘格的区域;S2.1.3 Perform an open operation on the new image to remove noise points; then perform a close operation to connect the breakpoints to obtain a black and white checkerboard area;
S2.2角点检测S2.2 Corner detection
S.2.2.1计算黑白棋盘格区域中的每一个点的水平方向和垂直方向上的一阶导数,得到三幅新图像:水平一阶导数的平方,垂直一阶导数的平方和两个一阶导数的乘积;S.2.2.1 Calculate the horizontal and vertical first derivatives of each point in the black and white checkerboard area to obtain three new images: the square of the horizontal first derivative, the square of the vertical first derivative and two ones the product of derivatives;
S.2.2.2用高斯滤波对三幅图像进行滤波,去除噪声;S.2.2.2 Use Gaussian filtering to filter the three images to remove noise;
S.2.2.3由上述三幅图像组成相关矩阵,计算准则函数,判断其中的像素点是否为角点;S.2.2.3 Compose the correlation matrix from the above three images, calculate the criterion function, and judge whether the pixel is a corner point;
S2.3图像校正和图像标定S2.3 Image correction and image calibration
S.2.3.1通过角点检测得到棋盘格的每个正方形的顶点在图像中坐标,并根据其在真实世界中的空间位置关系,得到二者的变换矩阵;S.2.3.1 Obtain the coordinates of the vertices of each square of the checkerboard in the image through corner detection, and obtain the transformation matrix of the two according to their spatial position relationship in the real world;
S.2.3.2求取变换矩阵的逆,作用于图像,实现图像校正;S.2.3.2 Calculate the inverse of the transformation matrix and act on the image to realize image correction;
S2.3.3通过角点坐标得到黑白棋盘格的总像素个数,并根据它的真实尺寸,得到单位像素的真实尺寸;S2.3.3 Obtain the total number of pixels of the black and white checkerboard through the coordinates of the corner points, and obtain the actual size of the unit pixel according to its actual size;
步骤S3具体包括如下步骤:Step S3 specifically includes the following steps:
S3.1图像初分割S3.1 Initial image segmentation
S3.1.1对每个像素的RGB值进行归一化获得rgb,提取3g-2.4r-b的色差图,用0作为阈值对图像进行 二值化;S3.1.1 normalize the RGB value of each pixel to obtain rgb, extract the color difference map of 3g-2.4r-b, and use 0 as the threshold to binarize the image;
S3.1.2将结果减去原来检测出的蓝色边框区域,判断所获前景区域像素的G的灰度值是否大于50,若是,则保留,否则去除;S3.1.2 Subtract the original detected blue border area from the result, and judge whether the gray value of G of the obtained foreground area pixel is greater than 50, if so, keep it, otherwise remove it;
S3.1.3提取前景连通区域中的具有最多像素的区域,即为植物区域;S3.1.3 Extract the area with the most pixels in the foreground connected area, which is the plant area;
S3.2去除噪点S3.2 Remove noise
S3.2.1对所得图像进行开运算,得到新的图像,其将只保留大叶片区域和植物的中心区域,而去除图像中的细节部分,包括植物的茎和叶片周围的噪点;S3.2.1 Perform an open operation on the obtained image to obtain a new image, which will only retain the large leaf area and the center area of the plant, and remove the details in the image, including the noise around the stem of the plant and the leaves;
S3.2.2对去除的细节部分的各个连通区域计算其像素个数,像素个数小于12的直接去除;S3.2.2 Calculate the number of pixels of each connected region of the removed detail part, and directly remove the number of pixels less than 12;
S3.2.3像素个数大于等于12的连通区域,分别单独与开运算得到的新图像叠加,再计算叠加后图像中的区域个数,如果区域个数减少,说明该连通区域是茎,必须保留,否则,如果叠加后图像中的区域个数增加或者不变,则说明该连通区域是叶片周围的噪点,必须去除;S3.2.3 The connected regions with the number of pixels greater than or equal to 12 are separately superimposed with the new image obtained by the open operation, and then calculate the number of regions in the superimposed image. If the number of regions decreases, it means that the connected region is a stem and must be retained , otherwise, if the number of regions in the image increases or remains unchanged after superposition, it means that the connected region is the noise around the leaf and must be removed;
S3.2.4判断完所有的细节部分后,将保留的所有连通区域全部与开运算得到的新图像叠加,得到最终的植物区域;S3.2.4 After judging all the details, superimpose all the retained connected regions with the new image obtained by the open operation to obtain the final plant region;
步骤S4具体包括如下步骤:Step S4 specifically includes the following steps:
S4.1对植物区域的孔洞进行填充,计算区域的质心;S4.1 fills the holes in the plant area, and calculates the centroid of the area;
S4.2通过轮廓查找算法,提取填充后的植物区域的外轮廓点;S4.2 Extract the outer contour points of the filled plant area through the contour search algorithm;
S4.3计算每个外轮廓点到植物区域质心的距离,从而将2维(2D)图像变成1维(1D)信号;S4.3 calculates the distance from each outer contour point to the centroid of the plant area, thereby turning the 2-dimensional (2D) image into a 1-dimensional (1D) signal;
S4.4对S4.3中所述的1D信号进行数据点镜像填充,使其扩展到2的整数次幂倍,得到新的1D信号;S4.4 Perform data point image filling on the 1D signal described in S4.3 to expand it to an integer power of 2 to obtain a new 1D signal;
S4.5对S4.4得到的1D信号进行4层Haar小波分解,提取第4层与S4.3中所述的1D信号长度相同的小波系数;S4.5 performs 4-layer Haar wavelet decomposition on the 1D signal obtained in S4.4, and extracts the wavelet coefficients of the fourth layer having the same length as the 1D signal described in S4.3;
S4.6查找小波系数中的正过零点,即某个点的前一个点小于0而后一个点大于0,这些正过零点表示的是S4.3中所述的1D信号的局部最大值;对于单个叶片而言,其叶片尖点距离植物区域的质心最远,即1D信号的局部最大值是每个叶片的尖点,故通过查找1D信号的局部最大值就可获得植物的叶片个数;S4.6 Find the positive zero-crossing points in the wavelet coefficients, that is, the previous point of a certain point is less than 0 and the next point is greater than 0. These positive zero-crossing points represent the local maximum of the 1D signal described in S4.3; for For a single leaf, the tip of the leaf is the farthest from the centroid of the plant area, that is, the local maximum of the 1D signal is the cusp of each leaf, so the number of leaves of the plant can be obtained by finding the local maximum of the 1D signal;
S4.7计算图像中每个叶片的尖点到质心的长度,将长度的像素个数与图像标定步骤得到的单位像素的真实长度相乘,得到每个叶片的尖点到质心的真实距离。S4.7 Calculate the length from the cusp to the centroid of each leaf in the image, and multiply the number of pixels of the length by the real length of the unit pixel obtained in the image calibration step to obtain the real distance from the cusp to the centroid of each leaf.
(二)有益结果(2) Beneficial results
本发明方法利用计算机视觉技术采集拟南芥的图像,利用图像处理技术实现了拟南芥表型的无损检测。通过检测蓝框黑白棋盘格的蓝色边框,并用角点检测算法检测内部的角点,最终实现了图像的自动校正和标定。对拟南芥采用归一化的rgb值线性组合进行阈值分割,并通过再次判断植物区域的细节,去除不必要的噪点,从而实现了在不影响拟南芥正常生长的情况下,将拟南芥从复杂的自然生长环境中分割出来。分割出植物后,再提取出拟南芥叶片个数及每个叶片的尖点到质心的距离。相对于传统人工观察和测 量,该方法在效率上有了较大的提高。The method of the invention uses computer vision technology to collect images of Arabidopsis thaliana, and uses image processing technology to realize the non-destructive detection of Arabidopsis phenotype. By detecting the blue border of the black and white checkerboard of the blue frame, and using the corner detection algorithm to detect the internal corner points, the automatic correction and calibration of the image is finally realized. For Arabidopsis thaliana, the linear combination of normalized rgb values is used for threshold segmentation, and by judging the details of the plant area again, unnecessary noise is removed, so that the Arabidopsis can be divided without affecting the normal growth of Arabidopsis. Mustard is separated from the complex natural growth environment. After the plants were segmented, the number of Arabidopsis leaves and the distance from the tip of each leaf to the centroid were extracted. Compared with traditional manual observation and measurement, this method has greatly improved the efficiency.
附图说明Description of drawings
通过阅读参照以下附图对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1为依照本发明一个实施例的拟南芥叶片个数及叶片尖点到质心的距离检测方法的流程图;Fig. 1 is the flow chart of the distance detection method of the number of Arabidopsis thaliana leaves and the blade apex to the centroid according to one embodiment of the present invention;
图2为本发明提供的方法中所使用的用于采集图像的采集转置;Fig. 2 is used in the method provided by the present invention to be used for the acquisition transposition of acquisition image;
图3为本发明提供的预处理方法处理过程中生成的图像,其中,子图(1)为依照本发明方法采集的拟南芥的RGB图像,(2)为经过预处理后生成的黑白棋盘格区域,(3)为经过预处理后生成的角点检测图像,(4)为经过预处理后生成的校正后的图像;Fig. 3 is the image generated in the process of the preprocessing method provided by the present invention, wherein, the subgraph (1) is the RGB image of Arabidopsis thaliana collected according to the method of the present invention, and (2) is the black and white checkerboard generated after preprocessing grid area, (3) is the corner detection image generated after preprocessing, and (4) is the corrected image generated after preprocessing;
图4为本发明提供的图像分割方法处理过程中生成的图像,其中,子图(1)为经过图像初分割步骤后生成的二值图像,(2)为经过噪点去除步骤后生成的最终的拟南芥的图像;Fig. 4 is the image generated during the processing of the image segmentation method provided by the present invention, wherein, the sub-image (1) is the binary image generated after the initial image segmentation step, and (2) is the final image generated after the noise removal step image of Arabidopsis;
图5为本发明提供的拟南芥的叶片个数及叶片尖点到质心的距离提取方法处理过程中生成的图像,其中,子图(1)为植物区域内的孔洞填充后的结果,(2)为经过轮廓查找算法提取出的植物区域的外轮廓,(3)为每个外轮廓点到质心的距离信号,(4)为距离信号的长度扩展成2的整数次幂得到的结果,(5)为该距离信号经过Haar小波分解后得到的第四层小波系数,及其正过零点,(6)为检测出的原距离信号的局部最大值,(7)为检测出的叶片尖点,及每个尖点到质心的距离。Fig. 5 is the number of leaves of Arabidopsis thaliana provided by the present invention and the image generated in the process of extracting the distance from the tip of the leaf to the center of mass, wherein, the sub-figure (1) is the result after the holes in the plant area are filled, ( 2) is the outer contour of the plant area extracted by the contour search algorithm, (3) is the distance signal from each outer contour point to the centroid, (4) is the result obtained by expanding the length of the distance signal to an integer power of 2, (5) is the fourth layer wavelet coefficient obtained after the distance signal is decomposed by Haar wavelet, and its positive zero-crossing point, (6) is the detected local maximum value of the original distance signal, (7) is the detected blade tip points, and the distance from each cusp to the centroid.
具体实施方式detailed description
本发明提出的一种拟南芥叶片个数及叶片尖点到质心的距离检测方法,结合附图和实施例详细说明如下。以下实施例将有助于本领域的技术人员进一步理解本发明,但不以任何形式限制本发明。应当指出的是,对本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改变。这些都属于本发明的保护范围。A method for detecting the number of Arabidopsis thaliana leaves and the distance from the apex of the leaves to the center of mass proposed by the present invention is described in detail in conjunction with the accompanying drawings and embodiments as follows. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be pointed out that those skilled in the art can make several modifications and changes without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
为快速提取拟南芥的表型参数,本发明一种拟南芥叶片个数及叶片尖点到质心的距离检测方法。该方法对采集的图像进行预处理之后,从复杂的背景环境中分割出拟南芥,在此基础上对拟南芥的叶片个数及叶片尖点到质心的距离参数进行提取,提高了拟南芥的表型参数获取效率。In order to quickly extract the phenotypic parameters of Arabidopsis thaliana, the invention discloses a detection method for the number of Arabidopsis thaliana leaves and the distance from the tip of the leaves to the center of mass. After the method preprocesses the collected images, Arabidopsis is segmented from the complex background environment. On this basis, the parameters of the number of leaves of Arabidopsis and the distance from the tip of the leaf to the center of mass are extracted, which improves the accuracy of the simulation. Acquisition efficiency of phenotypic parameters in A. thaliana.
如图1所示,依照本发明一个实施例的拟南芥叶片个数及叶片尖点到质心的距离检测方法包括步骤:As shown in Figure 1, according to an embodiment of the present invention, the number of Arabidopsis thaliana leaves and the distance detection method from the tip of the leaf to the centroid include steps:
S1在拟南芥的种植盆中,放置标定板,利用CCD相机采集拟南芥的RGB图像;S1 In the planting pot of Arabidopsis thaliana, place a calibration plate, and use a CCD camera to collect RGB images of Arabidopsis thaliana;
在本实例中,可以采用图2的采集装置进行图像的采集。该采集装置包括:CCD相机1、支架2、照明装置3和拟南芥4,标定板5放在拟南芥的一侧。标定板采用的是蓝框黑白棋盘格,由3×3个边长为4mm的正方形组成。In this example, the acquisition device in FIG. 2 may be used for image acquisition. The collection device includes: a CCD camera 1, a bracket 2, an illumination device 3 and Arabidopsis 4, and a calibration plate 5 is placed on one side of the Arabidopsis. The calibration board uses a black and white checkerboard with a blue frame, which consists of 3×3 squares with a side length of 4mm.
S2对采集后的图像进行预处理,具体包括如下子步骤:S2 preprocesses the collected images, specifically including the following sub-steps:
S2.1定位黑白棋盘格S2.1 Position black and white checkerboard
S2.1.1根据蓝色的RGB特征,R和G的灰度值都小于B,且B的灰度值大于150,从图像中分割出蓝色边框。S2.1.1 According to the RGB characteristics of blue, the gray values of R and G are both smaller than B, and the gray value of B is greater than 150, and the blue border is segmented from the image.
S2.1.2对图像的内部进行孔洞填充,其结果减去原来的蓝色边框图像,得到新图像。S2.1.2 Fill the hole inside the image, and subtract the original blue border image from the result to obtain a new image.
S2.1.3对新图像进行开运算,去除噪点;再进行闭运算,连接断点,得到黑白棋盘格的区域。S2.1.3 Perform an opening operation on the new image to remove noise points; then perform a closing operation to connect the breakpoints to obtain a black and white checkerboard area.
S2.2角点检测S2.2 Corner detection
S.2.2.1计算黑白棋盘格区域中的每一个点的水平方向和垂直方向上的一阶导数。采用如下Prewitt模板进行计算,即用3×3区域的第三列和第一列之差近似为水平方向的导数,用第三行和第一行之差近似为垂直方向的导数。用这两个子模板和图像卷积,得到两个与图像大小相同的矩阵,记为Ix,Iy,进而计算三幅新图像:Ix 2,Iy 2和IxIy。S.2.2.1 Calculate the horizontal and vertical first derivatives of each point in the black and white checkerboard area. The following Prewitt template is used for calculation, that is, the difference between the third column and the first column of the 3×3 area is used to approximate the derivative in the horizontal direction, and the difference between the third row and the first row is used to approximate the derivative in the vertical direction. Use these two sub-templates to convolve with the image to get two matrices with the same size as the image, denoted as I x , I y , and then calculate three new images: I x 2 , I y 2 and I x I y .
S.2.2.2考虑到图像会受到噪声的干扰,采用101×101的高斯窗口对三幅图像进行滤波,去除噪声。S.2.2.2 Considering that the image will be disturbed by noise, use a 101×101 Gaussian window to filter the three images to remove noise.
S.2.2.3由三幅新图像组成相关矩阵M:S.2.2.3 The correlation matrix M is composed of three new images:
利用该矩阵计算准则函数R:Use this matrix to calculate the criterion function R:
R=det(M)-k·(trace(M))2 R=det(M)-k·(trace(M)) 2
其中k一般取0.04。Among them, k is generally taken as 0.04.
对于每个像素点,都可以得到一个R值,若某个点的R值大于0.01Rmax,且其为3×3邻域的局部最大值,则其将被判断为角点。For each pixel point, an R value can be obtained. If the R value of a point is greater than 0.01R max and it is the local maximum value of the 3×3 neighborhood, it will be judged as a corner point.
S2.3图像校正和图像标定S2.3 Image correction and image calibration
S.2.3.1通过角点检测得到棋盘格的每个正方形的顶点在图像中坐标,在真实世界中,这些顶点组成每一个正方形,根据其空间位置关系,可设置这些顶点的坐标。令其中某个点在图像中的坐标为(x’,y’)T,在空间中的坐标为(x,y)T,其齐次坐标分别为(x’1,x’2,x’3)T和(x1,y,1)T,二者之间存在射影失真变换,变换矩阵是关于齐次三维坐标的线性变换H,如下表示:S.2.3.1 Obtain the coordinates of the vertices of each square of the checkerboard in the image through corner point detection. In the real world, these vertices form each square, and the coordinates of these vertices can be set according to their spatial position relationship. Let the coordinates of a point in the image be (x', y') T , and the coordinates in space be (x, y) T , and its homogeneous coordinates are (x' 1 , x' 2 , x' 3 ) T and (x 1 , y, 1) T , there is a projective distortion transformation between them, and the transformation matrix is a linear transformation H about the homogeneous three-dimensional coordinates, expressed as follows:
因为图像的非齐次坐标可由齐次坐标表示为:Because the non-homogeneous coordinates of the image can be expressed by the homogeneous coordinates as:
所以每一组匹配点可得到两个如下方程:So each set of matching points can get two following equations:
(h31x+h32y+h33)x′=h11x+h12y+h13 (h 31 x+h 32 y+h 33 )x′=h 11 x+h 12 y+h 13
(h31x+h32y+h33)y′=h21x+h22y+h23 (h 31 x+h 32 y+h 33 )y′=h 21 x+h 22 y+h 23
用至少四对匹配点即可求出变换矩阵H。The transformation matrix H can be obtained with at least four pairs of matching points.
S.2.3.2求取变换矩阵H的逆,再作用于图像,实现图像的校正。S.2.3.2 Obtain the inverse of the transformation matrix H, and then act on the image to realize image correction.
S2.3.3通过角点坐标计算黑白棋盘格区域内的总像素个数Nb,并根据它的真实尺寸,即9×(4mm)2=144mm2,得到单位像素的真实尺寸,即:S2.3.3 Calculate the total number of pixels N b in the black and white checkerboard area through the coordinates of the corner points, and according to its real size, that is, 9×(4mm) 2 =144mm 2 , to obtain the real size of the unit pixel, namely:
S3对预处理后的图像进行分割,将拟南芥从图像中提取出来,具体包括如下子步骤:S3 segments the preprocessed image, and extracts Arabidopsis from the image, specifically including the following sub-steps:
S3.1图像初分割S3.1 Initial image segmentation
S3.1.1对每个像素的RGB值进行归一化获得rgb,方法如下:S3.1.1 Normalize the RGB value of each pixel to obtain rgb, as follows:
提取3g-2.4r-b的色差图,用0作为阈值对图像进行二值化,即:若Extract the color difference map of 3g-2.4r-b, and use 0 as the threshold to binarize the image, that is: if
I=3g-2.4r-b≥0I=3g-2.4r-b≥0
则将该像素判断为前景植物的像素,否则为背景像素。Then the pixel is judged as the pixel of the foreground plant, otherwise it is the background pixel.
S3.1.2将结果减去原来检测出的蓝色边框区域。判断所获前景区域的像素的G的灰度值是否大于50,若是,则保留该像素,否则将该像素判断为背景像素,从区域中去除。S3.1.2 Subtract the original detected blue frame area from the result. Determine whether the gray value of G of the pixel in the foreground area is greater than 50, if so, keep the pixel, otherwise determine the pixel as a background pixel and remove it from the area.
S3.1.3提取前景连通区域中的具有最多像素的区域,即为植物区域。S3.1.3 Extract the area with the most pixels in the foreground connected area, which is the plant area.
S3.2去除噪点S3.2 Remove noise
S3.2.1对所得图像用7×7的disk模板进行开运算,得到新的图像,其将只保留大叶片区域和植物的中心区域,而去除图像中的细节部分,包括植物的茎和叶片周围的噪点。S3.2.1 Use the 7×7 disk template to open the obtained image to obtain a new image, which will only retain the large leaf area and the center area of the plant, and remove the detailed parts of the image, including the stems and leaves of the plant of noise.
S3.2.2对去除的细节部分的各个连通区域计算其像素个数,像素个数小于12的直接去除。S3.2.2 Calculate the number of pixels in each connected region of the removed detail part, and remove the number of pixels less than 12 directly.
S3.2.3像素个数大于等于12的连通区域,分别单独与开运算得到的新图像叠加,再计算叠加后图像中的区域个数,如果区域个数减少,说明该连通区域是茎,必须保留,否则,如果叠加后图像中的区域个数增加或者不变,则说明该连通区域是叶片周围的噪点,必须去除。S3.2.3 The connected regions with the number of pixels greater than or equal to 12 are separately superimposed with the new image obtained by the open operation, and then calculate the number of regions in the superimposed image. If the number of regions decreases, it means that the connected region is a stem and must be retained , otherwise, if the number of regions in the image increases or remains unchanged after superimposition, it means that the connected region is the noise around the leaf and must be removed.
S3.2.4判断完所有的细节部分后,将保留的所有连通区域全部与开运算得到的新图像叠加,得到最终的植物区域。S3.2.4 After judging all the details, superimpose all the retained connected regions with the new image obtained by the open operation to obtain the final plant region.
S4提取拟南芥的叶片个数,并计算每个叶片尖点到质心的距离,具体包括如下子步骤:S4 extracts the number of leaves of Arabidopsis thaliana, and calculates the distance from the tip of each leaf to the centroid, specifically including the following sub-steps:
S4.1孔洞填充S4.1 Hole filling
S4.1.1给定孔洞中的一个点作为起始点,并将其置为1,其它点全都置为0,组成一个新的区域X0。S4.1.1 A point in the hole is given as the starting point, and it is set to 1, and all other points are set to 0, forming a new area X 0 .
S4.1.2用如下的对称结构单元对X0进行膨胀,并与原图像区域的补进行交集运算,得到一个新的区域X1。S4.1.2 Use the following symmetrical structure unit to expand X 0 , and perform intersection operation with the complement of the original image area to obtain a new area X 1 .
S4.1.3判断X1是否与X0相等,若相等,孔洞填充结束,否则令X0=X1,并重复第二步。S4.1.3 Determine whether X 1 is equal to X 0 , if they are equal, the hole filling ends, otherwise set X 0 =X 1 , and repeat the second step.
S4.2查找轮廓S4.2 Find contours
S4.2.1选择填充孔洞后的植物区域的左上角的点作为起始点b0,令c0为b0西侧的背景点。S4.2.1 Select the point at the upper left corner of the plant area after filling the hole as the starting point b 0 , let c 0 be the background point on the west side of b 0 .
S4.2.2从c0开始以顺时针方向检测b0的8个相邻点,令b1为检测到的第一个不为0的点,并令c0为检测序列中b1之前的点,存储b0,b1。S4.2.2 Starting from c 0 , detect 8 adjacent points of b 0 in a clockwise direction, let b 1 be the first detected point that is not 0, and let c 0 be the point before b 1 in the detection sequence , store b 0 , b 1 .
S4.2.3判断b1是否与b0相等,若相等,轮廓查找结束,否则令b0=b1,并重复第二步。S4.2.3 Determine whether b 1 is equal to b 0 , if they are equal, the contour search ends, otherwise set b 0 =b 1 , and repeat the second step.
S4.3提取1维信号S4.3 Extract 1D signal
S4.3.1查找轮廓后,获得轮廓序列,提取该轮廓序列中每个轮廓点的x坐标和y坐标。S4.3.1 After searching the contour, obtain the contour sequence, and extract the x-coordinate and y-coordinate of each contour point in the contour sequence.
S4.3.2计算每个外轮廓点到植物区域质心的距离。令某个外轮廓点在图像中的坐标为(xi,yi),质心在图像中的坐标为(xo,yo),二者之间的距离为:S4.3.2 Calculate the distance from each outer contour point to the centroid of the plant area. Let the coordinates of a certain outer contour point in the image be (x i , y i ), the coordinates of the center of mass in the image be (x o , y o ), and the distance between them is:
通过计算每个点的距离Di,得到一个1D信号S,从而将2D图像变成1D信号。By calculating the distance D i of each point, a 1D signal S is obtained, thereby turning the 2D image into a 1D signal.
S4.4扩展信号S4.4 Extended signal
S4.4.1令S4.3中所述的1D信号的长度为N0,计算N0以2为底的对数值,得到的结果取整数并加1,得到数值k。S4.4.1 Let the length of the 1D signal described in S4.3 be N 0 , calculate the base 2 logarithm of N 0 , round the obtained result to an integer and add 1 to obtain the value k.
S4.4.2若2k小于2N0,则对S4.3中所述的1D信号进行镜像翻转,补充到S4.3中所述的1D信号之后,取前2k个数据点,得到新的信号。S4.4.2 If 2 k is less than 2N 0 , perform mirror flip on the 1D signal described in S4.3, supplement the 1D signal described in S4.3, and take the first 2 k data points to obtain a new signal .
S4.4.3若2k大于2N0,则对S4.3中所述的1D信号补充镜像翻转的信号之后,再补充S4.3中所述的1D信号,然后再取前2k个数据点,得到新的信号。S4.4.3 If 2 k is greater than 2N 0 , after supplementing the 1D signal described in S4.3 with the mirror-inverted signal, supplement the 1D signal described in S4.3, and then take the first 2 k data points, get a new signal.
S4.5小波变换S4.5 Wavelet transform
S4.5.1对S4.4得到的1D信号进行4层Haar小波分解,提取第4层小波系数。S4.5.1 Perform 4-layer Haar wavelet decomposition on the 1D signal obtained in S4.4, and extract the wavelet coefficients of the 4th layer.
S4.5.2对获得的小波系数提取前N0个数据点,得到新的1D信号SC,使其S4.3中所述的1D信号长度相同。S4.5.2 Extract the first N 0 data points from the obtained wavelet coefficients to obtain a new 1D signal S C , so that the 1D signals described in S4.3 have the same length.
S4.6查找正过零点S4.6 Find the positive zero-crossing point
S4.6.1对1D信号SC分别右移一位和左移一位,得到SC1和SC2。S4.6.1 Shift the 1D signal S C to the right and to the left by one bit respectively to obtain S C1 and S C2 .
S4.6.2查找满足下列条件的点:S4.6.2 Find points satisfying the following conditions:
(SC=0I SC2>0)∪(SC1<0I SC<0I SC2>0)(S C =0I S C2 >0)∪(S C1 <0I S C <0I S C2 >0)
满足上述条件的点即为SC信号的正过零点,即某个点的前一个点小于0而后一个点大于0,这些正过零点表示的是S4.3中所述的1D信号S的局部最大值。对于单个叶片而言,其叶片尖点距离植物区域的质心最远,即1D信号的局部最大值是每个叶片的尖点。故通过查找1D信号的局部最大值就可获得植物的叶片个数。Points that meet the above conditions are the positive zero-crossing points of the S C signal, that is, the previous point of a certain point is less than 0 and the next point is greater than 0. These positive zero-crossing points represent the local part of the 1D signal S described in S4.3. maximum value. For a single leaf, its leaf cusp is farthest from the centroid of the plant area, ie the local maximum of the 1D signal is the cusp of each leaf. Therefore, the number of leaves of the plant can be obtained by finding the local maximum value of the 1D signal.
S4.7叶片长度S4.7 Blade length
S4.7.1计算图像中每个叶片的尖点到质心的长度,令某个叶片尖点在图像中的坐标为(xi,yi),质心在图像中的坐标为(xo,yo),二者之间的距离为:S4.7.1 Calculate the length from the cusp of each blade in the image to the centroid, let the coordinates of a leaf cusp in the image be ( xi , y i ), and the coordinates of the centroid in the image be (x o , y o ), the distance between them is:
S4.7.2将长度的像素个数与图像标定步骤得到的单位像素的真实面积的开方相乘,得到每个叶片的尖点到质心的真实距离,即:S4.7.2 Multiply the number of pixels of the length by the square root of the real area per pixel obtained in the image calibration step to obtain the real distance from the cusp of each blade to the centroid, namely:
以下结合实施例子进一步说明本发明的方法,该方法包括以下步骤:The method of the present invention is further described below in conjunction with examples of implementation, and the method may further comprise the steps:
S1在拟南芥的种植盆中,放置标定板,利用相机采集拟南芥的RGB图像。标定板采用的是蓝框黑白棋盘格,由3×3个边长为4mm的正方形组成。将其放在拟南芥一侧,与其一起进行图像采集,采集的图片如图3(1)所示。S1 In the planting pot of Arabidopsis thaliana, a calibration plate is placed, and RGB images of Arabidopsis thaliana are collected by a camera. The calibration board uses a black and white checkerboard with a blue frame, which consists of 3×3 squares with a side length of 4mm. Put it on the side of Arabidopsis thaliana, and perform image collection together with it, and the collected pictures are shown in Figure 3 (1).
S2对采集后的图像进行预处理,实现图像的自动校正和标定。S2 preprocesses the collected images to realize automatic correction and calibration of the images.
S2.1定位黑白棋盘格S2.1 Position black and white checkerboard
S2.1.1根据蓝色的RGB特征,R和G的灰度值都小于B,且B的灰度值大于150,从图像中分割出蓝色边框。S2.1.1 According to the RGB characteristics of blue, the gray values of R and G are both smaller than B, and the gray value of B is greater than 150, and the blue border is segmented from the image.
S2.1.2对图像的内部进行孔洞填充,其结果减去原来的蓝色边框图像,得到新图像。S2.1.2 Fill the hole inside the image, and subtract the original blue border image from the result to obtain a new image.
S2.1.3对新图像进行开运算,去除噪点;再进行闭运算,连接断点,得到黑白棋盘格的区域,如图3(2)所示。S2.1.3 Perform an opening operation on the new image to remove noise points; then perform a closing operation to connect the breakpoints to obtain a black and white checkerboard area, as shown in Figure 3(2).
S2.2角点检测S2.2 Corner detection
S.2.2.1用Prewitt模板和图像卷积,计算黑白棋盘格区域中的每一个点的水平方向和垂直方向上的一阶导数,得到三幅新图像:水平一阶导数的平方,垂直一阶导数的平方和两个一阶导数的乘积。S.2.2.1 Use the Prewitt template and image convolution to calculate the horizontal and vertical first-order derivatives of each point in the black and white checkerboard area, and obtain three new images: the square of the horizontal first-order derivative, the vertical one The square of the first derivative and the product of the two first derivatives.
S.2.2.2采用101×101的高斯窗口对三幅图像进行滤波,去除噪声。S.2.2.2 Use a 101×101 Gaussian window to filter the three images to remove noise.
S.2.2.3由上述三幅图像组成相关矩阵,计算准则函数,找出角点。如图3(3)所示,各个角点已用红点标出。S.2.2.3 Compose the correlation matrix from the above three images, calculate the criterion function, and find out the corner points. As shown in Figure 3(3), each corner point has been marked with a red dot.
S2.3图像校正和图像标定S2.3 Image correction and image calibration
S.2.3.1通过角点检测得到棋盘格的16个正方形的顶点按照从左到右,从上到下的顺序在图像中坐标如下:S.2.3.1 The coordinates of the 16 square vertices of the checkerboard in the image from left to right and top to bottom obtained through corner point detection are as follows:
(163,370) (224,362) (286,354) (347,347)(163,370) (224,362) (286,354) (347,347)
(171,430) (233,423) (294,415) (356,407)(171,430) (233,423) (294,415) (356,407)
(179,491) (241,484) (302,476) (346,468)(179,491) (241,484) (302,476) (346,468)
(187,553) (249,545) (311,537) (372,529)(187,553) (249,545) (311,537) (372,529)
根据其在真实世界中是严格的正方形,将各个点的坐标规定为:According to its strict square in the real world, the coordinates of each point are specified as:
(164,347) (225,347) (286,347) (347,347)(164,347) (225,347) (286,347) (347,347)
(164,408) (225,408) (286,408) (347,408)(164,408) (225,408) (286,408) (347,408)
(164,469) (225,469) (286,469) (347,469)(164,469) (225,469) (286,469) (347,469)
(164,530) (225,530) (286,530) (347,530)(164,530) (225,530) (286,530) (347,530)
计算出这两组坐标的变换矩阵为:Calculate the transformation matrix of these two sets of coordinates as:
S.2.3.2该变换矩阵的逆为:S.2.3.2 The inverse of the transformation matrix is:
将其作用于图像,实现图像校正,恢复图像的度量特性,结果如图3(4)所示。Apply it to the image to achieve image correction and restore the metric properties of the image. The result is shown in Figure 3(4).
S2.3.3通过角点坐标得到黑白棋盘格的总像素个数是35721,并根据它的真实尺寸,即9×(4mm)2=144mm2,得到单位像素的真实尺寸,即:S2.3.3 The total number of pixels of the black and white checkerboard is 35721 through the coordinates of the corner points, and according to its real size, that is, 9×(4mm) 2 =144mm 2 , the real size of the unit pixel is obtained, namely:
S3对预处理后的图像进行分割,将拟南芥从图像中提取出来,具体包括如下子步骤:S3 segments the preprocessed image, and extracts Arabidopsis from the image, specifically including the following sub-steps:
S3.1图像初分割S3.1 Initial image segmentation
S3.1.1对每个像素的RGB值进行归一化获得rgb,提取3g-2.4r-b的色差图,用0作为阈值对图像进行二值化。S3.1.1 Normalize the RGB value of each pixel to obtain rgb, extract the color difference map of 3g-2.4r-b, and use 0 as the threshold to binarize the image.
S3.1.2将结果减去原来检测出的蓝色边框区域。判断所获前景区域的像素的G的灰度值是否大于50,若是,则保留该像素,否则将该像素判断为背景像素,从区域中去除。S3.1.2 Subtract the original detected blue frame area from the result. Determine whether the gray value of G of the pixel in the foreground area is greater than 50, if so, keep the pixel, otherwise determine the pixel as a background pixel and remove it from the area.
S3.1.3提取前景连通区域中的具有最多像素的区域,即为植物区域,结果如图4(1)所示。S3.1.3 Extract the area with the most pixels in the foreground connected area, which is the plant area, and the result is shown in Figure 4(1).
S3.2去除噪点S3.2 Remove noise
S3.2.1对所得图像用7×7的disk模板进行开运算,得到新的图像,其将只保留大叶片区域和植物的中心区域,而去除图像中的细节部分,包括植物的茎和叶片周围的噪点。S3.2.1 Use the 7×7 disk template to open the obtained image to obtain a new image, which will only retain the large leaf area and the center area of the plant, and remove the detailed parts of the image, including the stems and leaves of the plant of noise.
S3.2.2对去除的细节部分的各个连通区域计算其像素个数,像素个数小于12的直接去除。S3.2.2 Calculate the number of pixels in each connected region of the removed detail part, and remove the number of pixels less than 12 directly.
S3.2.3像素个数大于等于12的连通区域,分别单独与开运算得到的新图像叠加,再计算叠加后图像中的区域个数,如果区域个数减少,说明该连通区域是茎,必须保留,否则,如果叠加后图像中的区域个数增加或者不变,则说明该连通区域是叶片周围的噪点,必须去除。S3.2.3 The connected regions with the number of pixels greater than or equal to 12 are separately superimposed with the new image obtained by the open operation, and then calculate the number of regions in the superimposed image. If the number of regions decreases, it means that the connected region is a stem and must be retained , otherwise, if the number of regions in the image increases or remains unchanged after superimposition, it means that the connected region is the noise around the leaf and must be removed.
S3.2.4判断完所有的细节部分后,将保留的所有连通区域全部与开运算得到的新图像叠加,得到最终的植物区域,结果如图4(2)所示。S3.2.4 After judging all the details, superimpose all the retained connected regions with the new image obtained by the open operation to obtain the final plant region, the result is shown in Figure 4(2).
S4.提取拟南芥的叶片个数,并计算每个叶片尖点到质心的距离,具体包括如下子步骤:S4. Extract the number of leaves of Arabidopsis thaliana, and calculate the distance from the tip of each leaf to the centroid, specifically including the following sub-steps:
S4.1对植物区域的孔洞进行填充,其结果如图5(1)所示。S4.1 fills the holes in the plant area, and the result is shown in Figure 5(1).
S4.2通过轮廓查找算法,提取填充后的植物区域的外轮廓点如图5(2)所示。S4.2 Through the contour search algorithm, extract the outer contour points of the filled plant area as shown in Fig. 5(2).
S4.3提取1维信号S4.3 Extract 1D signal
S4.3.1查找轮廓后,获得轮廓序列,提取该轮廓序列中每个轮廓点的x坐标和y坐标。S4.3.1 After searching the contour, obtain the contour sequence, and extract the x-coordinate and y-coordinate of each contour point in the contour sequence.
S4.3.2计算每个外轮廓点到植物区域质心的距离,如图5(3)所示。S4.3.2 Calculate the distance from each outer contour point to the centroid of the plant area, as shown in Figure 5(3).
S4.4扩展信号S4.4 Extended signal
S4.4.1S4.3中所述的1D信号的长度为1163,计算1163以2为底的对数值,得到的结果取整数并加1,得到数值11。The length of the 1D signal described in S4.4.1S4.3 is 1163, and the base 2 logarithm of 1163 is calculated, and the obtained result is rounded up to an integer and 1 is added to obtain the value 11.
S4.4.2因为2048小于2326,则对S4.3中所述的1D信号进行镜像翻转,补充到S4.3中所述的1D信号之后,取前2048个数据点,得到新的信号,如图5(4)所示。S4.4.2 Because 2048 is less than 2326, the 1D signal described in S4.3 is mirrored and flipped, and after supplementing the 1D signal described in S4.3, the first 2048 data points are taken to obtain a new signal, as shown in the figure 5(4).
S4.5小波变换S4.5 Wavelet transform
S4.5.1对S4.4得到的1D信号进行4层Haar小波分解,提取第4层小波系数。S4.5.1 Perform 4-layer Haar wavelet decomposition on the 1D signal obtained in S4.4, and extract the wavelet coefficients of the 4th layer.
S4.5.2对获得的小波系数提取前1163个数据点,得到新的1D信号,使其与S4.3中所述的1D信号长度相同。S4.5.2 Extract the first 1163 data points from the obtained wavelet coefficients to obtain a new 1D signal, making it the same length as the 1D signal described in S4.3.
S4.6查找正过零点S4.6 Find the positive zero-crossing point
S4.6.1对1D信号SC分别右移一位和左移一位,得到SC1和SC2。S4.6.1 Shift the 1D signal S C to the right and to the left by one bit respectively to obtain S C1 and S C2 .
S4.6.2查找此信号的正过零点,结果如图5(5)所示。这些正过零点表示的是此1D信号的局部最大值,如图5(6)所示。对于单个叶片而言,其叶片尖点距离植物区域的质心最远,即1D信号的局部最大值是每个叶片的尖点。故通过查找1D信号的局部最大值的个数就可获得植物的叶片个数。S4.6.2 Find the positive zero-crossing point of this signal, and the result is shown in Figure 5(5). These positive zero-crossing points represent the local maximum of the 1D signal, as shown in Fig. 5(6). For a single leaf, its leaf cusp is farthest from the centroid of the plant area, ie the local maximum of the 1D signal is the cusp of each leaf. Therefore, the number of leaves of the plant can be obtained by finding the number of local maxima of the 1D signal.
S4.7叶片长度S4.7 Blade length
S4.7.1图像中叶片尖点的坐标为:S4.7.1 The coordinates of the tip of the blade in the image are:
(497,360) (485,232) (590,256) (607,324) (673,397) (600,480) (507,506)(412,409)(497,360) (485,232) (590,256) (607,324) (673,397) (600,480) (507,506 )(412,409 )
质心的坐标为:(542,373)The coordinates of the centroid are: (542, 373)
计算图像中每个叶片的尖点到质心的距离:Compute the distance from the cusp to the centroid of each leaf in the image:
di=[47.02 152.18 126.43 81.28 133.00 121.60 137.54 135.05]d i =[47.02 152.18 126.43 81.28 133.00 121.60 137.54 135.05]
S4.7.2将长度的像素个数与图像标定步骤得到的单位像素的真实面积的开方相乘,得到每个叶片的尖点到质心的真实距离,即:S4.7.2 Multiply the number of pixels of the length by the square root of the real area per pixel obtained in the image calibration step to obtain the real distance from the cusp of each blade to the centroid, namely:
单位是毫米。结果如图5(7)所示。The unit is mm. The result is shown in Figure 5(7).
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310456191.8A CN103489192B (en) | 2013-09-30 | 2013-09-30 | Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310456191.8A CN103489192B (en) | 2013-09-30 | 2013-09-30 | Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103489192A CN103489192A (en) | 2014-01-01 |
CN103489192B true CN103489192B (en) | 2017-01-11 |
Family
ID=49829390
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310456191.8A Expired - Fee Related CN103489192B (en) | 2013-09-30 | 2013-09-30 | Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103489192B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108171718A (en) * | 2017-11-23 | 2018-06-15 | 北京林业大学 | A kind of small daisy_petal part number automatic testing method based on wavelet transformation |
CN109087241A (en) * | 2018-08-22 | 2018-12-25 | 东北农业大学 | A kind of agricultural crops image data nondestructive collection method |
CN109509200B (en) * | 2018-12-26 | 2023-09-29 | 深圳市繁维医疗科技有限公司 | Checkerboard corner detection method based on contour extraction and computer readable storage medium |
CN110307934A (en) * | 2019-06-18 | 2019-10-08 | 合肥安杰特光电科技有限公司 | A kind of non-uniform object mass center real-time detection method based on pattern analysis |
CN113989361B (en) * | 2021-10-22 | 2023-04-07 | 中国平安财产保险股份有限公司 | Animal body length measuring method, device, equipment and medium based on artificial intelligence |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101231755A (en) * | 2007-01-25 | 2008-07-30 | 上海遥薇实业有限公司 | Moving target tracking and quantity statistics method |
CN101271576A (en) * | 2008-05-08 | 2008-09-24 | 上海交通大学 | Checkerboard Pattern Recognition and Positioning Method under Complex Illumination and Surface Conditions |
CN102615052A (en) * | 2012-02-21 | 2012-08-01 | 上海大学 | Machine visual identification method for sorting products with corner point characteristics |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4387643B2 (en) * | 2002-07-31 | 2009-12-16 | 富士通株式会社 | Processing device with personal recognition function |
-
2013
- 2013-09-30 CN CN201310456191.8A patent/CN103489192B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101231755A (en) * | 2007-01-25 | 2008-07-30 | 上海遥薇实业有限公司 | Moving target tracking and quantity statistics method |
CN101271576A (en) * | 2008-05-08 | 2008-09-24 | 上海交通大学 | Checkerboard Pattern Recognition and Positioning Method under Complex Illumination and Surface Conditions |
CN102615052A (en) * | 2012-02-21 | 2012-08-01 | 上海大学 | Machine visual identification method for sorting products with corner point characteristics |
Also Published As
Publication number | Publication date |
---|---|
CN103489192A (en) | 2014-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103471523B (en) | A kind of detection method of arabidopsis profile phenotype | |
CN111738314B (en) | Deep learning method for multimodal image visibility detection model based on shallow fusion | |
CN107516077B (en) | Traffic sign information extraction method based on fusion of laser point cloud and image data | |
CN103489192B (en) | Method for detecting number of Arabidopsis leaves and distance between cusp and center of mass of each leaf | |
CN103593840B (en) | Method for detecting phenotype of Arabidopsis | |
CN102231191B (en) | Multimodal image feature extraction and matching method based on ASIFT (affine scale invariant feature transform) | |
CN107578418A (en) | A Contour Detection Method for Indoor Scenes by Fusion of Color and Depth Information | |
CN105069746A (en) | Video real-time human face substitution method and system based on partial affine and color transfer technology | |
CN102074012B (en) | Method for three-dimensionally reconstructing tender shoot state of tea by combining image and computation model | |
CN111339989B (en) | Water body extraction method, device, equipment and storage medium | |
CN105046648A (en) | Method for constructing high temporal-spatial remote sensing data | |
CN105160647B (en) | A kind of panchromatic multispectral image fusion method | |
CN113240626A (en) | Neural network-based method for detecting and classifying concave-convex flaws of glass cover plate | |
Lü et al. | Leaf area measurement based on image processing | |
CN107610128A (en) | The method for inspecting and device of a kind of oil level indicator | |
CN103591887B (en) | A kind of detection method of arabidopsis region phenotype | |
CN103295241A (en) | Frequency domain significance target detection method based on Gabor wavelet | |
CN112200854B (en) | A three-dimensional phenotypic measurement method of leafy vegetables based on video images | |
CN103927758A (en) | Saliency detection method based on contrast ratio and minimum convex hull of angular point | |
CN107818303A (en) | Unmanned plane oil-gas pipeline image automatic comparative analysis method, system and software memory | |
CN106529531A (en) | Chinese chess identification system and method based on image processing | |
CN105139401A (en) | Depth credibility assessment method for depth map | |
CN106056625A (en) | Airborne infrared moving target detection method based on geographical homologous point registration | |
CN111476723B (en) | Remote sensing image lost pixel recovery method for failure of Landsat-7 scanning line corrector | |
CN104899857A (en) | Camera calibration method and apparatus using a color-coded structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170111 Termination date: 20170930 |