Image-based plant root phenotyping method, system and device
Through computer vision technology, the topological structure of plant roots is extracted and their individual root characteristics are analyzed, which solves the problem of difficulty in analyzing root topological structure in the existing technology, and achieves rapid and accurate measurement of root phenotypic parameters.
Patent Information
- Application Number
- CN202210195411.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-03-01
AI Technical Summary
The prior art is difficult to conduct detailed analysis of the topological structure of plant roots, especially the detection and feature analysis of individual roots, and there are cross-over and overlapping problems, making it difficult to analyze topological structures.
Using a computer vision-based method, the plant root image is acquired and corrected, and preprocessed to extract the root skeleton topology, detect endpoints and intersections, build a connection diagram, use a single source path search algorithm to obtain the main root path, and recursively obtain the side root topology and level level.
The detection and characteristic analysis of any individual root in the plant root system is achieved, the problems of subjectivity and inefficiency of traditional methods are overcome, and the phenotypic parameters of the plant root system can be quickly and accurately measured.
Smart Images

Figure CN114549511B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a plant root phenotype analysis method, system and device based on computer vision. Background Art
[0002] In the prior art, rice roots are segmented based on image processing technology to extract root color features, divergence features, etc., but only global analysis can be performed, and individual rootlets cannot be analyzed. Alternatively, rice roots are extracted through adaptive threshold segmentation and morphological transformation, especially a special morphological transformation is used to remove burrs and fractures produced during the segmentation process, which provides segmentation ideas for subsequent researchers to study the topological structure of the root system. The disadvantage is that small roots cannot be retained, and the author did not provide further research ideas for root topological structure analysis. In addition, some people have provided a survey of existing root contact observation and contactless image acquisition technologies. Among them, Schubart used the soil profile method combined with the water flushing method, Sach used the glass partition observation method, and Weaver improved and standardized the root excavation method, but in general, the root research method is still mainly based on the manual excavation method. With the improvement of technical conditions, three-dimensional photography, nuclear magnetic resonance, 3D laser scanning, etc. detect roots with a diameter of not less than 5mm and convert them into image information, etc.
[0003] In the current research on plant root systems, the research on root measurement or analysis is generally mainly: 1. Improve the separation of roots, edge successor observation and manual operation through new devices; 2. Use modern technology, especially image processing and computer vision technology, to achieve root segmentation and global feature extraction (including total length, total cross-sectional area, overall color, etc.). The disadvantage is that modern analysis needs to understand the topological structure characteristics of the root system, such as the number of all roots in the root system, the length of each root, the root diameter of each root, etc., that is, it is necessary to analyze independent single roots. The difficulty lies in the intersection and overlap between different roots, which makes the analysis of the topological structure extremely difficult.
[0004] The main problem solved by this patent is to provide a theoretical basis for the analysis of the root system topology and a specific solution to achieve the detection and feature analysis of any individual root in the root system, including the analysis of the global features of the root system. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a plant root phenotype analysis method, system and device based on computer vision.
[0006] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0007] A method for analyzing plant root phenotypes based on an image, comprising the following steps:
[0008] Acquire an original plant root system image and perform correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image;
[0009] Preprocessing the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtaining the plant root system skeleton topological structure based on the root system binary image;
[0010] Based on the plant root skeleton topological structure, endpoints and intersections are detected respectively to obtain an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points;
[0011] Construct a connected graph based on the endpoint set, the intersection set and the segment Array set, where any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph;
[0012] According to the single-source path search algorithm, all arbitrary two end points in the connected graph are traversed to obtain a first path, and a taproot path is obtained based on the first path, and then taproot phenotypic information is obtained, wherein the taproot phenotypic information includes taproot length and taproot thickness;
[0013] Based on the intersection of the segment Array set and the main root path, according to the smoothness principle, the lateral root topology structure and the corresponding hierarchy are recursively obtained to obtain all lateral root paths, where each lateral root path is composed of one or more elements in the segmentArray set.
[0014] As an implementable method, the endpoint and intersection detection are performed based on the plant root skeleton topological structure to obtain an endpoint set and an intersection set, including the following steps:
[0015] Perform endpoint detection and intersection detection on the topological structure of the plant root skeleton to obtain endpoint combination and intersection set;
[0016] The segment with endpoints / intersections as starting points and ending points is divided into segment Arrays, and the segment excludes the starting and ending points and does not contain other endpoints / joint points. Each segment in the segment Array is an independent metadata.
[0017] As an implementable method, the method traverses all arbitrary two endpoints in the connectivity graph according to a single-source path search algorithm to obtain a first path, obtains a main root path based on the first path, and then obtains the main root phenotype information, including the following steps:
[0018] According to a single-source path search algorithm, traverse all arbitrary two end points in the connected graph to obtain a first path;
[0019] The first path is screened by a preset screening condition. If the first path meets the preset screening condition, the corresponding first path is the main root path, and the length of the first path is the main root length;
[0020] Based on the taproot path, the taproot width was obtained using the plumb line measurement method.
[0021] As an implementable method, the preset screening condition is at least that the number of intersections is greater than the number of intersections on the first path formed by any other two endpoints.
[0022] As an implementable method, based on the segment Array set and the intersection points on the main root path, according to the smoothness principle, recursively obtain the lateral root topology structure and the corresponding hierarchical level, and then obtain all lateral root paths, including the following steps:
[0023] Traverse the intersection points on the main root path, start the first-level search from the segment Array collection with the intersection point on the main root path as the starting point, and end the search if the segment is an endpoint, and get the lateral root topology structure of the corresponding level;
[0024] If it is an intersection, the second level search is performed from the segment Array set as the starting point until one end is found as an endpoint, then the search ends and the lateral root topology structure of the corresponding level is obtained;
[0025] Each lateral root path is obtained based on the lateral root topology structure.
[0026] As an implementable method, when there is a bifurcation in the lateral root path, the path with the largest obtuse angle between the current segment and the next connected candidate segment at the intersection is selected.
[0027] As an implementable method, the correction process is performed by combining four identifiers to obtain a corrected plant root system image, including the following steps:
[0028] Set the center coordinates of the four identifiers to C in clockwise or counterclockwise order. 1 , C 2 , C 3 , C 4 , where C 1is the center coordinate of the first corner identifier, C 2 is the center coordinate of the second corner identifier, C 3 is the center coordinate of the third corner identifier, C 4 The center coordinates of the fourth corner identifier are set, and the aspect ratio of the rectangle formed by the center coordinates is set to a:b;
[0029] The center coordinates C of the identifiers of two adjacent corners 1 , C 4 Perform rectangular fitting to obtain the transformed center coordinates C 2 ', C 3 ';
[0030] Based on the center coordinate set [C 1 ,C 2 ,C 3 ,C 4 ] and the transformed center coordinate set [C 1 ,C 2 ',C 3 ',C 4 ]Get the transformation matrix;
[0031] Performing global transformation processing on the original plant root system image based on the transformation matrix to obtain a second image;
[0032] The aspect ratio of the rectangle formed by the transformed central coordinate set is set to a:c, and the width of the second image is scaled according to the aspect ratio a:b with a transformation ratio of b / c to obtain a corrected plant root image.
[0033] As an implementable method, preprocessing the corrected plant root system image to obtain a root system binary image containing only the root system area includes the following steps:
[0034] Obtaining a grayscale image of the corrected plant root system image;
[0035] Perform bilateral filtering on the grayscale image and remove noise interference to obtain a filtered image;
[0036] Performing local threshold segmentation on the filter image to obtain a first binary image, and performing edge extraction processing on the filter image to obtain an edge image;
[0037] The first binary image and the edge image are fused to obtain a fused image;
[0038] Perform feature analysis on the fused image and remove impurities to obtain a feature selection result graph;
[0039] Perform morphological transformation on the feature selection result map to obtain the initial root system binary map;
[0040] The initial root binary image is clipped by the maximum bounding rectangle based on contour detection to obtain a root binary image containing only the plant root area.
[0041] As an implementable embodiment, the four identifiers are set in an image acquisition device, which includes a background plate. The background plate contains four identifiers. The identifiers are distributed at four corners of the background plate. The colors of the identifiers have obvious contrast with the color of the background plate. The length-to-width ratio of the rectangle formed by connecting the centers of the identifiers is 4:3.
[0042] An image-based plant root phenotype analysis system includes an image acquisition and processing module, an image preprocessing module, a detection and segmentation module, a connectivity graph construction module, a main root information acquisition module, and a lateral root information acquisition module;
[0043] The image acquisition processing module acquires the original plant root system image and performs correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image;
[0044] The image preprocessing module preprocesses the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtains the plant root system skeleton topological structure based on the root system binary image;
[0045] The detection and segmentation module detects endpoints and intersections based on the plant root skeleton topological structure, and obtains an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points;
[0046] The connected graph construction module constructs a connected graph based on an endpoint set, an intersection set and a segment Array set, wherein any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph;
[0047] The taproot information acquisition module, according to the single-source path search algorithm, traverses all arbitrary two end points in the connected graph to obtain a first path, obtains the taproot path based on the first path, and then obtains the taproot phenotypic information, the taproot phenotypic information including the taproot length and taproot thickness;
[0048] The lateral root information acquisition module, based on the intersection of the segment Array set and the main root path, recursively acquires the lateral root topology structure and the corresponding hierarchical level according to the smoothness principle, and then obtains all lateral root paths, wherein each lateral root path is composed of one or more elements in the segment Array set.
[0049] As an implementable embodiment, the image acquisition processing module includes an image acquisition device;
[0050] The four identifiers are arranged in an image acquisition device, which includes a background plate, and the background plate includes four identifiers, which are distributed at four corners of the background plate. The colors of the identifiers have an obvious contrast with the colors of the background plate, and the length-width ratio of the rectangle formed by connecting the centers of the identifiers is 4:3.
[0051] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described above are implemented.
[0052] A plant root phenotype analysis device based on images comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the above method steps when executing the computer program.
[0053] The present invention has significant technical effects due to the adoption of the above technical solution:
[0054] The present invention overcomes the defects of strong subjectivity and low efficiency in the measurement process of traditional measurement methods, can quickly and accurately measure plant root phenotypic parameters, meet the measurement needs of research subjects for tobacco seedling phenotypic parameters, and provide data reference for root phenotypic research. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] Figure 1 It is a schematic diagram of the overall process of the method of the present invention;
[0057] Figure 2 It is a schematic diagram of the overall structure of the system of the present invention;
[0058] Figure 3 is a schematic diagram of an image acquisition device of the present invention;
[0059] Figure 4 It is a schematic diagram of obtaining a plant binary image based on three color channels according to the present invention;
[0060] Figure 5-Figure 6 It is the pixel 8 neighborhood structure diagram during the analysis of the endpoints and intersections of the skeleton topology;
[0061] Figure 7 1 is a schematic diagram of the principle of perpendicular line measurement in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.
[0063] Embodiment 1:
[0064] An image-based method for analyzing plant root phenotyping, such as Figure 1 As shown, the following steps are included:
[0065] S100, obtaining an original plant root system image and performing correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image;
[0066] S200, preprocessing the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtaining the plant root system skeleton topological structure based on the root system binary image;
[0067] S300, performing endpoint and intersection detection based on the plant root skeleton topological structure, obtaining an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points;
[0068] S400, constructing a connected graph based on the endpoint set, the intersection set and the segment Array set, wherein any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph;
[0069] S500, according to a single-source path search algorithm, traverse all arbitrary two end points in the connected graph to obtain a first path, obtain a taproot path based on the first path, and then obtain taproot phenotypic information, the taproot phenotypic information including taproot length and taproot thickness;
[0070] S600, based on the intersection of the segment Array set and the main root path, according to the smoothness principle, recursively obtain the lateral root topology structure and the corresponding hierarchy, and then obtain all lateral root paths, wherein each lateral root path is composed of one or more elements in the segment Array set.
[0071] In step S100, correction processing is performed in combination with the four identifiers to obtain a corrected plant root system image, including the following steps:
[0072] S110, set the center coordinates of the four identifiers to C in a clockwise or counterclockwise order. 1 , C 2 , C 3 , C 4 , where C 1 is the center coordinate of the first corner identifier, C 2 is the center coordinate of the second corner identifier, C 3 is the center coordinate of the third corner identifier, C 4 The center coordinates of the fourth corner identifier are set, and the aspect ratio of the rectangle formed by the center coordinates is set to a:b;
[0073] S120, the center coordinates C of the identifiers of the two adjacent corners 1 , C 4 Perform rectangular fitting to obtain the transformed center coordinates C 2 ', C 3 ';
[0074] S130, based on the central coordinate set [C 1 ,C 2 ,C 3 ,C 4 ] and the transformed center coordinate set [C 1 ,C 2 ',C 3 ',C 4 ]Get the transformation matrix;
[0075] S140, performing global transformation processing on the original plant root system image based on the transformation matrix to obtain a second image;
[0076] S150, setting the aspect ratio of the rectangle formed by the transformed central coordinate set to a:c, performing a scale transformation on the width of the second image in combination with the aspect ratio a:b and with a transformation ratio of b / c, to obtain a corrected plant root system image.
[0077] Specifically, in actual operation, the identifier is a circle, and the aspect ratio of the rectangle formed by the identifier circle in the backlight plate is a:b; the original image collected is image1, and the center coordinates of the upper left corner, upper right corner, lower left corner, and lower right corner of the original image image1 are C 1 , C 2 , C 3 , C 4 , according to the coordinates C of the center of the upper left corner and the lower right corner 1 , C 4 Perform circumscribed rectangle fitting to obtain C 2 ', C 3 '; According to the actual circle center coordinate set [C 1 ,C2 ,C 3 ,C 4 ] and the transformed circle center coordinate set [C 1 ,C 2 ',C 3 ',C 4 ] Obtain the transformation matrix image image1; perform a global transformation on the image image1 using the transformation matrix to obtain the second image image2; suppose the aspect ratio of the rectangle formed by the center of the circle after the transformation is a:c, and it needs to be restored to the scale of a:b, and the width of the second image image2 is scaled, and the transformation ratio is b / c, that is, the width of the second image image2 is transformed to b / c times to obtain the corrected plant root image image3. In this embodiment, the four identifiers are set in the image acquisition device, and the image acquisition device includes a background plate, and the background plate includes 4 identifiers. The identifiers are distributed at the 4 corners of the background plate, and the color of the identifier has an obvious contrast with the color of the background plate. The aspect ratio of the rectangle formed by connecting the centers of the identifiers is 4:3. In addition, the image acquisition device is bound to also include an image acquisition device, see attached Figure 3 As shown, the background plate 10 is composed of a solid color, opaque and non-reflective flat plate 101, and an identifier 102 whose color is different from that of the flat plate 101; the shape of the identifier 102 can be circular or square; the image acquisition device 20 is an instrument with a video or photo function, which is not specifically limited in the embodiment of the present invention.
[0078] In step S200, the corrected plant root system image is preprocessed to obtain a root system binary image containing only the root system area, including the following steps:
[0079] S210, obtaining a grayscale image of the corrected plant root system image;
[0080] S220, performing bilateral filtering on the grayscale image and removing noise interference to obtain a filtered image;
[0081] S230, performing local threshold segmentation on the filter image to obtain a first binary image, and performing edge extraction processing on the filter image to obtain an edge image;
[0082] S240, fusing the first binary image and the edge image to obtain a fused image;
[0083] S250, performing feature analysis on the fused image and removing impurities to obtain a feature selection result graph;
[0084] S260, performing morphological transformation on the feature selection result map to obtain an initial root system binary map;
[0085] S270 , clipping the initial root system binary image with a maximum circumscribed rectangle based on contour detection to obtain a root system binary image that only includes the plant root area.
[0086] In actual operation, the following processing steps are provided in combination with the attached drawings:
[0087] Get the grayscale image imageGray of image image3; perform bilateral filtering on the grayscale image imageGray to remove noise interference and obtain the filtered image imageBilateral; perform local threshold segmentation on the filtered image imageBilateral to obtain the first binary image imageThre, perform edge extraction on the filtered image imageBilateral to obtain the edge image edgeImage; fuse the first binary image imageThre and the edge image edgeImage to obtain the fusion image fusionImage; perform feature analysis on the fusion image fusionImage to remove impurities and obtain the feature selection result image filterImage; perform morphological transformation on the feature selection result image filterImage to obtain the plant root system binary image threImage; perform contour detection on the binary image threImage to obtain the maximum circumscribed rectangle of the root system, and cut the maximum circumscribed rectangle area to obtain the root system binary image image4.
[0088] In actual operation, due to the thin plant root system and the small distance between each root, conventional segmentation is easily affected by surrounding information, so bilateral filtering considers the spatial information and grayscale similarity of the image at the same time to achieve the purpose of edge preservation and denoising; due to the uneven illumination of the image, local binary segmentation is used to segment the target area, but due to the thin root system, the segmentation process is prone to breakage, and the canny edge extraction algorithm has anisotropic characteristics and can better obtain the root edge, so the edge image is merged with the local threshold segmentation image, which can solve the breakage problem well; due to the dust and root soil falling on the backlight board, the segmentation is foreground, and the interference is filtered out through morphological transformation, width feature, length feature, and area feature analysis. Since the time performance of root phenotyping analysis is related to the amount of image information, and the above binary image contains a lot of redundant information except the root system, only the root area is retained through image cropping to reduce the amount of calculation and improve the operation efficiency, and finally the root segmentation binary image is obtained.
[0089] In step S200, the plant root skeleton topological structure is obtained based on the root binary map, specifically:
[0090] According to the plant root binary image image4, the Zhang-Suen skeleton extraction algorithm is used to obtain the plant root skeleton topological structure image5.
[0091] in addition, Figure 4It is the 8-neighborhood structure diagram of any pixel in the image during the skeleton extraction process. P1 is the target pixel. By performing structural analysis on each pixel in the image, the skeleton topology of the plant root system is extracted. Specifically:
[0092] Step 1: Loop through all foreground pixels and mark the pixels that meet the following conditions as deleted.
[0093] (a) 2 <= B(P1) <= 6
[0094] (b) A(P1) = 1
[0095] (c) P2*P4*P6=0
[0096] (d) P4*P6*P8=0
[0097] Condition (a): the sum of the number of target pixels (binary 1) around the central pixel P1 is between 2 and 6; condition (b): the number of times 0->1 occurs between two adjacent pixels in a clockwise direction among the 8 neighboring pixels.
[0098] Step 2: It is very similar to Step 1. Conditions (a) and (b) are exactly the same, but conditions (c) and (d) are slightly different. Pixel P1 that meets the following conditions is marked for deletion. The conditions are as follows:
[0099] (a) 2 <= B(P1) <= 6
[0100] (b) A(P1) = 1
[0101] (c) P2*P4*P8=0
[0102] (d) P2*P6*P8=0
[0103] The above two steps are repeated until no pixels are marked for deletion in either step. The output result is the plant root skeleton topology structure after the binary image is refined.
[0104] In step S400, the plant root skeleton image image5 is analyzed to obtain an endpoint set (e1, e2, ..., em), an intersection set (c1, c2, ..., cn), and a segment Array set, wherein an endpoint is a pixel point with 1 foreground pixel in an 8-neighborhood, and an intersection is a pixel point with more than 2 foreground pixels in an 8-neighborhood. Each element in the segment Array set is a segment on the skeleton with an endpoint or an intersection as a starting point and an end point. At the same time, the segment does not contain other endpoints / joint points except the starting and ending points, specifically:
[0105] Figure 5-Figure 6This is the pixel 8 neighborhood structure diagram during the analysis of all endpoints and all intersections in the plant root skeleton structure, where "5" corresponds to the black position in the figure, that is, the target pixel position to be analyzed, specifically:
[0106] According to the table below, the pixel values at positions "1, 2, 3, 4, 6, 7, 8, 9" are analyzed. According to the establishment conditions and termination conditions in the table, when the pixels at the corresponding positions in the establishment conditions are foreground, position 5 can also be determined as an intersection point;
[0107]
[0108] According to the skeleton information, the skeleton endpoint set information, and the skeleton intersection set information, a segment Array set is constructed. The algorithm principle is as follows:
[0109] The skeleton image Image5 is marked to obtain signImage, in which the pixel value of the endpoint is 1, the pixel value of the intersection is 2, and the pixel value of the non-endpoint and intersection is 255;
[0110] 1 Copy signImage to segmentLineImage and create an empty array segment Array;
[0111] 2 The identifier Label is initialized to 1 and is used to identify the pixel value of each segment element in the segment Array;
[0112] 3. Traverse all pixel points (x, y), and go to 4 if and only if it is an endpoint:
[0113] 4. Execute segmentsDetect(signImage, segmentLineImage, x, y, Label, path), where path is used to store the segment starting from the endpoint (x, y), and Label is used to identify the pixel value at the location of the segment. The segment is a segment on the skeleton with endpoints or intersections as the starting and ending points, and the segment does not contain other endpoints / joint points except the starting and ending points.
[0114] 5. Store the path to the segment Array and use Label++
[0115] 6 Traverse all foreground pixels (x, y) and go to 7 if and only if it is an intersection point:
[0116] 7 Traverse the 4-neighborhood of (x, y), and go to 8 if and only if there is a point (x', y') that is a regular foreground value:
[0117] 8Execute segmentsDetect(signImage,segmentLineImage,x',y',Label,path)
[0118] 9 Store the path to the segment Array and use Label++
[0119] 10 Traverse the 8-neighborhood of (x, y). When there is a point (x', y') with a regular foreground value and located in the upper left corner or the lower right corner, go to 11:
[0120] 11Execute segmentsDetect(signImage,segmentLineImage,x',y',Label,path)
[0121] 12 Store the path to the segment Array and use Label++
[0122] 13 Output the segment Array set and the corresponding identification image segmentLineImage.
[0123] Among them, during the segment Array construction process, the signImage, segmentLineImage, x, y, and path information will be updated when the segmentsDetect function module is executed.
[0124] Among them, the algorithm principle of the segmentsDetect(signImage, segmentLineImage, x, y, Label, path) function module is as follows:
[0125] 14 segmentsDetect(signImage,segmentLineImage,x,y,Label,path):
[0126] 15 Copy signImage to get segmentLineImage
[0127] 16 while(1):
[0128] 17 Calculate the number of foreground values in the 8-neighborhood of the pixel point (x, y)
[0129] 18 Set the pixel value of signImage at (x, y) to 0, and the pixel value of segmentLineImage at (x, y) to Label
[0130] 19 points (x, y) are pushed into the stack path
[0131] 20 judges the value, if it is 1, it goes to 21, if it is greater than 1, it goes to 25:
[0132] When 21 is 1, only one neighboring point (x', y') is transferred to 22;
[0133] 22 Determine whether (x', y') is an intersection point. If yes, go to 23; otherwise, go to 24:
[0134] 23 Push (x',y') into the stack path and terminate segmentsDetect
[0135] 24 Let (x, y) == (x', y'), go to 16
[0136] When 25 is greater than 1, that is, there are multiple foreground points in the 8-neighborhood, further solve the 4-neighborhood foreground point (x', y') of (x, y)
[0137] 26 Determine whether (x', y') is an intersection point. If yes, go to 27; otherwise, go to 28:
[0138] 27. Terminate segmentsDetect
[0139] 28 Let (x, y) == (x', y'), go to 16
[0140] In step 500, the first paths formed by all two endpoints in all endpoint sets in the connected graph are traversed by a single-source path search algorithm, and the path with the largest number of intersection points on the first path is the main root path, and then the main root phenotype information is obtained, including the following steps:
[0141] According to the topological structure of the plant root skeleton, the endpoint set is recorded as (e 1 ,e 2 ,…,e m ) and the intersection point set is denoted as (c 1 ,c 2 ,…,c n ), traverse all arbitrary two end points, and perform a single-source path search based on the connectivity graph information to obtain a first path;
[0142] The first path with more intersection points than the first path formed by any other two endpoints is the main root path, and the length of the main root path is the main root length after the scale transformation;
[0143] Calculate the tangent and angle of each point on the main root path and draw a perpendicular line. The width of the root system through which the perpendicular line passes is the width of the main root at the corresponding position.
[0144] The search algorithm is based on the principle of Dijkstra single-source path search algorithm. According to this application, the Dijkstra algorithm is improved, that is, the search is performed by specifying the source point and the end point, rather than searching the path between the source point and all vertices, and the execution efficiency is improved through local search. Specifically:
[0145] DIJKSTRA(G,w,s,t)
[0146] 1 initialize-single-source(G,s)
[0147] 2 S=null
[0148] 3 Q=GV
[0149] 4 While Q! = null
[0150] 5 u=extract-min(Q)
[0151] 6 S=S∪{u}
[0152] 7 For each vertex v∈G.Adj[u]
[0153] 8 RELAX{u,v,w}
[0154] Among them, G is a connected graph constructed by endpoint set, intersection set, and segment Array set. Each element in the segmentArray set is a vertex of the graph structure, w is the weight of each element in the segmentArray set, and s is the starting point. First, initialize an empty set S to store the vertices that have been determined to pass through the shortest path; initialize the set Q, which contains all the vertices GV in the graph. Q is a custom data structure that uses a minimum priority queue, and the key is the shortest distance of each vertex; lines 4-8, take out the vertex u with the shortest distance from s to the vertex from Q, add u to S, and recalculate the path length for each vertex adjacent to u to replace the current shortest path that is larger than the new path. When u is t and the route is optimal, the algorithm terminates.
[0155] According to the main root path information obtained, traverse from the starting point of the path to the end point, calculate the tangent line of each point on the path and its corresponding slope angle1, and calculate the slope of the perpendicular line angle2 through the corresponding point based on the slope and make a perpendicular line line. The number of connected domains passed by the perpendicular line is the width of the main root at the corresponding position. In addition, the schematic diagram of the tangent perpendicular line solution principle can be seen in Figure 7 .
[0156] In step S600, based on the segment array set and the intersection points on the main root path, according to the smoothness principle, the lateral root topology structure and the corresponding hierarchical level are recursively obtained to obtain all lateral root paths, including the following steps:
[0157] Traverse the intersection points on the main root path, take the intersection point on the main root path as the starting point, search the segment where the starting point is located from the segment Array, and remove the segment from the segment Array collection;
[0158] Determine whether the other end of the segment is an endpoint. If it is an endpoint, the segment is the second path and the search ends.
[0159] If it is an intersection, record it as the second segment, and update the starting point to the second starting point. Search for the path with the largest obtuse angle with the second segment in the segment array where the second starting point is located, and use the second segment as the new segment.
[0160] Repeat the above search until one end of the new segment is found as the endpoint. The segment set obtained during the search process is the corresponding lateral root path.
[0161] Specifically, in step S600, the real path of the lateral root and the level to which it belongs are automatically detected through a smoothness detection algorithm. Among them, the idea of lateral root detection is: the starting point of any lateral root must be the intersection point, and the end point must be the endpoint; when the lateral root has a branch, that is, there is a lower-level lateral root, it should be selected according to the maximum principle of the path angle (obtuse angle) formed by the current segment and the next connected candidate segment at the intersection, that is, the smoothness detection theory proposed in the present invention; the idea of automatic grading of lateral roots is: the level of the second path lateral root is known information, that is, the lateral root with the starting point on the main root is the second path root system, according to the recursive principle, the lateral root attached to the previous path is updated to a lower-level lateral root, so as to automatically update the level of each root system.
[0162] The lateral root detection algorithm is as follows:
[0163] Given the endpoint set endpointArray, the intersection set junctionArray, and the segment Array set, according to the intersection point startJunctionPoints on the main root, the smoothness detection algorithm proposed in the present invention detects each lateral root and automatically classifies it, specifically:
[0164] 1 Input:
[0165] Root skeleton topology diagram: src
[0166] segment collection: segment Array
[0167] Endpoint collection: endpointArray
[0168] Intersection collection: junctionArray
[0169] Main root intersection point: startJunctionPoints
[0170] The lateral root level to which the current intersection belongs: rootGrade
[0171] 2 while(startJunctionPoints!=NULL)
[0172] 3 Pop a startPoint from startJunctionPoints
[0173] 4. According to the smoothness detection algorithm sideRootDetectFunction, detect the root path rootPath starting from startPoint.
[0174] 5Store the root path rootPath where the starting point is and its corresponding grade rootGrade
[0175] 6 Detect the intersection newStartJunctionPoints on the side root rootPath
[0176] 7 triggers the recursive function, i.e. goes to 1, where the input parameters are adjusted as follows:
[0177] src (unchanged)
[0178] segment Array (using the updated data in 6)
[0179] endpointArray (unchanged)
[0180] junctionArray (unchanged)
[0181] Pass newStartJunctionPoints as the new startJunctionPoints
[0182] rootGrade=rootGrade+1
[0183] Among them, the root smoothness detection algorithm sideRootDetectFunction in this algorithm is as follows:
[0184] 8 Input:
[0185] Root skeleton topology result diagram: src
[0186] Endpoint collection: segment Array
[0187] Intersection collection: junctionArray
[0188] Target lateral root starting point: startPoint
[0189] 9. Create the root system line segment storage vector pathPoints, and store the target root containing line segments in order
[0190] 10 Find the location of startPoint from segment Array and record it as line, and delete line from segmentArray
[0191] 11 while(1)
[0192] 12 Put line into pathPoints
[0193] 13 Determine the endpoint type of the other end of the line:
[0194] 14 endpoints break; the intersection point goes to 15
[0195] 15 Find the "line" set connectLines directly connected to line in the segment Array
[0196] 16 Calculate the obtuse angle angles between line and each element in connectLines at the connection point
[0197] 17 Select the line segment line_i corresponding to the largest angle
[0198] 18 Update line to line_i and delete line_i from segment Array
[0199] The result is the lateral root path of each level.
[0200] According to the above steps, the main root and lateral root phenotypic information is obtained, including the main root length, the main root thickness, and the lateral root length. Of course, other information such as the lateral root thickness information may also be included, which is not specifically limited in the embodiment of the present invention.
[0201] Embodiment 2:
[0202] An image-based plant root phenotyping system, such as Figure 2As shown, it includes an image acquisition processing module 100, an image preprocessing module 200, a detection and segmentation module 300, a connectivity graph construction module 400, a main root information acquisition module 500 and a lateral root information acquisition module 600;
[0203] The image acquisition processing module 100 acquires the original plant root system image and performs correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image;
[0204] The image preprocessing module 200 preprocesses the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtains the plant root system skeleton topological structure based on the root system binary image;
[0205] The detection and segmentation module 300 performs endpoint and intersection detection based on the plant root skeleton topological structure to obtain an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points;
[0206] The connected graph construction module 400 constructs a connected graph based on the endpoint set, the intersection set and the segment Array set, wherein any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph;
[0207] The taproot information acquisition module 500, according to the single-source path search algorithm, traverses all arbitrary two end points in the connected graph to obtain a first path, obtains the taproot path based on the first path, and then obtains the taproot phenotypic information, the taproot phenotypic information including the taproot length and taproot thickness;
[0208] The lateral root information acquisition module 600, based on the intersection of the segment Array set and the main root path, recursively acquires the lateral root topology structure and the corresponding hierarchical level according to the smoothness principle, and then obtains all lateral root paths, wherein each lateral root path is composed of one or more elements in the segment Array set.
[0209] Specifically, the image acquisition processing module 100 includes an image acquisition device; the four identifiers are set in the image acquisition device, and the image acquisition device includes a background plate, the background plate contains 4 identifiers, the identifiers are distributed at the 4 corners of the background plate, the color of the identifiers has a clear contrast with the color of the background plate, and the length-to-width ratio of the rectangle formed by connecting the centers of the identifiers is 4:3.
[0210] Embodiment 3:
[0211] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:
[0212] S100, obtaining an original plant root system image and performing correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image;
[0213] S200, preprocessing the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtaining the plant root system skeleton topological structure based on the root system binary image;
[0214] S300, performing endpoint and intersection detection based on the plant root skeleton topological structure, obtaining an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points;
[0215] S400, constructing a connected graph based on the endpoint set, the intersection set and the segment Array set, wherein any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph;
[0216] S500, traversing the first paths formed by all two endpoints in all endpoint sets in the connected graph by a single-source path search algorithm, the first path having the largest number of intersection points is the main root path, and then obtaining the main root phenotypic information, the main root phenotypic information including the main root length and the main root thickness;
[0217] S600, traverse the intersection points on the main root path, take the intersection point on the main root path as the starting point, search the segment where the starting point is located from the segment Array, query all segments with one end as the endpoint, and the segment set obtained during the search process is the corresponding side root path, where each side root path is composed of one or more elements in the segment Array in order.
[0218] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0219] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0220] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0221] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0223] It should be noted that:
[0224] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.
[0225] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different. Any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. The technicians in the technical field of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A method for analyzing plant root phenotypes based on images, characterized in that: The following steps are involved: Acquire an original plant root system image and perform correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image; Preprocessing the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtaining the plant root system skeleton topological structure based on the root system binary image; Based on the plant root skeleton topological structure, endpoints and intersections are detected respectively to obtain an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points; Construct a connected graph based on the endpoint set, the intersection set and the segment Array set, where any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph; According to the single-source path search algorithm, all arbitrary two end points in the connected graph are traversed to obtain a first path, and a taproot path is obtained based on the first path, and then taproot phenotypic information is obtained, wherein the taproot phenotypic information includes taproot length and taproot thickness; Based on the intersection of the segment Array set and the main root path, according to the smoothness principle, the lateral root topology structure and the corresponding hierarchy are recursively obtained to obtain all lateral root paths, where each lateral root path is composed of one or more elements in the segment Array set.
2. The method for analyzing plant root phenotype based on images according to claim 1, characterized in that: The method of performing endpoint and intersection detection based on the plant root skeleton topological structure to obtain an endpoint set and an intersection set includes the following steps: Perform endpoint detection and intersection detection on the topological structure of the plant root skeleton to obtain endpoint combination and intersection set; The segment with endpoints / intersections as starting points and ending points is divided into segment Arrays, and the segment excludes the starting and ending points and does not contain other endpoints / joint points. Each segment in the segment Array is an independent metadata.
3. The method for analyzing plant root phenotype based on images according to claim 1, characterized in that: The method of traversing all arbitrary two endpoints in the connectivity graph according to the single-source path search algorithm to obtain a first path, and obtaining a main root path based on the first path, and then obtaining main root phenotypic information, includes the following steps: According to a single-source path search algorithm, traverse all arbitrary two end points in the connected graph to obtain a first path; The first path is screened by a preset screening condition. If the first path meets the preset screening condition, the corresponding first path is the main root path, and the length of the first path is the main root length; Based on the taproot path, the taproot width was obtained using the plumb line measurement method.
4. The method for analyzing plant root phenotype based on images according to claim 3, characterized in that: The preset screening condition is at least that the number of intersections is greater than the number of intersections on the first path formed by any other two end points.
5. The method for analyzing plant root phenotype based on images according to claim 1 or 3, characterized in that: Based on the segment Array set and the intersection points on the main root path, according to the smoothness principle, recursively obtain the lateral root topology structure and the corresponding hierarchy, and then obtain all lateral root paths, including the following steps: Traverse the intersection points on the main root path, start the first-level search from the segment Array collection with the intersection point on the main root path as the starting point, and end the search if the segment is an endpoint, and get the lateral root topology structure of the corresponding level; If it is an intersection, the second level search is performed from the segment Array set as the starting point until one end is found as an endpoint, then the search ends and the lateral root topology structure of the corresponding level is obtained; Each lateral root path is obtained based on the lateral root topology structure.
6. The method for analyzing plant root phenotype based on images according to claim 4, characterized in that: When there is a bifurcation in the lateral root path, the path with the largest obtuse angle between the current segment and the next connected candidate segment at the intersection is selected.
7. The method for analyzing plant root phenotype based on images according to claim 1, characterized in that: The correction process is performed by combining the four identifiers to obtain a corrected plant root system image, including the following steps: Set the center coordinates of the four identifiers to C1, C2, C3, and C4 in clockwise or counterclockwise order, where C1 is the center coordinate of the first corner identifier, C2 is the center coordinate of the second corner identifier, C3 is the center coordinate of the third corner identifier, and C4 is the center coordinate of the fourth corner identifier, and set the aspect ratio of the rectangle formed by the center coordinates to a:b; Perform rectangular fitting on the center coordinates C1 and C4 of the identifiers of two adjacent corners to obtain the transformed center coordinates C2' and C3'; Obtain a transformation matrix based on the center coordinate set [C1, C2, C3, C4] and the transformed center coordinate set [C1, C2', C3', C4]; Performing global transformation processing on the original plant root system image based on the transformation matrix to obtain a second image; The aspect ratio of the rectangle formed by the transformed central coordinate set is set to a:c, and the width of the second image is scaled according to the aspect ratio a:b with a transformation ratio of b / c to obtain a corrected plant root image.
8. The method for analyzing plant root phenotype based on images according to claim 1, characterized in that: The preprocessing of the corrected plant root system image to obtain a root system binary image containing only the root system area comprises the following steps: Obtaining a grayscale image of the corrected plant root system image; Perform bilateral filtering on the grayscale image and remove noise interference to obtain a filtered image; Performing local threshold segmentation on the filter image to obtain a first binary image, and performing edge extraction processing on the filter image to obtain an edge image; The first binary image and the edge image are fused to obtain a fused image; Perform feature analysis on the fused image and remove impurities to obtain a feature selection result graph; Perform morphological transformation on the feature selection result map to obtain the initial root system binary map; The initial root binary image is clipped by the maximum bounding rectangle based on contour detection to obtain a root binary image containing only the plant root area.
9. The method for analyzing plant root phenotype based on images according to claim 1, characterized in that: The four identifiers are arranged in an image acquisition device, which includes a background plate, and the background plate includes four identifiers, which are distributed at four corners of the background plate. The colors of the identifiers have an obvious contrast with the colors of the background plate, and the length-width ratio of the rectangle formed by connecting the centers of the identifiers is 4:
3.
10. An image-based plant root phenotyping system, characterized in that: It includes an image acquisition and processing module, an image preprocessing module, a detection and segmentation module, a connectivity graph construction module, a main root information acquisition module and a lateral root information acquisition module; The image acquisition processing module acquires the original plant root system image and performs correction processing in combination with four identifiers to obtain a corrected plant root system image, wherein the four identifiers are at four corners of the original plant root system image; The image preprocessing module preprocesses the corrected plant root system image to obtain a root system binary image containing only the root system area, and obtains the plant root system skeleton topological structure based on the root system binary image; The detection and segmentation module detects endpoints and intersections based on the plant root skeleton topological structure, and obtains an endpoint set, an intersection set and a segment Array set, wherein each segment element in the segment Array set is a segment in the plant root skeleton topological structure with an endpoint or an intersection as a starting point and an ending point, and the segment does not contain other endpoints / joint points except the starting and ending points; The connected graph construction module constructs a connected graph based on an endpoint set, an intersection set and a segment Array set, wherein any point in the endpoint set and the intersection set is a vertex of the connected graph, and the segment Array set is an edge of the connected graph; The taproot information acquisition module, according to the single-source path search algorithm, traverses all arbitrary two end points in the connected graph to obtain a first path, obtains the taproot path based on the first path, and then obtains the taproot phenotypic information, the taproot phenotypic information including the taproot length and taproot thickness; The lateral root information acquisition module, based on the intersection of the segment Array set and the main root path, recursively acquires the lateral root topology structure and the corresponding hierarchical level according to the smoothness principle, and then obtains all lateral root paths, wherein each lateral root path is composed of one or more elements in the segment Array set.
11. The image-based plant root phenotyping system according to claim 10, characterized in that: The image acquisition processing module includes an image acquisition device; The four identifiers are arranged in an image acquisition device, which includes a background plate, and the background plate includes four identifiers, which are distributed at four corners of the background plate. The colors of the identifiers have an obvious contrast with the colors of the background plate, and the length-width ratio of the rectangle formed by connecting the centers of the identifiers is 4:
3.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps according to any one of claims 1 to 9 are implemented.
13. An image-based plant root phenotyping device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method steps according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
A method for constructing a three-dimensional vector model of plant root system
CN109389668A
Crop root phenotypic analysis device and method based on tile-house-shaped polygon
CN111627031A
