Detection method, detection device, and program
The method and device enhance flower spike detection in plant images by smoothing, generating difference images, and extracting brightness ranges, effectively distinguishing flower spikes from surrounding colors, and grouping circular objects as flower spikes.
Patent Information
- Application Number
- JP2023021979
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-11-05
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Conventional object detection models struggle to accurately detect flower spikes in plant images when their color is similar to surrounding colors like leaves and branches.
A method and device that includes smoothing the image using a median filter, generating a difference image, grayscaling, and extracting a brightness value range from a histogram to enhance flower spike detection, and optionally using Hough transform to identify circular objects and group them as flower spikes.
Accurately detects flower spikes even when their color is similar to surrounding colors, improving detection accuracy.
Smart Images

Figure 0007764047000004 
Figure 0007764047000005 
Figure 0007764047000006
Abstract
Description
[Technical Field]
[0001] The present invention relates to a detection method, a detection device, and a program. [Background technology]
[0002] A method for detecting plant flower spikes from images using the object detection model YOLOv5 is known as prior art. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Application No. 2021-203363 Summary of the Invention [Problem to be solved by the invention]
[0004] However, conventional techniques using object detection models such as those described above may not be able to accurately detect flower spikes if the color of the flower spike is similar to the surrounding colors such as leaves and branches.
[0005] An aspect of the present invention aims to detect the flower spikes of a plant from an image with higher accuracy than conventional techniques, even if the color of the flower spike is similar to the surrounding color of the leaves and branches. [Means for solving the problem]
[0006] In order to solve the above problem, a detection method according to one embodiment of the present invention is a method for detecting the inflorescence of a plant from an image, and includes a smoothing process for smoothing an image of a plant body including an inflorescence obtained using an imaging device, a process for generating a difference image between the image and the image after the smoothing process, a process for grayscaling the difference image, and a process for extracting a range of brightness values representing the inflorescence from a histogram of brightness values of the grayscaled difference image.
[0007] In order to solve the above problem, a detection device according to one embodiment of the present invention is a detection device that detects the flower spikes of a plant from an image, and includes a smoothing processing unit that smooths an image of a plant body including the flower spikes obtained using an imaging device, a difference image generation unit that generates a difference image between the image and the image after the smoothing processing, a grayscaling processing unit that grayscales the difference image, and a brightness value range extraction unit that extracts a range of brightness values representing the flower spikes from a histogram of brightness values of the grayscaled difference image.
[0008] In order to solve the above problem, a program according to one aspect of the present invention causes a computer to perform the following processes: smoothing an image of a plant body including a flower spike obtained using an imaging device; generating a difference image between the image and the image after the smoothing process; grayscaling the difference image; and extracting a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image. [Effects of the Invention]
[0009] According to one aspect of the present invention, it is possible to detect flower spikes of a plant from an image even if the color of the flower spike is similar to the surrounding colors such as leaves and branches. [Brief explanation of the drawings]
[0010] [Figure 1] 1 is a block diagram showing a configuration of a detection device according to a first embodiment of the present invention. [Figure 2] 1 is a flowchart showing the flow of a detection method according to the first embodiment of the present invention. [Figure 3] 10 is an example of an image before smoothing processing. [Figure 4] This is an example of an image after applying a median filter. [Figure 5] This is the image after linearly expanding the grayscaled difference image. [Figure 6] FIG. 1 illustrates the effect of linear elongation. [Figure 7] 10 is a histogram of the entire image before and after linear stretching. [Figure 8] This is an extract of the histogram 20 or more. [Figure 9] FIG. 10 is a block diagram showing the configuration of a detection device according to a second embodiment of the present invention. [Figure 10] FIG. 6 is a flowchart showing the flow of a detection method according to a second embodiment of the present invention. [Figure 11] This is an imaginary diagram of the classification of the same flower spike. [Figure 12] FIG. 10 is a diagram showing a search range for a circular object. [Figure 13] This is a diagram showing the test circle using circle 1 and circle 2. [Figure 14] FIG. 10 is a diagram showing an example of determination of circle 3 using a determination circle. [Figure 15] FIG. 10 is a diagram showing an example of determination of circle 4 using a determination circle. DETAILED DESCRIPTION OF THE INVENTION
[0011] [Embodiment 1] An embodiment of the present invention will be described in detail below. This embodiment is the basis for the embodiments described below. In recent years, with the decline in the agricultural population, mechanization of fruit cultivation is desired. For example, in grape cultivation, many tasks are required before harvest, such as flower spike shaping, gibberellin treatment, fruit thinning, and bagging. The timing of these tasks is determined by workers visually inspecting the field. However, as the scale of cultivation increases, it becomes difficult to determine the timing of tasks by workers' visual inspection. Therefore, a device that can estimate the growth status of fruit trees from captured images and determine the timing of tasks is desired. To achieve this, technology that can accurately detect flower spikes of fruit trees from images is required. However, for example, grape spikes have a complex structure, their shape and color change depending on the season, and the color of the flower spikes is similar to that of the surrounding leaves and branches. Therefore, it is currently difficult to accurately detect flower spikes from images. The detection device 10 according to this embodiment is a device for accurately detecting such flower spikes from images.
[0012] (Overview of the detection device 10) An overview of the detection device 10 according to this embodiment will be described. The detection device 10 is a detection device that detects plant flower spikes from an image. Generally, a "flower spike" refers to a collection of multiple flowers, but in this embodiment, for convenience, it refers to a single flower. That is, in this embodiment, a flower spike refers to a portion of a spike-like structure where multiple flowers are densely attached to a single stem, and corresponds to a single flower or fruit. For example, in the case of grapes, a flower spike refers to a portion corresponding to a single flower or fruit. In this embodiment, the area where multiple flowers are gathered together is referred to as a "flower spike region," and a detection method therefor will be described later. In this embodiment, as an example, a case will be described in which grape flower spikes are detected from an image containing the spikes. However, the type of flower spike to be detected is not limited, and the detection device 10 may detect flower spikes other than grapes, for example.
[0013] (Configuration of detection device 10) 1 is a block diagram showing the configuration of a detection device 10 according to this embodiment. The detection device 10 includes a control unit 110, an input / output unit 120, and a storage unit .
[0014] The control unit 110 controls all the units of the detection device 10. The control unit 110 includes a smoothing processing unit 111, a difference image generating unit 112, a grayscale processing unit 113, and a brightness value range extracting unit 114.
[0015] The smoothing processing unit 111 smoothes an image of a plant body including a flower spike obtained using an imaging device. FIG. 3 shows an example of an image before the smoothing processing. Hereinafter, the image before the smoothing processing will also be referred to as an "original image." For example, the original image may be an image of a plant body including a flower spike obtained using an imaging device. In the smoothing processing, for example, the original image may be processed using a median filter.
[0016] A median filter is a process that converts the brightness values in an image within a range of interest to the median value. Its features include the ability to preserve contours and correct black-and-white pepper noise. For example, grapevine flower spikes may contain dots that resemble black-and-white pepper noise, and a median filter can be used in such cases. After processing the image with a median filter, the grapevine flower spikes blend into the background.
[0017] For example, the smoothing processing unit 111 may process the entire image using a median filter, with each square area having a side twice the width of the flower spike in the image as a unit. For example, if the width of the flower spike in the image is 15 pixels square, the smoothing processing unit 111 may process the entire image using a median filter, with each area being 30 pixels square. For example, when processing the entire image using a median filter, the smoothing processing unit 111 may use a processing unit of 30 pixels square to 70 pixels square.
[0018] The difference image generating unit 112 generates a difference image between the image before the smoothing process and the image after the smoothing process. For example, the difference image generating unit 112 generates a difference image by subtracting the pixel value of the corresponding pixel in the image after the smoothing process from each pixel value (luminance value) of the image before the smoothing process. The pixel value may be any of RGB (Red, Green, Blue) pixel values.
[0019] The grayscale processing unit 113 grayscales the difference image before and after the smoothing process. For example, when the plant body to be detected is green, the G (Green) value of the RGB values of the difference image may be grayscaled. For example, the process may further include linearly extending the grayscaled difference image.
[0020] Linear extension will be described with reference to Figs. 6 and 7. Fig. 6 is a diagram showing the effect of linear extension. Brightening an image through linear processing (linear extension) is equivalent to shifting the graph showing the relationship between the amount of light received by the sensor and the brightness of the image data upward as a whole. Therefore, dark areas on the image can be brightened overall by linear extension.
[0021] Figure 7 shows histograms of the entire image before and after linear expansion. The horizontal axis of the histogram represents brightness values, and the vertical axis represents frequency. Because the image before linear expansion is a differential image, the brightness values in the histogram can take negative values.
[0022] For example, in the histogram of the difference image before linear extension, the minimum brightness value is 0 and the maximum brightness value is 200, as shown in the upper part of Figure 7. In this case, all areas of the image with negative brightness values will be black, just like areas with a minimum brightness value of 0, making it difficult to identify areas where flower spikes exist. For example, if linear extension is performed so that the minimum brightness value is -100 and the maximum brightness value is 100, as shown in the lower part of Figure 7, the entire difference image will become brighter, making it easier to extract the flower spikes.
[0023] The brightness value range extraction unit 114 extracts a brightness value range that indicates the flower spike from the brightness value histogram of the grayscaled difference image.
[0024] For example, if the brightness range representing the flower spike is 20 to 80 and the brightness range representing the leaf veins and leaf structure is 20 or less, the flower spike portion of the image can be extracted by targeting brightness values of 20 or more as the extraction target. In this way, by extracting a brightness range that includes and is wider than the brightness range representing the flower spike, it is possible to eliminate extraction omissions. Note that the numerical values of the brightness range can be changed using a grayscale technique.
[0025] 8 is an example of a diagram in which parts of a histogram with a brightness value of 20 or more are extracted from an image. For example, in a plant body to be extracted, the color of the flower spike may be similar to the surrounding colors such as leaves and branches (greenish color).
[0026] The input / output unit 120 acquires and outputs various types of data used by the control unit 110. For example, the input / output unit 120 acquires an image of a plant body including a flower spike, which is acquired using an imaging device and is referenced by the smoothing processing unit 111. The input / output unit 120 also outputs the processing results of the control unit 110 (for example, data extracted from a range of brightness values indicating a flower spike).
[0027] The storage unit 130 stores various types of data used by the control unit 110. For example, the storage unit 130 stores image data of a plant body including a flower spike obtained using an imaging device, and data obtained by extracting a range of brightness values indicating the flower spike.
[0028] (Detection method S1 flow) The flow of the method for detecting the flower spikes of a plant from an image will now be described. Fig. 2 is a flow diagram showing the flow of the detection method S1, which is a method for detecting the flower spikes of a plant from an image.
[0029] (Step S11) In step S11, the smoothing processing unit 111 smoothes the image of the plant body including the flower spike acquired using the imaging device. In the smoothing processing, for example, the original image may be processed using a median filter.
[0030] (Step S12) In step S12, the difference image generating unit 112 generates a difference image between the image before the smoothing process and the image after the smoothing process.
[0031] (Step S13) In step S13, the grayscale processing unit 113 grayscales the difference image before and after the smoothing process.
[0032] For example, the process may further include linearly expanding the grayscaled difference image. Figure 5 shows an example of an image after linearly expanding the grayscaled difference image.
[0033] (Step S14) In step S14, the brightness value range extraction unit 114 extracts a brightness value range that indicates a flower spike from the histogram of brightness values of the grayscaled difference image.
[0034] (Effects of the detection device 10 and the detection method S1) As described above, the detection device 10 according to this embodiment is a detection device for detecting the flower spikes of a plant from an image, and is configured to include a smoothing processing unit 111 that smooths an image of a plant body including the flower spike obtained using an imaging device, a difference image generation unit 112 that generates a difference image between the image and the image after the smoothing processing, a grayscaling processing unit 113 that grayscales the difference image, and a brightness value range extraction unit 114 that extracts a range of brightness values representing the flower spikes from a histogram of brightness values of the grayscaled difference image.
[0035] In addition, detection method S1 is a method for detecting the flower spike of a plant from an image, and includes a smoothing step S11 of smoothing an image of a plant body including the flower spike obtained using an imaging device, a step S12 of generating a difference image between the image and the image after the smoothing process, a step S13 of grayscaling the difference image, and a step S14 of extracting a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image.
[0036] Therefore, the detection device 10 and detection method S1 of this embodiment have the effect of being able to detect the flower spike of a plant from an image more accurately than conventional technology, even if the color of the flower spike is similar to the surrounding color of the leaves and branches.
[0037] [Embodiment 2] Other embodiments of the present invention will be described below. For ease of explanation, the same reference numerals will be used to designate components having the same functions as those described in the above embodiment, and the description thereof will not be repeated.
[0038] (Outline of the detection device 20) An overview of the detection device 20 according to this embodiment will be described. The detection device 20 is a detection device that detects flower spikes of plants from an image. In this embodiment, as an example, a case where grape flower spikes are detected from an image that includes the spikes will be described. However, the type of flower spike to be detected is not limited, and the detection device 20 may detect flower spikes of types other than grapes, for example.
[0039] (Configuration of the detection device 20) 9 is a block diagram showing the configuration of the detection device 20 according to this embodiment. The detection device 20 includes a control unit 210, an input / output unit 220, and a storage unit 230.
[0040] The control unit 210 comprehensively controls each unit of the detection device 20. The control unit 210 has a smoothing processing unit 211, a difference image generation unit 212, a grayscale processing unit 213, a brightness value range extraction unit 214, a circular object detection unit 215, and a circular object group search unit 216. Note that the circular object detection unit 215 may be included in the detection device 10 described in the first embodiment.
[0041] The smoothing processing unit 211, the difference image generation unit 212, the grayscaling processing unit 213, and the brightness value range extraction unit 214 have the same functions as the smoothing processing unit 111, the difference image generation unit 112, the grayscaling processing unit 113, and the brightness value range extraction unit 114 described in embodiment 1, and therefore their description will be omitted.
[0042] An image from which a range of brightness values representing flower spikes has been extracted also contains objects other than flower spikes. Therefore, it is necessary to detect only flower spikes from the image. Flower spikes are characterized by their nearly circular shape. Therefore, flower spikes can be extracted by detecting circular objects. The circular object detection unit 215 detects circular objects having a circularity equal to or greater than a predetermined value from the image from which a range of brightness values representing flower spikes has been extracted. Specifically, the circular object detection unit 215 may detect circular objects having a circularity equal to or greater than a predetermined value by, for example, performing a Hough transform on the image from which a range of brightness values representing flower spikes has been extracted. The Hough transform is one method of detecting the circularity of an object. Note that the Hough transform is a well-known technique. In the Hough transform, a predetermined circularity value can be determined, and circular objects having a circularity equal to or greater than that value can be detected. This makes it possible to detect objects that are likely to be flower spikes.
[0043] The circular object group search unit 216 searches for a flower spike region under the assumption that all circular objects detected by the circular object detection unit 215 are flower spikes. Specifically, the circular object group search unit 216 searches for a group of circular objects that exist within a predetermined range from the center of one detected circular object. The predetermined range may be, for example, a circular range having a radius that is 5 to 20 times the radius of the circle of the first circular object. A method for searching for a group of circular objects will be described later. Based on the search results, the circular object group search unit 216 estimates that a group of circular objects that exist within the predetermined range is a single flower spike region. In this embodiment, a flower spike region is a region on an image that includes a group of flower spikes. For example, in the case of grapes, a region where multiple flowers are gathered together is called a flower spike region, regardless of whether the region is before or after shaping.
[0044] The input / output unit 220 acquires and outputs various types of data used by the control unit 210. For example, the input / output unit 220 acquires an image of a plant body including a flower spike, acquired using an imaging device, and referenced by the smoothing processing unit 211. The input / output unit 220 also outputs the processing results of the control unit 210 (for example, data extracted from a range of brightness values indicating a flower spike).
[0045] The storage unit 230 stores various types of data used by the control unit 210. For example, the storage unit 230 stores image data of a plant body including a flower spike obtained using an imaging device, and data obtained by extracting a range of brightness values indicating the flower spike.
[0046] (Detection method S2 flow) The following describes the flow of a method for searching for a group of circular objects estimated to be one flower spike region from an image in which a range of brightness values indicating a flower spike has been extracted. Fig. 10 is a flow diagram showing the flow of detection method S2, which is a method for searching for and detecting a group of circular objects estimated to be one flower spike region from an image in which a range of brightness values indicating a flower spike has been extracted. Note that detection method S2 is executed after executing a process similar to that of detection method S1 in embodiment 1.
[0047] (Step S21) In step S21, the circular object detection unit 215 detects circular objects having a circularity equal to or greater than a predetermined value from an image in which a range of brightness values representing a flower spike has been extracted. For example, circular objects having a circularity equal to or greater than a predetermined value may be detected by performing a Hough transform on the image in which a range of brightness values representing a flower spike has been extracted. Figure 11 is an imaginary diagram of the classification of the flower spike. In step S21, multiple circular objects are detected, as shown on the right side of Figure 11.
[0048] (Step S22) In the processes from step S22 to step S29, a group of circular objects existing within a predetermined range from the center of one circular object detected in step S21 is searched for.
[0049] In step S22, the circular object group searching unit 216 selects a first circular object and regards it as having been searched. Note that one circular object arbitrarily selected from the circular objects detected in step S21 is regarded as the first circular object.
[0050] (Step S23) In step S23, the circular object group search unit 216 determines whether an unsearched circular object exists within a predetermined range. The predetermined range may be, for example, a range of a circle having a radius that is 5 to 20 times the radius of the circle of the first circular object.
[0051] 11, a search range for steps S23 and thereafter is set with the first circular object found in step S22 as the center. A predetermined range, for example, is set as this search range. Thereafter, circular objects existing within, for example, a predetermined range from the center of the first circular object are sequentially searched for according to the following procedure.
[0052] If an unsearched circular object does not exist within the predetermined range (step S23: NO), the processing of detection method S2 ends. If an unsearched circular object exists within the predetermined range (step S23: YES), the processing proceeds to step S24.
[0053] 12 is a diagram showing a search range for a circular object. For example, as shown in FIG. 12, a range from the center of circle 1, which is a first circular object, to within 20 times the radius of circle 1 is set as a predetermined range Q. In this embodiment, Q is set as the search range for a circular object. In this case, circles 2, 3, and 4 are within the range of Q, and are targets of search in step S24 and thereafter. On the other hand, circle 5 is outside the range of Q, and is not a target of search.
[0054] (Step S24) In step S24, the circular object group searching unit 216 extracts the circular object that is closest to the first circular object as the second circular object, and determines that the second circular object has been searched.
[0055] (Step S25) In step S25, the circular object group search unit 216 determines whether an unsearched circular object exists within the predetermined range. If an unsearched circular object does not exist within the predetermined range, the processing of the detection method S2 ends. If an unsearched circular object exists within the predetermined range, the processing proceeds to step S25.
[0056] (Step S26) In step S26, the circular object group search unit 216 sets a judgment circle for the circular object group based on the searched circular objects (i objects in total, where i is a natural number equal to or greater than 2.) The judgment circle is a circle for judging whether the circular object to be searched for is included in the same circular object group as the searched circular object group.
[0057] For example, the radius of the predetermined judgment circle may be set as expressed by the following formula, where i is a natural number greater than or equal to 2, the first circular object to the i-th circular object are considered to be included in the same circular object group and have been searched, the center coordinates of the i-th circular object are (Xi, Yi), and the center of gravity coordinates of the centers of the first circular object to the i-th circular object are (Xm, Ym).
[0058]
number
[0059] The above formula is used to determine whether the circle (i+1) is included in the same group of circular objects as the group of circular objects up to the circle i. Similar circles refer to circular objects that have already been searched.
[0060] Fig. 13 is a diagram showing a test circle formed by circles 1 and 2, that is, test circle P2 for determining circle 3. Here, the second circular object is circle 2. As shown in Fig. 13, when the center of circle 1 is C1 and the center of circle 2 is C2, and the center of gravity of the centers of circles 1 and 2 is M(Xm, Ym), the test circle formed by circles 1 and 2 is circle P2 with M as its center.
[0061] (Step S27) In step S27, the circular object group search unit 216 extracts the nearest unsearched circular object from the center of the determination circle, which corresponds to the center of gravity of the centers of the first to i-th circular objects, as the (i+1)th circular object.
[0062] The processing from step S27 to step S29 will be described later with reference to FIGS.
[0063] (Step S28) In step S28, the circular object group searching unit 216 determines whether the centers of gravity of the centers of the (i+1) circular objects from the first circular object to the (i+1)th circular object are within the determination circle.
[0064] If the centers of gravity of the (i+1) circular objects are not within the judgment circle (step S28: NO), the processing of detection method S2 ends. If the centers of gravity of the (i+1) circular objects are within the judgment circle (step S28: YES), the processing proceeds to step S29.
[0065] (Step S29) In step S29, the circular object group search unit 216 determines that the (i+1)th circular object is included in the same circular object group as the already-searched circular object group, and determines that the (i+1)th circular object has been searched. Then, the process proceeds to step S25.
[0066] Fig. 14 is a diagram showing an example of determination of circle 3, which is a third circular object, using a determination circle when i = 2. First, the unsearched circular object closest to the center M of the determination circle P2 is extracted as circle 3, which is the third circular object. Here, the center of gravity of the centers of circles 1, 2, and 3 is defined as M3 (Xm, Ym). In the case of Fig. 14, since M3 is within the determination circle P2, circle 3 is determined to be included in the same group of circular objects as circles 1 and 2.
[0067] After the judgment, a judgment circle P3 is set with M3 as its center. As shown in Fig. 14, the center of circle 3 is I(Xi, Yi) and the radius of circle 3 is Ri. In this case, the radius of judgment circle P3 is Ri+S.
[0068] FIG. 15 is a diagram showing an example of determination of a fourth circular object, circle 4, using a determination circle when i=3. First, the unsearched circular object closest to the center M3 of the determination circle P3 is extracted as circle 4. Here, the center of gravity of the centers of circles 1, 2, 3, and 4 is defined as M4. Also, the center of circle 4 is defined as C4. In the case of FIG. 15, since M4 is outside the determination circle P3, circle 4 is determined not to be included in the same group of circular objects as circles 1, 2, and 3, and the processing of detection method S2 ends here.
[0069] When the process of the detection method S2 is completed, a group of circular objects existing within a predetermined range is estimated as one flower spike region.
[0070] (Effects of the detection device 20 and the detection method S2) As described above, the detection device 20 according to this embodiment comprises a smoothing processing unit 211 that smooths an image of a plant body including a flower spike obtained using an imaging device, a difference image generation unit 212 that generates a difference image between the image and the image after the smoothing processing, a grayscaling processing unit 213 that grayscales the difference image, a brightness value range extraction unit 214 that extracts a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image, a circular object detection unit 215 that detects circular objects having a circularity equal to or greater than a predetermined value from the image from which the range of brightness values representing the flower spike has been extracted, and a circular object group search unit 216 that searches for a group of circular objects that exist within a predetermined range from the center of one of the detected circular objects.
[0071] In addition, detection method S2 includes a step of detecting a circular object having a circularity equal to or greater than a predetermined value from an image extracted from a range of brightness values representing a flower spike, and a step of searching for a group of circular objects existing within a predetermined range from the center of one detected circular object, and estimating the group of circular objects existing within the predetermined range as one flower spike region.
[0072] Therefore, the detection device 20 according to this embodiment has the advantage that, in an image in which a range of brightness values representing a flower spike has been extracted, a group of circular objects existing within a predetermined range can be estimated as a single flower spike region.
[0073] [Software implementation example] The functions of the detection devices 10 and 20 (hereinafter referred to as "devices") can be realized by a program that causes a computer to function as the devices, and a program that causes a computer to function as each control block of the devices (particularly each part included in the control units 110 and 210).
[0074] In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program, thereby realizing the functions described in each of the above embodiments.
[0075] The program may be non-transitory and may be recorded on one or more computer-readable recording media. The recording media may or may not be included in the device. In the latter case, the program may be supplied to the device via any wired or wireless transmission medium.
[0076] Furthermore, some or all of the functions of the control blocks can be realized by logic circuits. For example, an integrated circuit in which a logic circuit that functions as each of the control blocks is formed is also included in the scope of the present invention. In addition, the functions of the control blocks can also be realized by, for example, a quantum computer.
[0077] 〔summary〕 A detection method according to aspect 1 of the present invention is a method for detecting the inflorescence of a plant from an image, and includes a smoothing process for smoothing an image of a plant body including an inflorescence obtained using an imaging device, a process for generating a difference image between the image and the image after the smoothing process, a process for grayscaling the difference image, and a process for extracting a range of brightness values representing the inflorescence from a histogram of brightness values of the grayscaled difference image.
[0078] With the above configuration, even if the color of the flower spike is similar to the surrounding color of the leaves and branches, the flower spike of the plant can be detected from the image with higher accuracy than with conventional techniques.
[0079] A detection method according to a second aspect of the present invention is the method of the first aspect, further comprising the step of linearly extending the grayscaled difference image.
[0080] With the above configuration, the entire image becomes brighter, making it easier to extract the flower spikes.
[0081] A third aspect of the present invention relates to a detection method in accordance with the first or second aspect, wherein the smoothing step is a step of processing the image with a median filter.
[0082] The above configuration makes it possible to maintain the outline and eliminate the specks of the flower spikes, such as black and white pepper noise.
[0083] A detection method according to aspect 4 of the present invention, in any of aspects 1 to 3, further includes the steps of detecting a circular object having a circularity equal to or greater than a predetermined value from an image extracted from a range of brightness values representing the flower spike, and searching for a group of circular objects existing within a predetermined range from the center of one of the detected circular objects, and estimating the group of circular objects existing within the predetermined range as one flower spike region.
[0084] With the above configuration, in an image in which a range of brightness values indicating a flower spike has been extracted, a group of circular objects existing within a predetermined range can be estimated as one flower spike region.
[0085] A detection method according to aspect 5 of the present invention is the same as that of aspect 4, in which a circular object having a circularity greater than or equal to the predetermined value is detected by performing a Hough transform on an image obtained by extracting a range of brightness values representing the flower spike.
[0086] With the above configuration, it is possible to detect a circular object having a circularity equal to or greater than a predetermined value.
[0087] A detection method according to aspect 6 of the present invention is, in aspect 4 or 5, a step of searching for the group of circular objects, wherein the step of searching for one of the circular objects arbitrarily selected is a step of searching as a first circular object, and sequentially searching for circular objects present within the predetermined range from the center of the first circular object according to the following procedure, repeating the following steps: a preliminary search step of extracting the circular object closest to the first circular object as a second circular object and searching for the second circular object; an extraction step of extracting an unsearched circular object closest to the center of gravity of the centers of the first to i-th circular objects as the (i+1)th circular object, where i is a natural number greater than or equal to 2; and a determination step of determining that the (i+1)th circular object is a circular object included in the same group of circular objects as the group of searched circular objects, and determining the (i+1)th circular object as searched, if the center of gravity of the centers of the circular objects from the first to i+1th circular object is within a predetermined determination circle.
[0088] With the above configuration, it is possible to search for circular objects that constitute a group of circular objects that are estimated to be one flower spike region within a predetermined range.
[0089] In a detection method according to aspect 7 of the present invention, in aspect 6, the radius of the predetermined judgment circle is expressed by the following formula, where i is a natural number greater than or equal to 2, the first circular object to the i-th circular object are considered to be included in the same group of circular objects and have been searched, the center coordinates of the i-th circular object are (Xi, Yi), and the center of gravity coordinates of the centers of the first circular object to the i-th circular object are (Xm, Ym).
[0090]
number
[0091] With the above configuration, it is possible to determine whether or not the circular object to be determined constitutes a group of circular objects that are estimated to be one flower spike region.
[0092] A detection method according to an eighth aspect of the present invention is the same as that of the sixth or seventh aspect, wherein the predetermined range is a circular range having a radius that is 5 to 20 times the radius of the circle of the first circular object.
[0093] With the above configuration, it is possible to set a search range for a group of circular objects that are estimated to be one spike region.
[0094] A detection device according to aspect 9 of the present invention is a detection device for detecting the inflorescence of a plant from an image, and includes a smoothing processing unit that smooths an image of a plant body including the inflorescence obtained using an imaging device, a difference image generation unit that generates a difference image between the image and the image after the smoothing processing, a grayscaling processing unit that grayscales the difference image, and a brightness value range extraction unit that extracts a range of brightness values representing the inflorescence from a histogram of brightness values of the grayscaled difference image.
[0095] The above configuration provides the same effects as in the first aspect.
[0096] A program according to aspect 10 of the present invention causes a computer to perform the following processes: smoothing an image of a plant body including a flower spike obtained using an imaging device; generating a difference image between the image and the image after the smoothing process; grayscaling the difference image; and extracting a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image.
[0097] The above configuration provides the same effects as in the first aspect.
[0098] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention. [Explanation of symbols]
[0099] 10, 20...Detection device 110, 210... Control unit 111, 211... Smoothing processing unit 112, 212...Difference image generation section 113, 213···Grayscale processing unit 114, 214... Brightness value range extraction unit 215 Circular object detection unit 216···Circular object group search section 120, 220...Input / output section 130, 230...Storage section
Claims
1. A method for detecting plant spikes from an image, comprising: a smoothing step of smoothing an image of a plant body including a spike acquired using an imaging device; generating a difference image between the image and the image after the smoothing process; grayscaling the difference image; extracting a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image; A method comprising:
2. further comprising the step of linearly stretching the grayscaled difference image. The method of claim 1.
3. The smoothing step is a step of processing the image with a median filter. The method of claim 1.
4. detecting a circular object having a circularity equal to or greater than a predetermined value from the image obtained by extracting the range of brightness values representing the flower spike; and searching for a group of circular objects that exist within a predetermined range from the center of one of the detected circular objects, The group of circular objects present within the predetermined range is estimated as one flower spike region.
4. The method according to any one of claims 1 to 3.
5. a Hough transform is performed on the image obtained by extracting the range of brightness values representing the flower spike, thereby detecting a circular object having a circularity equal to or greater than the predetermined value; The method of claim 4.
6. The step of searching for a group of circular objects includes: One of the circular objects selected arbitrarily is considered to have been searched as a first circular object; A step of sequentially searching for circular objects present within the predetermined range from the center of the first circular object according to the following procedure: a preliminary search step of extracting the circular object located closest to the first circular object as a second circular object and determining that the second circular object has been searched; an extraction step of extracting an unsearched circular object that is closest to the center of gravity of the centers of the first to i-th circular objects as the i+1-th circular object, where i is a natural number equal to or greater than 2; a determining step of determining that the i+1th circular object is a circular object included in the same circular object group as the already-searched circular object group when the centers of gravity of the centers of the circular objects from the first circular object to the (i+1)th circular object are within a predetermined determination circle, and determining that the i+1th circular object has been searched; This is a process of repeating the steps: The method of claim 4.
7. The radius of the predetermined test circle is where i is a natural number equal to or greater than 2, and the first circular object to the i-th circular object are considered to be included in the same circular object group and have been searched, When the center coordinates of the i-th circular object are (Xi, Yi) and the center of gravity coordinates of the centers of the first to i-th circular objects are (Xm, Ym), The method according to claim 6, wherein the formula is: [Equation 1]
8. the predetermined range is a range of a circle having a radius that is 5 to 20 times the radius of the circle of the first circular object; The method of claim 6.
9. A detection device for detecting plant spikes from an image, a smoothing processing unit that smoothes an image of a plant body including a spike acquired using an imaging device; a differential image generating unit that generates a differential image between the image and the image after the smoothing process; a grayscale conversion processing unit that converts the difference image into a grayscale image; a brightness value range extraction unit that extracts a brightness value range representing the flower spike from a brightness value histogram of the grayscaled difference image; A detection device comprising:
10. On the computer, smoothing an image of the plant body including the flower spike, which is acquired using an imaging device; generating a difference image between the image and the image after the smoothing process; gray-scaling the difference image; A process of extracting a range of brightness values representing the flower spike from a histogram of brightness values of the grayscaled difference image; A program to execute.
Citation Information
Patent Citations
Information processing device, program, system, and information processing method
JP7049636B1
JPP7049636B
JPP7479007B