A fruit trait detection method, system and storage medium
Patent Information
- Application Number
- CN202211149681.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-09-21
AI Technical Summary
现有的果实性状检测的过程中,果实性状检测的精度和效率较低,人们更希望提高果实性状检测的精度和效率
Smart Images

Figure CN116051453B_ABST
Abstract
Description
Technical Field
[0001] This application relates to fruit trait detection technology, and more particularly to a fruit trait detection method, system and storage medium. Background Technology
[0002] With the rapid development and widespread use of fruit trait detection technology, its application in fruit trait detection has gradually become the mainstream. However, current methods rely on manually calculating the weight of the seeds to estimate the number of seeds, manually peeling the fruit peel, measuring the peel thickness with calipers, and then taking the average of the thickest and thinnest peels as the peel thickness. These current methods suffer from low accuracy and efficiency, and there is a strong desire to improve both.
[0003] Therefore, how to intelligently detect fruit traits in order to improve the accuracy and efficiency of fruit trait detection has always been a goal. Summary of the Invention
[0004] This application provides a method, system, and storage medium for detecting fruit characteristics.
[0005] According to a first aspect of this application, a method for detecting fruit traits is provided. The method includes: cutting a fruit using an automatic slicer to obtain a fruit slice; acquiring a cross-sectional image of the fruit slice and determining the peel position, pulp position, and seed position in the cross-sectional image; and determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, the pulp position, and the seed position.
[0006] According to one embodiment of this application, the method of cutting fruit using an automatic slicer to obtain fruit slices includes: automatically slicing the fruit based on a preset fruit slice thickness to obtain fruit slices, and determining the number of fruit slice layers; moving the fruit slices to an image acquisition area to acquire a cross-sectional image of the fruit slices; the center of the image acquisition area and the center of the fruit slices are located on the same vertical line.
[0007] According to one embodiment of this application, the step of acquiring a cross-sectional image of the fruit slice and determining the peel position, pulp position, and seed position in the cross-sectional image includes: performing threshold segmentation on the cross-sectional image based on a first feature threshold to determine the peel position and the pulp position; and performing the threshold segmentation on the cross-sectional image based on a second feature threshold to determine the seed position.
[0008] According to one embodiment of this application, the step of performing threshold segmentation on the cross-sectional image based on a first feature threshold to determine the peel position and the pulp position includes: performing threshold segmentation on the cross-sectional image based on the first feature threshold to determine the boundary line between the peel position and the pulp position; and performing connected component analysis on the threshold-segmented cross-sectional image based on the boundary line to determine the peel position and the pulp position in the cross-sectional image.
[0009] According to one embodiment of this application, the step of performing threshold segmentation on the cross-sectional image based on a second feature threshold to determine the location of the grain includes: performing threshold segmentation on the cross-sectional image based on the second feature threshold to determine a grayscale cross-sectional image corresponding to the cross-sectional image; determining a connected region in the grayscale cross-sectional image; and determining the connected region as the location of the grain in response to the grayscale value of the connected region satisfying a preset grayscale threshold.
[0010] According to one embodiment of this application, determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, the pulp position, and the seed position includes: the phenotypic traits including pulp volume, peel thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution; determining the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image based on the peel position; determining the pulp volume of the fruit corresponding to the cross-sectional image based on the pulp position; and determining the number of seeds, seed volume, and seed spatial distribution of the fruit corresponding to the cross-sectional image based on the seed position.
[0011] According to one embodiment of this application, determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, the pulp position, and the seed position includes: determining the shooting scale of the cross-sectional image; determining the peel thickness and scale thickness of the fruit based on the peel position and the shooting scale; determining the pulp area of the fruit slice based on the pulp position and the shooting scale; determining the first pulp volume of each layer of the fruit slice based on the product of the pulp area and the fruit slice thickness; superimposing the first pulp volume of each layer of the fruit slice by the number of fruit slice layers to determine the pulp volume of the fruit; determining the first number of seeds in each layer of the cross-sectional image based on the seed position; superimposing the first number of seeds in each layer of the cross-sectional image by the number of fruit slice layers to determine the number of seeds of the fruit; performing three-dimensional reconstruction on each layer of the cross-sectional image based on the seed position and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit seeds; and determining the seed volume and seed spatial distribution of the fruit based on the three-dimensional reconstruction model.
[0012] According to a second aspect of this application, a fruit trait detection system is provided, comprising: an automatic slicer for cutting a fruit to obtain fruit slices; an image acquisition device for acquiring cross-sectional images of the fruit slices and determining the positions of the peel, pulp, and seeds in the cross-sectional images; and a trait detection device for determining the phenotypic traits of the fruit corresponding to the cross-sectional images based on the peel positions, pulp positions, and seed positions.
[0013] According to one embodiment of this application, the fruit morphology detection system further includes a rotating platform and an automatic slicer, which is used to automatically slice the fruit based on a preset fruit slice thickness to obtain fruit slices and determine the number of fruit slice layers; the rotating platform is used to move the fruit slices to an image acquisition area to acquire a cross-sectional image of the fruit slices; the center of the image acquisition area and the center of the fruit slices are located on the same vertical line.
[0014] According to one embodiment of this application, the image acquisition device is used to: perform threshold segmentation on the cross-sectional image based on a first feature threshold to determine the location of the peel and the location of the pulp; and perform the threshold segmentation on the cross-sectional image based on a second feature threshold to determine the location of the seeds.
[0015] According to one embodiment of this application, the image acquisition device is used to: perform threshold segmentation on the cross-sectional image based on the first feature threshold to determine the boundary line between the peel position and the pulp position; and perform connected component analysis on the threshold-segmented cross-sectional image based on the boundary line to determine the peel position and pulp position in the cross-sectional image.
[0016] According to one embodiment of this application, the image acquisition device is used to: perform threshold segmentation on the cross-sectional image based on the second feature threshold to determine a grayscale cross-sectional image corresponding to the cross-sectional image; determine a connected region in the grayscale cross-sectional image; and determine the connected region as the seed location in response to the grayscale value of the connected region satisfying a preset grayscale threshold.
[0017] According to one embodiment of this application, the phenotypic traits include pulp volume, peel thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution. The trait detection device is used to: determine the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image based on the peel location; determine the pulp volume of the fruit corresponding to the cross-sectional image based on the pulp location; and determine the number of seeds, seed volume, and seed spatial distribution of the fruit corresponding to the cross-sectional image based on the seed location.
[0018] According to one embodiment of this application, the trait detection device is used to: determine the shooting ratio of the cross-sectional image; determine the peel thickness and scale thickness of the fruit based on the peel position and the shooting ratio; determine the pulp area of the fruit slice based on the pulp position and the shooting ratio; determine the first pulp volume of each layer of the fruit slice based on the product of the pulp area and the fruit slice thickness; superimpose the first pulp volume of each layer of the fruit slice by the number of fruit slice layers to determine the pulp volume of the fruit; determine the first number of seeds in each layer of the cross-sectional image based on the seed position; superimpose the first number of seeds in each layer of the cross-sectional image by the number of fruit slice layers to determine the number of seeds of the fruit; perform three-dimensional reconstruction of each layer of the cross-sectional image based on the seed position and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit seeds; and determine the seed volume and seed spatial distribution of the fruit based on the three-dimensional reconstruction model.
[0019] According to a third aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this application.
[0020] The method of this application embodiment uses an automatic slicer to cut the fruit to obtain fruit slices; acquires cross-sectional images of the fruit slices, and determines the positions of the peel, pulp, and seeds in the cross-sectional images; based on the positions of the peel, pulp, and seeds, determines the phenotypic traits of the fruit corresponding to the cross-sectional images. In this way, the fruit traits can be intelligently detected, improving the accuracy and efficiency of fruit trait detection.
[0021] It should be understood that the teachings of this application are not required to achieve all the beneficial effects described above, but rather that a specific technical solution can achieve a specific technical effect, and other embodiments of this application can also achieve beneficial effects not mentioned above. Attached Figure Description
[0022] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, in which:
[0023] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0024] Figure 1 This paper illustrates the processing flow of the fruit trait detection method provided in an embodiment of this application. Figure 1 ;
[0025] Figure 2 This paper illustrates the processing flow of the fruit trait detection method provided in an embodiment of this application. Figure 2 ;
[0026] Figure 3 This paper illustrates the processing flow of the fruit trait detection method provided in an embodiment of this application. Figure 3 ;
[0027] Figure 4 This paper illustrates the processing flow of the fruit trait detection method provided in an embodiment of this application. Figure 4 ;
[0028] Figure 5 This paper illustrates the processing flow of the fruit trait detection method provided in an embodiment of this application. Figure 5 ;
[0029] Figure 6 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 1 ;
[0030] Figure 7 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 2 ;
[0031] Figure 8 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 3 ;
[0032] Figure 9 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 4 ;
[0033] Figure 10 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 5 ;
[0034] Figure 11 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 6 ;
[0035] Figure 12 This illustration shows an optional schematic diagram of the fruit morphology detection system provided in an embodiment of this application. Detailed Implementation
[0036] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0037] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0039] Currently known fruit trait detection techniques rely on manual calculation of seed weight to estimate the number of seeds, manual peeling of the fruit pericarp, measurement of pericarp thickness using calipers, and then taking the average of the thickest and thinnest pericarp thickness. These existing techniques suffer from low accuracy and efficiency in fruit trait detection. The need for manual intervention in fruit trait measurement in these techniques leads to problems with accuracy and efficiency.
[0040] The fruit trait detection methods provided by related technologies require manual measurement of fruit traits, resulting in low accuracy and efficiency. The method of this application addresses this issue by using an automatic slicer to cut the fruit into slices; acquiring cross-sectional images of the fruit slices; determining the positions of the peel, pulp, and seeds in the cross-sectional images; and determining the phenotypic traits of the fruit corresponding to the cross-sectional images based on these positions. Therefore, compared to the low accuracy and efficiency of fruit trait detection in related technologies, the fruit trait detection method of this application overcomes the shortcomings of traditional manual methods for measuring dragon fruit traits, such as inefficiency, time consumption, large errors, and susceptibility to subjective influence. It achieves automatic fruit slicing, automatic acquisition of cross-sectional images of fruit slices, automatic analysis of cross-sectional images, and automatic extraction of fruit phenotypic traits, thus improving the accuracy and efficiency of fruit trait detection.
[0041] The processing flow of the fruit morphology detection method provided in the embodiments of this application is described below. See also Figure 1 , Figure 1This is a schematic diagram of the processing flow of the fruit morphology detection method provided in the embodiments of this application. Figure 1 , will combine Figure 1 Steps S101-S103 shown will be explained.
[0042] Step S101: Use an automatic slicer to cut the fruit to obtain fruit slices.
[0043] In some embodiments, the automatic slicer may include a transport stage and a blade. The transport stage is used to move the fruit to the blade for cutting, and each movement produces one fruit slice. The fruit slice may include a slice of a certain thickness.
[0044] In some embodiments, using an automatic slicer to cut the fruit to obtain fruit slices may include: automatically slicing the fruit based on a preset fruit slice thickness to obtain fruit slices, and determining the number of fruit slice layers; moving the fruit slices to an image acquisition area to acquire a cross-sectional image of the fruit slices; the center of the image acquisition area and the center of the fruit slices are located on the same vertical line.
[0045] In practical implementation, the automatic slicer can preset the fruit slice thickness. The rotating platform can be used to move the cut fruit slices to the image acquisition area according to a preset rotation angle, start time, and stop time to acquire cross-sectional images of the fruit slices. The PLC (Programmable Logic Controller) can be used to control the automatic slicer to cut the fruit according to the preset slice thickness and determine the number of slice layers. The PLC can also be used to control the rotating platform to move the cut fruit slices to the image acquisition area according to a preset rotation angle; and to control the rotating platform to stop for a period of time after each fruit slice is moved to the image acquisition area according to the start and stop times to acquire cross-sectional images of the fruit slices. The center of the image acquisition area and the center of the fruit slice are on the same vertical line.
[0046] Step S102: Collect cross-sectional images of fruit slices and determine the positions of the peel, pulp, and seeds in the cross-sectional images.
[0047] In some embodiments, an image acquisition device is used to acquire images of a fruit slice within an image acquisition area, obtaining a cross-sectional image of the fruit slice. Threshold segmentation is performed on the cross-sectional image to determine the positions of the peel, pulp, and seeds. The image acquisition device may include a visible light camera. The cross-sectional image may include an RGB cross-sectional image of the fruit slice. The center of the image acquisition device's field of view, the center of the image acquisition area, and the center of the fruit slice are located on the same vertical line.
[0048] In some embodiments, acquiring a cross-sectional image of a fruit slice and determining the location of the peel, pulp, and seeds in the cross-sectional image may include: performing threshold segmentation on the cross-sectional image based on a first feature threshold to determine the location of the peel and pulp; and performing threshold segmentation on the cross-sectional image based on a second feature threshold to determine the location of the seeds.
[0049] Regarding the threshold segmentation of a cross-sectional image based on a first feature threshold to determine the peel and pulp positions, in a specific implementation, threshold segmentation is performed on the cross-sectional image based on the first feature threshold to determine the boundary line between the peel and pulp positions. Based on the boundary line, connected component analysis is performed on the threshold-segmented cross-sectional image to determine the peel and pulp positions within the cross-sectional image. The first feature threshold may include the minimum feature threshold capable of determining the boundary line; however, this embodiment does not limit the specific feature threshold.
[0050] As an example, taking a slice of red dragon fruit as an example, RGB cross-sectional images of the red dragon fruit slice are acquired, and the RGB cross-sectional images are converted into R-channel cross-sectional images. Thresholding is then performed on the R-channel cross-sectional images using a first feature threshold to determine the boundary between the peel and the flesh of the red dragon fruit. Based on this boundary, connected component analysis is performed on the threshold-segmented R-channel cross-sectional images to determine the peel and flesh locations within the R-channel cross-sectional images.
[0051] For threshold segmentation of a cross-sectional image based on a second feature threshold to determine the seed location, in a specific implementation, threshold segmentation is performed on the cross-sectional image based on the second feature threshold to determine the corresponding grayscale cross-sectional image. Connected regions in the grayscale cross-sectional image are then determined. In response to the grayscale value of the connected region satisfying a preset grayscale threshold, the connected region is determined to be the seed location. The second feature threshold may include: a minimum feature threshold capable of determining the grayscale cross-sectional image; this embodiment does not limit the specific feature threshold. The preset grayscale threshold may include: a preset maximum grayscale value capable of determining the seed location.
[0052] As an example, taking a slice of white-fleshed dragon fruit, an RGB cross-sectional image of the slice is acquired. This RGB cross-sectional image is then converted into a G-channel cross-sectional image. A second feature threshold is used to perform threshold segmentation on the G-channel cross-sectional image to determine the corresponding grayscale cross-sectional image. Binarization and connected component analysis are then performed on the grayscale cross-sectional image to identify connected regions. If the grayscale value of a connected region is less than a preset grayscale threshold, that region is identified as a seed location, with each individual connected region representing a single seed. This yields a binary image of the white-fleshed dragon fruit slice containing the seed locations.
[0053] Step S103: Based on the location of the peel, pulp, and seeds, determine the phenotypic traits of the fruit corresponding to the cross-sectional image.
[0054] In some embodiments, the phenotypic traits of the fruit may include: pulp volume, pericarp thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution.
[0055] In some embodiments, determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel location, pulp location, and seed location may include: determining the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image based on the peel location; determining the pulp volume of the fruit corresponding to the cross-sectional image based on the pulp location; and determining the number of seeds, seed volume, and seed spatial distribution of the fruit corresponding to the cross-sectional image based on the seed location.
[0056] To determine the fruit peel thickness and scale thickness corresponding to a cross-sectional image based on the peel location, in specific implementation, the shooting ratio of the cross-sectional image is determined, and the fruit peel thickness and scale thickness are determined based on the peel location and shooting ratio. The shooting ratio can include the ratio of the fruit's physical length to the number of pixels.
[0057] As an example, the image acquisition device captures cross-sectional images at a ratio of 2mm / 10 pixels. Based on the location of the fruit peel, the peel thickness in the cross-sectional image is determined to be 20 pixels, and the scale thickness to be 10 pixels. Therefore, according to the shooting ratio, the fruit peel thickness is determined to be 4mm and the scale thickness to be 2mm.
[0058] To determine the volume of fruit pulp corresponding to a cross-sectional image based on pulp location, in practice, the pulp area of the fruit slice is determined based on the pulp location and shooting ratio; the first pulp volume of each layer of fruit slice is determined based on the product of the pulp area and the thickness of the fruit slice; the first pulp volumes of each layer of fruit slice are then superimposed according to the number of fruit slice layers to determine the total volume of the fruit pulp. The first pulp volume can include the pulp volume of a single layer of fruit slice.
[0059] As an example, based on the location of the pulp and the shooting ratio, the pulp area S of the fruit slice can be represented by the following formula (1):
[0060] S = s × n 2 (1)
[0061] Where s represents the area of the fruit pulp in the cross-sectional image, and n is the ratio of the pixel to the actual distance, that is, 1cm is n pixels in the image.
[0062] Based on the product of the pulp area and the thickness of the fruit slice, the first pulp volume of each layer of fruit slice is determined; the pulp volume V of the fruit is determined by superimposing the first pulp volumes of each layer of fruit slice with the number of fruit slice layers, and can be expressed by the following formula (2):
[0063]
[0064] Where 'a' represents the number of fruit slice layers, and H... i S represents the thickness of the fruit slice in the i-th layer. i This represents the area of the pulp in the i-th layer.
[0065] To determine the number, volume, and spatial distribution of seeds in a cross-sectional image of a fruit based on seed location, the specific implementation involves determining the first seed count in each layer of the cross-sectional image based on seed location. The first seed count in each layer of the cross-sectional image is then superimposed based on the number of fruit slice layers to determine the total number of seeds in the fruit. Based on the seed location and the number of fruit slice layers, a 3D reconstruction is performed on each layer of the cross-sectional image to obtain a 3D reconstruction model of the fruit's seeds. Based on this 3D reconstruction model, the seed volume and spatial distribution of the fruit are determined. The first seed count can include the number of seeds in the cross-sectional image.
[0066] As an example, based on the seed location, the number of the first seeds in the cross-sectional image of each layer is determined; the number of seeds M in the cross-sectional image of each layer is superimposed with the number of fruit slice layers to determine the number of seeds M of the fruit, which can be expressed by the following formula (3):
[0067]
[0068] Where 'a' represents the number of fruit slice layers, and 'm' represents the number of slice layers. i This represents the number of the first seed in the cross-sectional image of the i-th layer.
[0069] Based on the seed location and the number of fruit slice layers, a 3D reconstruction of the cross-sectional image of each layer is performed to obtain a 3D reconstruction model of the fruit's seeds. Based on the 3D reconstruction model, the seed volume and spatial distribution of the fruit are determined.
[0070] In practice, based on the binary image of the fruit slice containing the seed location in each layer, a slice projection image corresponding to that layer's cross-sectional image can be obtained. The pixel area of the fruit slice in that layer can then be determined from the slice projection image. Based on the seed location and pixel area, a 3D ellipsoid fitting algorithm is used to reconstruct the seeds in the cross-sectional image of that layer in 3D. Based on the number of fruit slice layers, the seeds in all cross-sectional images are reconstructed using voxel 3D reconstruction and superimposed to obtain a 3D reconstruction model of the fruit's seeds. Based on the 3D reconstruction model, the volume and spatial distribution of the fruit's seeds are determined.
[0071] In some embodiments, the processing flow of the fruit trait detection method is illustrated. Figure 2 ,like Figure 2 As shown, it includes:
[0072] Step S201: Based on the preset fruit slice thickness, automatically slice the fruit to obtain fruit slices.
[0073] Step S202: Move the fruit slice to the image acquisition area to acquire a cross-sectional image of the fruit slice.
[0074] In specific implementations of steps S201 and S202, the PLC controls the automatic slicer to cut the fruit according to the preset fruit slice thickness, obtaining fruit slices and determining the number of slice layers. The fruit slices fall onto a rotating platform. The PLC then controls the rotating platform to move the fruit slices to the image acquisition area according to a preset rotation angle; based on the start and stop times, the rotating platform stops for a period of time after moving each fruit slice to the image acquisition area to acquire a cross-sectional image of the fruit slice. The center of the image acquisition area and the center of the fruit slice are located on the same vertical line.
[0075] In some embodiments, the processing flow of the fruit trait detection method is illustrated. Figure 3 ,like Figure 3 As shown, it includes:
[0076] Step S301: Based on the first feature threshold, perform threshold segmentation on the cross-sectional image to determine the boundary line between the peel position and the pulp position.
[0077] In specific implementation of step S301, for white-fleshed dragon fruit, threshold segmentation can be performed on the cross-sectional image under the G channel; for red-fleshed dragon fruit, threshold segmentation can be performed on the cross-sectional image under the R channel.
[0078] Step S302: Based on the boundary line, perform connected component analysis on the cross-sectional image after threshold segmentation to determine the location of the peel and pulp in the cross-sectional image.
[0079] In specific implementation, steps S301 and S302 take a slice of white-fleshed dragon fruit as an example. First, an RGB cross-sectional image of the white-fleshed dragon fruit slice is acquired. Then, the RGB cross-sectional image is separated into three channels, and the G channel is selected to convert the RGB cross-sectional image into a G channel cross-sectional image. Using a first feature threshold, threshold segmentation is performed on the G channel cross-sectional image to determine the boundary line between the white-fleshed dragon fruit peel and the flesh. Based on the boundary line, connected component analysis is performed on the threshold-segmented cross-sectional image to determine the peel and flesh positions in the cross-sectional image.
[0080] Step S303: Based on the second feature threshold, perform threshold segmentation on the cross-sectional image to determine the grayscale cross-sectional image corresponding to the cross-sectional image.
[0081] Step S304: Determine the connected regions in the grayscale cross-sectional image.
[0082] Step S305: In response to the gray value of the connected region satisfying the preset gray value threshold, the connected region is determined to be the location of the seed.
[0083] In specific implementation of steps S301 to S305, taking a slice of red dragon fruit as an example, the three channels of the RGB cross-sectional image of the red dragon fruit slice are separated, the R channel is selected, and the RGB cross-sectional image is converted into an R channel cross-sectional image. A first feature threshold is used to perform threshold segmentation on the R channel cross-sectional image to obtain the R channel cross-sectional image of the pulp. A second feature threshold is then used to perform threshold segmentation on the R channel cross-sectional image of the pulp to determine the corresponding grayscale cross-sectional image. Binarization and connected component analysis are performed on the grayscale cross-sectional image to determine the connected regions in the grayscale cross-sectional image. If the grayscale value of a connected region is less than a preset grayscale threshold, the connected region is determined to be the location of a seed. Each individual connected region represents a single seed, thus obtaining a binary image of the red dragon fruit slice containing the seed locations.
[0084] In some embodiments, the processing flow of the fruit trait detection method is illustrated. Figure 4 ,like Figure 4 As shown, it includes:
[0085] Step S401: Based on the peel location, determine the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image.
[0086] Step S402: Based on the location of the pulp, determine the volume of the pulp of the fruit corresponding to the cross-sectional image.
[0087] Step S403: Based on the seed location, determine the number of seeds in the fruit corresponding to the cross-sectional image.
[0088] In specific implementation, steps S401 to S403 involve determining the peel thickness and scale thickness of the dragon fruit based on the peel position in the cross-sectional image of the dragon fruit slice. The volume of the dragon fruit pulp is determined based on the pulp position in the cross-sectional image of the dragon fruit slice. The number of seeds in the dragon fruit is determined based on the seed position in the cross-sectional image of the dragon fruit slice.
[0089] In some embodiments, the processing flow of the fruit trait detection method is illustrated. Figure 5 ,like Figure 5 As shown, it includes:
[0090] Step S501: Determine the shooting ratio of the cross-sectional image.
[0091] Step S502: Determine the peel thickness and scale thickness of the fruit based on the peel position and shooting ratio.
[0092] In specific implementations of steps S501 and S502, it is assumed that the image acquisition device captures the cross-sectional image at a shooting ratio of 1mm / 10 pixels. Based on the position of the fruit peel, the thickness of the fruit peel in the cross-sectional image is determined to be 20 pixels, and the thickness of the scales is determined to be 10 pixels. Therefore, according to the shooting ratio, the thickness of the fruit peel is determined to be 2mm and the thickness of the scales is 1mm.
[0093] Step S503: Determine the fruit flesh area based on the fruit flesh location and shooting ratio.
[0094] Step S504: Determine the first pulp volume of each layer of fruit slices based on the product of the pulp area and the fruit slice thickness.
[0095] Step S505: The volume of the first pulp in the cross-sectional image of each layer is superimposed according to the number of fruit slice layers to determine the volume of the fruit pulp.
[0096] In steps S503-S505, in specific implementation, assuming the fruit slice has 10 layers, a slice thickness of 1mm, a shooting ratio of 1mm / 10 pixels, and a pulp area of 1200 pixels in the cross-sectional image, then based on the pulp position and shooting ratio, the pulp area of the first layer of fruit slice is determined to be 12mm². 2 The flesh area of the second layer of fruit slices is 13mm. 2 The pulp area of the third layer of fruit slices is 14mm. 2 The pulp area of the fourth layer of fruit slices is 15mm. 2 The flesh area of the fifth layer of fruit slices is 16mm. 2 The pulp area of the sixth layer of fruit slices is 17mm. 2 The pulp area of the seventh layer of fruit slices is 18mm. 2 The pulp area of the eighth layer of fruit slices is 19mm. 2 The pulp area of the ninth layer of fruit slices is 20mm. 2 The flesh area of the tenth layer of fruit slices is 21 mm. 2 The volume of the fruit pulp is determined to be the sum of the products of the pulp area of each layer and the thickness of each fruit slice: 12*1 + 13*1 + 14*1 + 15*1 + 16*1 + 17*1 + 18*1 + 19*1 + 20*1 + 21*1 = 165 mm. 3 .
[0097] Step S506: Based on the seed location, determine the number of first seeds in the cross-sectional image of each layer.
[0098] Step S507: The number of seeds in the first seed in each cross-sectional image of the fruit is superimposed based on the number of fruit slice layers to determine the number of seeds in the fruit.
[0099] In specific implementation of steps S506 and S507, assuming the number of fruit slices is 3, the number of the first seed in the first slice of the fruit is determined to be 10, the number of the first seed in the second slice of the fruit is 12, and the number of the first seed in the third slice of the fruit is 15. Therefore, the total number of seeds in the fruit is 10 + 12 + 15 = 37.
[0100] Step S508: Based on the seed location and the number of fruit slice layers, perform three-dimensional reconstruction on the cross-sectional image of each layer to obtain a three-dimensional reconstruction model of the fruit seeds.
[0101] Step S509: Based on the three-dimensional reconstruction model, determine the seed volume and spatial distribution of the fruit.
[0102] In steps S508 and S509, in specific implementation, the corresponding slice projection image can be obtained from the binary image of the cross-sectional image of each layer of dragon fruit. The pixel area of the dragon fruit slice in that layer can be determined from the slice projection image. Based on the seed location and pixel area, the seeds in the cross-sectional image of that layer are reconstructed in three dimensions using a three-dimensional ellipsoid fitting algorithm. Based on the number of fruit slice layers, the seeds in all cross-sectional images are 3D reconstructed and superimposed to obtain a 3D reconstruction model of the fruit seeds. Based on the 3D reconstruction model, the seed volume and spatial distribution of the dragon fruit are determined.
[0103] Figure 6 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 1 .
[0104] refer to Figure 6 The application scenario one of the fruit phenotypic detection method provided in this application embodiment is applied to the detection of phenotypic traits of dragon fruit based on slice imaging and three-dimensional reconstruction technology. In this context, 61 represents an automatic slicer, 62 represents a PLC controller, 63 represents a first robotic arm, 64 represents a visible light camera, 65 represents a second robotic arm, 66 represents a waste storage box, 67 represents a rotating platform, and 68 represents a phenotypic detection device.
[0105] Automatic slicer 61 is used to automate the slicing of dragon fruit. Automatic slicer 61 may include a transport stage and a blade. The transport stage moves the dragon fruit to the blade for slicing to obtain fruit slices.
[0106] The PLC controller 62 is connected to the servo motor and driver of the rotating table 67 to precisely control the rotation angle, start time and stop time of the rotating table. The PLC controller 62 is also connected to the servo motor and driver of the automatic slicer 61 to precisely control the step distance, start time and stop time of the automatic slicer 61.
[0107] The rotating stage 67 is used to carry the fruit slices and receive instructions from the PLC controller 62 to rotate and move the fruit slices to the image acquisition area.
[0108] The first robotic arm 63 is used to keep the fruit slices on the rotating platform 67 flat.
[0109] The visible light camera 64 is used to acquire RGB cross-sectional images of fruit slices. The visible light camera 64 may include an optical lens, a camera body, and a storage device. It receives the image transmitted from the optical lens via a CCD (Charge-coupled Device), converts it into a digital signal via an analog-to-digital converter, and stores the numerical signal in the storage device. The optical lens of the visible light camera 64 is the same as that of a conventional camera, focusing the image onto a photosensitive element and then converting the light signal into an electrical signal.
[0110] The second robotic arm 65 is used to transfer fruit slices into the waste storage box 66.
[0111] Waste storage box 66: Used to store fruit slices after the RGB cross-sectional images have been collected. It will be emptied after all the RGB cross-sectional images of the dragon fruit slices have been collected.
[0112] The phenotypic detection device 68 is connected to the automatic slicer 61, the visible light camera 64, and the PLC controller 62 respectively. The phenotypic detection device 68 is used to send control commands to the automatic slicer 61 and the PLC controller 62; receive the RGB cross-sectional images of fruit slices collected by the visible light camera 64, and perform image processing and three-dimensional reconstruction on the RGB cross-sectional images to obtain phenotypic trait detection results, and display and store the phenotypic trait detection results.
[0113] Understandable. Figure 6 The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 6 The application scenarios of the fruit morphology detection method are shown.
[0114] Figure 7 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 2 .
[0115] refer to Figure 7The second application scenario of the fruit phenotypic detection method provided in this application embodiment is applied to the detection of dragon fruit phenotypic traits based on slice imaging three-dimensional reconstruction technology.
[0116] In this diagram, 61 represents the automatic slicer, 62 represents the PLC controller, 63 represents the first robotic arm, 64 represents the visible light camera, 65 represents the second robotic arm, 66 represents the waste storage box, 67 represents the rotating platform, 68 represents the morphology detection device, and 69 represents the fruit slices cut by the automatic slicer 61.
[0117] Understandable. Figure 7 The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 7 The application scenarios of the fruit morphology detection method are shown.
[0118] Figure 8 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 3 .
[0119] refer to Figure 8 The third application scenario of the fruit morphology detection method provided in this application embodiment is applied to the morphology detection of dragon fruit samples. First, the dragon fruit sample is placed in an automatic slicer. The automatic slicer is powered on and adjusted to a suitable fruit slice thickness and speed. The automatic slicer begins to intermittently slice the dragon fruit sample at equal intervals, obtaining fruit slices and determining the number of slice layers. The fruit slices are moved by a rotating platform to the image acquisition area directly below a visible light camera. The center of the visible light camera's field of view, the center of the image acquisition area, and the center of the fruit slice are on the same vertical line. The visible light camera acquires RGB cross-sectional images of the fruit slices and transmits these images to a computer. The computer extracts the peel, pulp, and seed positions from the RGB cross-sectional images. After each RGB cross-sectional image is acquired, the rotating platform transports the fruit slice to a second robotic arm, which then moves the fruit slice into a waste container. After acquiring RGB cross-sectional images of all fruit slices from a dragon fruit sample, the computer system determines the number of seeds, color, peel thickness, and pulp volume based on the location of the peel, pulp, and seeds, and performs voxel-based 3D reconstruction of the RGB cross-sectional images. The final phenotypic data of the dragon fruit sample include: number of seeds, color, peel thickness, and pulp volume. This phenotypic data is then stored.
[0120] Understandable. Figure 8The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 8 The application scenarios of the fruit morphology detection method are shown.
[0121] Figure 9 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 4 .
[0122] refer to Figure 9 The fourth application scenario of the fruit morphology detection method provided in this application embodiment is applied to acquiring RGB cross-sectional images of dragon fruit slices. A visible light camera is used to acquire images of the dragon fruit slices in the image acquisition area, resulting in RGB cross-sectional images of the dragon fruit slices. The center of the visible light camera's field of view, the center of the image acquisition area, and the center of the dragon fruit slice are located on the same vertical line.
[0123] Understandable. Figure 9 The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 9 The application scenarios of the fruit morphology detection method are shown.
[0124] Figure 10 This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 5 .
[0125] refer to Figure 10 The fifth application scenario of the fruit morphology detection method provided in this application embodiment is applied to determine the binary image of a dragon fruit slice containing the seed location. First, RGB cross-sectional images of the dragon fruit slice are acquired. Thresholding segmentation is performed on the RGB cross-sectional images to determine the corresponding grayscale cross-sectional images. Binarization and connected component analysis are performed on the grayscale cross-sectional images to determine the connected regions within them. If the grayscale value of a connected region is less than a preset grayscale threshold, the connected region is determined to be the seed location. Each individual connected region represents a single seed. This yields a binary image of the dragon fruit slice containing the seed location.
[0126] Understandable. Figure 10 The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 10 The application scenarios of the fruit morphology detection method are shown.
[0127] Figure 11This application illustrates a scenario where the fruit trait detection method provided in this embodiment is used. Figure 6 .
[0128] refer to Figure 11 The sixth application scenario of the fruit trait detection method provided in this application embodiment is applied to determine the voxel three-dimensional reconstruction model of dragon fruit seeds. Based on the location of the dragon fruit seeds and the number of layers in the dragon fruit slice, a three-dimensional ellipse fitting operation is performed on the binary image of each layer of the dragon fruit slice containing the location of the dragon fruit seeds to obtain the voxel three-dimensional reconstruction model of the dragon fruit seeds. In the image, each colored block represents a dragon fruit seed.
[0129] Understandable. Figure 11 The application scenarios of the fruit trait detection method in this application are only some exemplary implementations in the embodiments of this application. The application scenarios of the fruit trait detection method in the embodiments of this application include, but are not limited to, those of fruit trait detection method. Figure 11 The application scenarios of the fruit morphology detection method are shown.
[0130] The method of this application embodiment automatically slices the fruit based on a preset fruit slice thickness to obtain fruit slices and determines the number of fruit slice layers; the fruit slices are moved to an image acquisition area to acquire cross-sectional images of the fruit slices; the center of the image acquisition area and the center of the fruit slice are located on the same vertical line. Thus, an automatic slicer can replace manual slicing, improving the accuracy of fruit phenotypic detection, saving manpower, and effectively avoiding accidental damage that is prone to occur during high-speed slicing. The method of this application embodiment also performs threshold segmentation on the cross-sectional image based on a first feature threshold to determine the peel and pulp positions; and performs threshold segmentation on the cross-sectional image based on a second feature threshold to determine the seed positions. This allows for the acquisition of high-quality cross-sectional images through image processing techniques such as threshold segmentation and connected component analysis, solving the problem of accurate reconstruction of the internal tonal structure of the fruit, providing a necessary prerequisite for fruit phenotypic phenotypic detection, and improving the accuracy and efficiency of fruit phenotypic detection. The method in this application determines the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image based on the peel location; determines the pulp volume of the fruit corresponding to the cross-sectional image based on the pulp location; and determines the number of seeds of the fruit corresponding to the cross-sectional image based on the seed location. Thus, it can simultaneously acquire the phenotypic traits of the fruit, including pulp volume, peel thickness, scale thickness, and seed number, based on machine vision technology of a computer system. The automatic seed identification function is powerful, requiring no pre-processing of other impurities, and is easily integrated with existing plant phenotypic extraction technologies, including structured light, hyperspectral imaging, and miniature CT (Computed Tomography), improving the accuracy and efficiency of fruit phenotypic detection. Finally, the phenotypic traits of the fruit are stored as a spreadsheet for easy indexing, management, and analysis by users. The method in this application embodiment performs three-dimensional reconstruction on the cross-sectional image of each layer based on the seed location and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit seeds; based on the three-dimensional reconstruction model, the seed volume and spatial distribution of the fruit seeds are determined. In this way, the seeds of the fruit can be accurately restored in three-dimensional space, improving the accuracy and efficiency of fruit trait detection.
[0131] Therefore, compared with related technologies that require manual intervention in measuring fruit traits during the fruit trait detection process, resulting in low accuracy and efficiency of fruit trait detection, the fruit trait detection method of this application realizes automatic fruit slicing, automatic acquisition of cross-sectional images of fruit slices, automatic analysis of cross-sectional images, and automatic extraction of fruit phenotypic traits, thereby improving the accuracy and efficiency of fruit trait detection.
[0132] The following description continues to illustrate the exemplary structure of the fruit trait detection system 90 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 12As shown, the software modules in the fruit trait detection system 90 may include: an automatic slicer 901, used to cut the fruit to obtain fruit slices; an image acquisition unit 902, used to acquire cross-sectional images of the fruit slices and determine the positions of the peel, pulp, and seeds in the cross-sectional images; and a trait detection device 903, used to determine the phenotypic traits of the fruit corresponding to the cross-sectional images based on the positions of the peel, pulp, and seeds.
[0133] In some embodiments, the fruit morphology detection system 90 further includes a rotating platform 904 and an automatic slicer 903. Specifically, in the process of cutting the fruit using the automatic slicer to obtain fruit slices, the system performs the following: automatically slices the fruit based on a preset fruit slice thickness to obtain fruit slices, and determines the number of fruit slice layers; the rotating platform 904 is used to move the fruit slices to an image acquisition area to acquire cross-sectional images of the fruit slices; the center of the image acquisition area and the center of the fruit slices are located on the same vertical line.
[0134] In some embodiments, the image acquisition device 902, in the process of acquiring cross-sectional images of fruit slices and determining the positions of the peel, pulp, and seeds in the cross-sectional images, specifically performs the following: threshold segmentation of the cross-sectional image based on a first feature threshold to determine the positions of the peel and pulp; and threshold segmentation of the cross-sectional image based on a second feature threshold to determine the positions of the seeds.
[0135] In some embodiments, the image acquisition unit 902, in the process of thresholding the cross-sectional image based on a first feature threshold to determine the peel and pulp positions, specifically performs the following: thresholding the cross-sectional image based on the first feature threshold to determine the boundary line between the peel and pulp positions; and performs connected component analysis on the thresholded cross-sectional image based on the boundary line to determine the peel and pulp positions in the cross-sectional image.
[0136] In some embodiments, the image acquisition unit 902, in the process of threshold segmentation of the cross-sectional image based on the second feature threshold to determine the seed location, specifically performs the following: threshold segmentation of the cross-sectional image based on the second feature threshold to determine the grayscale cross-sectional image corresponding to the cross-sectional image; determines the connected region in the grayscale cross-sectional image; and determines the connected region as the seed location in response to the grayscale value of the connected region satisfying a preset grayscale threshold.
[0137] In some embodiments, phenotypic traits include pulp volume, peel thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution. In the process of determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on peel location, pulp location, and seed location, the phenotypic detection device 903 is specifically used to: determine the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image based on peel location; determine the pulp volume of the fruit corresponding to the cross-sectional image based on pulp location; and determine the number of seeds, seed volume, and seed spatial distribution of the fruit corresponding to the cross-sectional image based on seed location.
[0138] In some embodiments, the phenotypic detection device 903, in the process of determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, pulp position, and seed position, specifically performs the following: determining the shooting scale of the cross-sectional image; determining the peel thickness and scale thickness of the fruit based on the peel position and shooting scale; determining the pulp area of the fruit slice based on the pulp position and shooting scale; determining the first pulp volume of each layer of fruit slice based on the product of the pulp area and the fruit slice thickness; superimposing the first pulp volume of each layer of fruit slice with the number of fruit slice layers to determine the pulp volume of the fruit; determining the first number of seeds in each layer of the cross-sectional image based on the seed position; superimposing the first number of seeds in each layer of the cross-sectional image with the number of fruit slice layers to determine the number of seeds of the fruit; performing three-dimensional reconstruction of each layer of the cross-sectional image based on the seed position and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit's seeds; and determining the seed volume and spatial distribution of the fruit based on the three-dimensional reconstruction model.
[0139] It should be noted that the description of the system in this application embodiment is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, therefore it will not be repeated. For any technical details not covered in the fruit morphology detection system provided in this application embodiment, please refer to... Figures 1 to 12 The meaning is understood in accordance with the description of any of the accompanying drawings.
[0140] According to embodiments of this application, this application also provides a non-transitory computer-readable storage medium.
[0141] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0143] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0144] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0145] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0146] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0147] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting fruit characteristics, characterized in that, The method includes: The fruit is cut using an automatic slicer to obtain fruit slices; Collect cross-sectional images of the fruit slices and determine the positions of the peel, pulp, and seeds in the cross-sectional images; Based on the location of the peel, the location of the pulp, and the location of the seeds, the phenotypic traits of the fruit corresponding to the cross-sectional image are determined; the phenotypic traits include pulp volume, peel thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution; The step of determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, the pulp position, and the seed position includes: determining the shooting scale of the cross-sectional image; determining the peel thickness and scale thickness of the fruit based on the peel position and the shooting scale; determining the pulp area of the fruit slice based on the pulp position and the shooting scale; determining the first pulp volume of each layer of the fruit slice based on the product of the pulp area and the fruit slice thickness; superimposing the first pulp volume of each layer of the fruit slice by the number of fruit slice layers to determine the pulp volume of the fruit; determining the first number of seeds in each layer of the cross-sectional image based on the seed position; superimposing the first number of seeds in each layer of the cross-sectional image by the number of fruit slice layers to determine the number of seeds of the fruit; performing three-dimensional reconstruction of each layer of the cross-sectional image based on the seed position and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit seeds; and determining the seed volume and seed spatial distribution of the fruit based on the three-dimensional reconstruction model.
2. The method according to claim 1, characterized in that, The method of using an automatic slicer to cut the fruit into slices includes: Based on the preset fruit slice thickness, the fruit is automatically sliced to obtain fruit slices, and the number of fruit slice layers is determined. The fruit slice is moved to the image acquisition area to acquire a cross-sectional image of the fruit slice; the center of the image acquisition area and the center of the fruit slice are on the same vertical line.
3. The method according to claim 1, characterized in that, The process of acquiring cross-sectional images of the fruit slices and determining the locations of the peel, pulp, and seeds in the cross-sectional images includes: Based on the first feature threshold, threshold segmentation is performed on the cross-sectional image to determine the location of the peel and the location of the pulp; Based on the second feature threshold, the cross-sectional image is segmented using the threshold to determine the location of the grain.
4. The method according to claim 3, characterized in that, The step of performing threshold segmentation on the cross-sectional image based on a first feature threshold to determine the location of the peel and the location of the pulp includes: Based on the first feature threshold, the cross-sectional image is segmented using the threshold to determine the boundary line between the peel location and the pulp location; Based on the boundary line, connected component analysis is performed on the cross-sectional image after threshold segmentation to determine the location of the peel and pulp in the cross-sectional image.
5. The method according to claim 3, characterized in that, The step of performing threshold segmentation on the cross-sectional image based on the second feature threshold to determine the seed location includes: Based on the second feature threshold, the cross-sectional image is segmented using the threshold to determine the grayscale cross-sectional image corresponding to the cross-sectional image; Determine the connected regions in the grayscale cross-sectional image; In response to the grayscale value of the connected region satisfying a preset grayscale threshold, the connected region is determined to be the location of the seed.
6. The method according to claim 2, characterized in that, Determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the location of the peel, the location of the pulp, and the location of the seeds includes: Based on the location of the peel, the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image are determined; Based on the location of the pulp, determine the volume of the pulp of the fruit corresponding to the cross-sectional image; Based on the location of the seeds, the number of seeds, the volume of the seeds, and the spatial distribution of the seeds of the fruit corresponding to the cross-sectional image are determined.
7. A fruit trait detection system, characterized in that, The fruit trait detection system includes: An automatic slicer is used to cut fruit into slices. An image acquisition device is used to acquire cross-sectional images of the fruit slices and determine the positions of the peel, pulp, and seeds in the cross-sectional images. A phenotypic detection device is used to determine the phenotypic traits of the fruit corresponding to the cross-sectional image based on the location of the peel, the location of the pulp, and the location of the seeds; the phenotypic traits include pulp volume, peel thickness, scale thickness, number of seeds, seed volume, and seed spatial distribution; The step of determining the phenotypic traits of the fruit corresponding to the cross-sectional image based on the peel position, the pulp position, and the seed position includes: determining the shooting scale of the cross-sectional image; determining the peel thickness and scale thickness of the fruit based on the peel position and the shooting scale; determining the pulp area of the fruit slice based on the pulp position and the shooting scale; determining the first pulp volume of each layer of the fruit slice based on the product of the pulp area and the fruit slice thickness; superimposing the first pulp volume of each layer of the fruit slice by the number of fruit slice layers to determine the pulp volume of the fruit; determining the first number of seeds in each layer of the cross-sectional image based on the seed position; superimposing the first number of seeds in each layer of the cross-sectional image by the number of fruit slice layers to determine the number of seeds of the fruit; performing three-dimensional reconstruction of each layer of the cross-sectional image based on the seed position and the number of fruit slice layers to obtain a three-dimensional reconstruction model of the fruit seeds; and determining the seed volume and seed spatial distribution of the fruit based on the three-dimensional reconstruction model.
8. The system according to claim 7, characterized in that, The fruit morphology detection system also includes a rotating platform. The automatic slicer is used to automatically slice the fruit based on a preset fruit slice thickness to obtain fruit slices and determine the number of fruit slice layers. The rotating platform is used to move the fruit slice to the image acquisition area to acquire a cross-sectional image of the fruit slice; the center of the image acquisition area and the center of the fruit slice are located on the same vertical line.
9. The system according to claim 7, characterized in that, The image acquisition device is used for: Based on the first feature threshold, threshold segmentation is performed on the cross-sectional image to determine the location of the peel and the location of the pulp; Based on the second feature threshold, the cross-sectional image is segmented using the threshold to determine the location of the grain.
10. The system according to claim 9, characterized in that, The image acquisition device is used for: Based on the first feature threshold, the cross-sectional image is segmented using the threshold to determine the boundary line between the peel location and the pulp location; Based on the boundary line, connected component analysis is performed on the cross-sectional image after threshold segmentation to determine the location of the peel and pulp in the cross-sectional image.
11. The system according to claim 9, characterized in that, The image acquisition device is used for: Based on the second feature threshold, the cross-sectional image is segmented using the threshold to determine the grayscale cross-sectional image corresponding to the cross-sectional image; Determine the connected regions in the grayscale cross-sectional image; In response to the grayscale value of the connected region satisfying a preset grayscale threshold, the connected region is determined to be the location of the seed.
12. The system according to claim 8, characterized in that, The trait detection device is used for: Based on the location of the peel, the peel thickness and scale thickness of the fruit corresponding to the cross-sectional image are determined; Based on the location of the pulp, determine the volume of the pulp of the fruit corresponding to the cross-sectional image; Based on the location of the seeds, the number of seeds, the volume of the seeds, and the spatial distribution of the seeds of the fruit corresponding to the cross-sectional image are determined.
13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
Pear fruit stone cell phenotype detection method based on computer image processing
CN111402199A