Detection method, detection device, and program

The method and device enhance flower spike detection by smoothing, generating difference images, and extracting brightness ranges, effectively distinguishing spikes from surrounding foliage, and identifying circular objects, thereby improving detection accuracy.

JP2024116009AActive Publication Date: 2024-08-27NAT AGRI & FOOD RES ORG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023021979
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-15
Publication Date
2024-08-27
Estimated Expiration
2043-02-15

AI Technical Summary

Technical Problem

Conventional object detection models struggle to accurately detect flower spikes in images when their color is similar to surrounding areas like leaves and branches.

Method used

A method and device that smooths an image using a median filter, generates a difference image, converts it to grayscale, and extracts a brightness value range from a histogram to enhance flower spike detection, and optionally uses Hough transform to identify circular objects.

Benefits of technology

Accurately detects flower spikes even when their color is similar to surrounding colors, improving detection precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024116009000001_ABST
    Figure 2024116009000001_ABST
Patent Text Reader

Abstract

To provide a detection method, detection device, and program capable of detecting more precisely plant flower spike from images than conventional techniques even when the color of the flower spike is similar to the surrounding color of the leaves, branches and the like.SOLUTION: A detection device (10) includes: a smoothing processing unit (111) that smooths images of a plant body including flower spikes acquired using an imaging device; a difference image generating unit (112) that generates a difference image between the image and the image after the smoothing process; a gray-scale conversion processing unit (113) that converts the difference image into a gray-scale; and a brightness value range extraction unit (114) that extracts the brightness value range showing the flower spike from the brightness value histogram of the gray-scaled difference image.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

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 detect flower spikes with high accuracy if the color of the flower spike is similar to the color of the surrounding areas such as leaves and branches.

[0005] An aspect of the present invention aims to detect the inflorescence of a plant from an image with higher accuracy than conventional techniques, even if the color of the inflorescence is similar to the color of the surrounding area such as leaves and branches. [Means for solving the problem]

[0006] In order to solve the above problems, a detection method according to one embodiment of the present invention is a method for detecting a plant inflorescence 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 an image after the smoothing process, a process for grayscaling the difference image, and a process for extracting a range of brightness values ​​indicating the inflorescence from a histogram of brightness values ​​of the grayscaled difference image.

[0007] In order to solve the above problems, a detection device according to one embodiment of the present invention is a detection device that detects the inflorescence of a plant from an image, and includes a smoothing processing unit that smoothes 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 an 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 ​​indicating the inflorescence from a histogram of brightness values ​​of the grayscaled difference image.

[0008] In order to solve the above problem, a program according to one embodiment 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 an 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. Effect of the Invention

[0009] According to one aspect of the present invention, it is possible to detect the flower spike 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 description 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. [Diagram 2] FIG. 2 is a flow chart showing the flow of a detection method according to the first embodiment of the present invention. [Diagram 3] 1 is an example of an image before smoothing processing. [Figure 4] 1 is an example of an image after applying a median filter. [Diagram 5] This is the image after linear decompression of the grayscaled difference image. [Figure 6] FIG. 1 illustrates the effect of linear elongation. [Figure 7] 13 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. 5 is a block diagram showing a 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 inflorescence. [Figure 12] FIG. 13 is a diagram showing a search range for a circular object. [Figure 13] This is a diagram showing the judgment circle using circles 1 and 2. [Figure 14] FIG. 13 is a diagram showing an example of judgment of circle 3 using a judgment circle. [Figure 15] FIG. 13 is a diagram showing an example of judgment of circle 4 using a judgment circle. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] [Embodiment 1] An embodiment of the present invention will be described in detail below. This embodiment is a basic form of the embodiment described later. In recent years, with the decline in the agricultural population, mechanization is also desired in fruit tree cultivation. For example, in grape cultivation, many tasks are required before harvest, such as flower spike shaping, gibberellin treatment, fruit thinning, and bagging. The time to perform such tasks is decided by an operator who goes around the field and visually checks. However, when the cultivation scale becomes large, it is difficult for an operator to decide the time of work by visual inspection. Therefore, a device that can estimate the growth status of fruit trees from a captured image and determine the time of work is desired. For this purpose, a technology that can accurately detect the flower spikes of fruit trees from an image is required. However, for example, the flower spikes of grapes have a complex structure, and the shape and color change depending on the season, and the color of the flower spikes is close to the surrounding leaves and branches, so that it is currently difficult to accurately detect the flower spikes from an image. The detection device 10 according to this embodiment is a device for accurately detecting such flower spikes from an image.

[0012] (Overview of detection device 10) The outline of the detection device 10 according to the present embodiment will be described. The detection device 10 is a detection device that detects the flower spike of a plant from an image. Generally, the term "flower spike" refers to a collection of multiple flowers, but in this embodiment, for convenience, it refers to one flower. That is, in this embodiment, the flower spike refers to a part that corresponds to one flower or fruit among a large number of flowers densely attached to one axis and appearing as a spike. For example, in the case of grapes, the flower spike refers to a part that corresponds to one flower or fruit. In this embodiment, the range in which a group of multiple flowers is gathered is called a "flower spike area," and the detection method thereof will be described later. In this embodiment, as an example, a case in which the flower spike of grapes is detected from an image including the flower spike will be described. 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 comprehensively controls each unit 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 process. Hereinafter, the image before the smoothing process is also 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 process, for example, the original image may be processed by a median filter.

[0016] A median filter is a process that converts the brightness values ​​in a range of interest in an image to the median value. Its features include the ability to maintain contours and correct black and white pepper noise. For example, grape spikes may have points that resemble black and white pepper noise, in which case a median filter may be used. In the image after processing with a median filter, the grape spikes blend into the background.

[0017] For example, the smoothing processing unit 111 may process the entire image with a median filter, with each side being a square area twice the width of the flower spike in the image as a unit. For example, when the width of the flower spike in the image is 15 pixels square, the smoothing processing unit 111 may process the entire image with a median filter, with each area being 30 pixels square as a unit. For example, the smoothing processing unit 111 may process the entire image with a median filter, with each area being 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 Fig. 6 and Fig. 7. Fig. 6 is a diagram showing the effect of linear extension. Brightening an image by linear processing (linear extension) is equivalent to shifting a graph showing the relationship between the amount of light received by the sensor and the brightness of the image data upward as a whole. Thus, dark areas on an image can be brightened as a whole by linear extension.

[0021] Figure 7 shows histograms of the entire image before and after linear expansion. The horizontal axis of the histogram is the luminance value, and the vertical axis is the frequency. Since the image before linear expansion is a difference image, the luminance value of the histogram can be negative.

[0022] For example, in the histogram of the difference image before linear expansion, the minimum brightness value is 0 and the maximum brightness value is 200, as shown in the upper part of Fig. 7. In this case, all parts of the image with negative brightness values ​​will be black, just like parts with a minimum brightness value of 0, making it difficult to determine where the flower spikes are present. For example, if linear expansion is performed so that the minimum brightness value is -100 and the maximum brightness value is 100, as shown in the lower part of Fig. 7, the entire difference image will become brighter, making it easier to extract the flower spikes.

[0023] The luminance value range extraction unit 114 extracts a luminance value range that indicates the flower spike from a luminance value histogram of the grayscaled difference image.

[0024] For example, when the brightness value range representing the flower spike is 20 to 80, and the brightness value range representing the leaf veins and leaf structure is 20 or less, the flower spike portion in the image can be extracted by extracting brightness values ​​of 20 or more. In this way, by extracting a brightness value range that includes and is wider than the brightness value range representing the flower spike, it is possible to eliminate extraction omissions. The numerical values ​​of the brightness value range can be changed by a grayscale technique.

[0025] 8 is an example of a diagram in which a portion of a histogram having a brightness value of 20 or more is extracted from an image. For example, in a plant body to be extracted, the color of the flower spike may be the same color (greenish color) as the surrounding colors such as the leaves and branches.

[0026] The input / output unit 120 acquires and outputs various data used by the control unit 110. For example, the input / output unit 120 acquires an image of a plant body including a spike, which is acquired using an imaging device and which is referred to by the smoothing processing unit 111. The input / output unit 120 also outputs the processing result by the control unit 110 (for example, data obtained by extracting a range of brightness values ​​indicating the spike).

[0027] The storage unit 130 stores various data used by the control unit 110. For example, the storage unit 130 stores image data of a plant body including a spike acquired using an imaging device, and data obtained by extracting a range of brightness values ​​indicating the spike.

[0028] (Flow of detection method S1) The flow of the method for detecting the inflorescence of a plant from an image will now be described. Fig. 2 is a flow diagram showing the flow of detection method S1, which is a method for detecting the inflorescence of a plant from an image.

[0029] (Step S11) In step S11, the smoothing processing unit 111 performs smoothing processing on the image of the plant body including the flower spike captured by the imaging device. In the smoothing processing, for example, the original image may be processed by 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 luminance value range extraction section 114 extracts a luminance value range indicating the flower spike from a luminance value histogram of the grayscaled difference image.

[0034] (Effects of the detection device 10 and the detection method S1) In this way, the detection device 10 of this embodiment is a detection device that detects the inflorescence of a plant from an image, and is configured to include a smoothing processing unit 111 that smoothes an image of a plant body including the inflorescence 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 ​​indicating the inflorescence from a histogram of brightness values ​​of the grayscaled difference image.

[0035] In addition, detection method S1 is a method for detecting the inflorescence of a plant from an image, and includes a smoothing step S11 of smoothing an image of a plant body including the inflorescence 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 ​​indicating the inflorescence from a histogram of brightness values ​​of the grayscaled difference image.

[0036] Therefore, according to the detection device 10 and detection method S1 of this embodiment, it is possible to detect the inflorescence of a plant from an image with greater accuracy than conventional technology, even if the color of the inflorescence is similar to the surrounding colors such as leaves and branches.

[0037] [Embodiment 2] Other embodiments of the present invention will be described below. For ease of explanation, the same reference numerals are given to members having the same functions as those described in the above embodiment, and the description thereof will not be repeated.

[0038] (Overview 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 the flower spikes of a plant from an image. In this embodiment, as an example, a case where grape flower spikes are detected from an image including 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 a variety other than grape, for example.

[0039] (Configuration of 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 generating unit 212, a grayscale processing unit 213, a brightness value range extracting unit 214, a circular object detecting unit 215, and a circular object group searching unit 216. Note that the circular object detecting 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 explanation will be omitted.

[0042] The image from which the range of brightness values ​​indicating the flower spike is extracted also contains objects other than the flower spike. Therefore, it is necessary to detect only the flower spike from the image. The flower spike has a characteristic that its shape is close to a circle. Therefore, the flower spike can be extracted by detecting a circular object. The circular object detection unit 215 detects a circular object having a circularity equal to or greater than a predetermined value from the image from which the range of brightness values ​​indicating the flower spike is extracted. Specifically, the circular object detection unit 215 may detect a circular object having a circularity equal to or greater than a predetermined value by, for example, applying a Hough transform to the image from which the range of brightness values ​​indicating the flower spike is extracted. The Hough transform is one method of detecting the circularity of an object. It should be noted that the Hough transform is a well-known technique. In the Hough transform, a value of circularity is determined in advance, and a circular object having a circularity equal to or greater than the value can be detected. This makes it possible to detect an object that is considered to be a flower spike.

[0043] The circular object group search unit 216 searches for a flower spike region under the assumption that all the circular objects detected by the circular object detection unit 215 are flower spikes. Specifically, the circular object group search unit 216 searches for a circular object group that exists 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 circular object group will be described later. Based on the search result, the circular object group search unit 216 estimates the circular object group that exists within the predetermined range as one flower spike region. In this embodiment, the flower spike region is a region that includes a group of flower spikes on an image. For example, in the case of grapes, a region in which a group of multiple flowers is gathered is called a flower spike region, regardless of whether the flowers are shaped or not.

[0044] The input / output unit 220 acquires and outputs various data used by the control unit 210. For example, the input / output unit 220 acquires an image of a plant body including a spike, acquired using an imaging device, and referenced by the smoothing processing unit 211. The input / output unit 220 also outputs the processing result by the control unit 210 (for example, data obtained by extracting a range of brightness values ​​indicating the spike).

[0045] The storage unit 230 stores various data used by the control unit 210. For example, the storage unit 230 stores image data of a plant body including a spike acquired using an imaging device, and data obtained by extracting a range of brightness values ​​indicating the spike.

[0046] (Flow of detection method S2) The flow of a method for searching for a group of circular objects estimated as one flower spike region from an image in which a range of brightness values ​​indicating a flower spike is extracted will be described. 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 as one flower spike region from an image in which a range of brightness values ​​indicating a flower spike is 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 a circular object 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 is extracted. For example, a circular object having a circularity equal to or greater than a predetermined value may be detected by performing a Hough transform on an image in which a range of brightness values ​​representing a flower spike is extracted. FIG. 11 is an imaginary diagram of the classification of the flower spike. In step S21, a plurality of circular objects are detected as shown on the right side of FIG. 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 the 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 in steps S23 and after is set with the first circular object found in step S22 as the center. A predetermined range, for example, is set as the search range. After that, 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 process of the detection method S2 ends. If an unsearched circular object exists within the predetermined range (step S23: YES), the process proceeds to step S24.

[0053] Fig. 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. At this time, circles 2, 3, and 4 are within the range of Q, and become 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 located 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 process of the detection method S2 ends. If an unsearched circular object exists within the predetermined range, the process proceeds to step S25.

[0056] (Step S26) In step S26, the circular object group search unit 216 sets a judgment circle of 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 or not the circular object to be searched 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, the center coordinates of the i-th circular object are (Xi, Yi), and the center of gravity coordinates of the centers of the circular objects from the first circular object to the i-th circular object are (Xm, Ym).

[0058]

number

[0059] The above formula is a formula for determining whether or not the circle (i+1) is included in the same group of circular objects as the group of circular objects up to the circle i. A similar circle refers to a circular object that has already been searched.

[0060] Fig. 13 is a diagram showing a judgment circle based on circles 1 and 2, that is, judgment circle P2 for judging 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 judgment circle based on circles 1 and 2 is circle P2 centered on M.

[0061] (Step S27) In step S27, the circular object group search unit 216 extracts the closest unsearched circular object to the center of the determination circle, which corresponds to the center of gravity of the centers of the first circular object to the i-th circular object, as the (i+1)th circular object.

[0062] The processes in steps S27 to 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 center of gravity of the (i+1) circular objects is not within the judgment circle (step S28: NO), the process of detection method S2 ends. If the center of gravity of the (i+1) circular objects is within the judgment circle (step S28: YES), the process 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. After that, the process proceeds to step S25.

[0066] 14 is a diagram showing an example of the determination of circle 3, which is a third circular object, by the determination circle when i=2. First, an 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 set 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 circular object group as circles 1 and 2.

[0067] After the judgment, a judgment circle P3 is set with M3 as the center. As shown in Fig. 14, the center of the circle 3 is I(Xi, Yi) and the radius of the circle 3 is Ri. In this case, the radius of the judgment circle P3 is Ri+S.

[0068] Fig. 15 is a diagram showing an example of the determination of a fourth circular object, circle 4, by a determination circle when i = 3. First, an 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 set as M4. Also, the center of circle 4 is set as C4. In the case of Fig. 15, since M4 is outside the determination circle P3, it is determined that circle 4 is not included in the same circular object group 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 spike region.

[0070] (Effects of the detection device 20 and the detection method S2) Thus, the detection device 20 of this embodiment is equipped with a smoothing processing unit 211 that smoothes 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 brightness value range indicating the flower spike from a brightness value histogram 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 brightness value range indicating the flower spike has been extracted, and a circular object group search unit 216 that searches for a group of circular objects existing 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 in which a range of brightness values ​​indicating a flower spike has been extracted, 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 of being able to estimate a group of circular objects present within a predetermined range in an image in which a range of brightness values ​​indicating a spike has been extracted, as a single spike region.

[0073] [Software implementation example] The functions of detection devices 10 and 20 (hereinafter referred to as the "devices") can be realized by a program for causing a computer to function as the device, and a program for causing a computer to function as each control block of the device (particularly each part included in 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 to realize each function described in each of the above embodiments.

[0075] The program may be non-transitory and may be recorded in 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 provided to the device via any wired or wireless transmission medium.

[0076] In addition, some or all of the functions of each of the control blocks can be realized by a logic circuit. 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 each of the control blocks can 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 the inflorescence obtained using an imaging device, a process for generating a difference image between the image and an 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 colors such as leaves and branches, the flower spike of the plant can be detected from the image with higher accuracy than with conventional techniques.

[0079] The detection method according to aspect 2 of the present invention is the method according to aspect 1, further comprising a step of linearly expanding 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 according to the first or second aspect, in which the smoothing step is a step of processing the image with a median filter.

[0082] The above configuration makes it possible to maintain the contours and eliminate the speckles of the flower spike, such as black and white pepper noise.

[0083] A detection method according to aspect 4 of the present invention, in any one 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 obtained by extracting a range of brightness values ​​representing the inflorescence, 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 inflorescence region.

[0084] With the above configuration, in an image in which a range of brightness values ​​indicating a spike is extracted, a group of circular objects existing within a predetermined range can be estimated as one 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 Hough transform is performed on an image obtained by extracting a range of brightness values ​​representing the inflorescence, thereby detecting a circular object having a circularity equal to or greater than the predetermined value.

[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 a sixth aspect of the present invention is, in the fourth or fifth aspect, a step of searching the group of circular objects, which comprises: determining that one of the circular objects selected arbitrarily has been searched as a first circular object; and sequentially searching for circular objects existing within the predetermined range from the center of the first circular object in accordance with the following procedure, wherein the step of repeating a preliminary search step of extracting the circular object 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 closest to the center of gravity of the centers of the first to i-th circular objects as the i+1th circular object, where i is a natural number greater than or equal to 2; and a determination step of determining that the i+1th circular object is a circular object included in the same circular object group as the searched circular object group and determining that the i+1st circular object has been searched, if the center of gravity of the centers of the circular objects from the first to i+1th circular objects is within a predetermined determination circle.

[0088] With the above configuration, it is possible to search for circular objects constituting a group of circular objects estimated to be one spike region within a predetermined range.

[0089] In the 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 circular object group and have been searched, the central coordinates of the i-th circular object are (Xi, Yi), and the centroid coordinates of the centers of the circular objects from 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 estimated to be one spike region.

[0092] A detection method according to an eighth aspect of the present invention is any one of the sixth and seventh aspects, in which 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 estimated to be one spike region.

[0094] A detection device according to a ninth aspect 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 smoothes 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 an 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 ​​indicating 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 spike obtained using an imaging device; generating a difference image between the image and an image after the smoothing process; grayscaling the difference image; and extracting a range of brightness values ​​representing the 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...Differential image generating unit 113, 213... Grayscale processing unit 114, 214: Luminance value range extraction unit 215 Circular object detection unit 216 Circular object group search unit 120, 220...Input / output section 130, 230...Storage section

Claims

1. 1. A method for detecting plant inflorescences 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 spike from a histogram of brightness values ​​of the grayscaled difference image; The method includes:

2. linearly stretching the greyscaled 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 an image obtained by extracting a range of brightness values ​​representing the flower spike; and searching for a group of circular objects existing within a predetermined range from a 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 according to claim 4.

6. The step of searching for a group of circular objects includes: One of the circular objects selected arbitrarily is searched as a first circular object; A step of sequentially searching for circular objects existing 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 for; an extraction step of extracting an unsearched circular object closest to a 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 determination step of determining that the i+1th circular object is a circular object included in the same circular object group as a searched circular object group when the centers of gravity of the centers of the first circular object to the i+1th circular object are within a range of 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 according to claim 4.

7. The radius of the predetermined judgment 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 for, If the center coordinates of the i-th circular object are (Xi, Yi) and the center of gravity coordinates of the centers of the circular objects from the first circular object to the i-th circular object are (Xm, Ym), The method according to claim 6, wherein the formula is: [0010]

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 according to claim 6.

9. A detection device for detecting plant spikes from an image, comprising: a smoothing processing unit that smoothes an image of a plant body including a spike acquired using an imaging device; a difference image generating unit for generating a difference 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 luminance value range extraction unit that extracts a luminance value range representing the spike from a luminance value histogram of the grayscaled difference image; A detection device comprising:

10. On the computer, A process 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; A process of grayscaling 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 for executing the above.

Citation Information

Patent Citations

  • Information processing device, program, system, and information processing method

    JP7049636B1

  • Information processing device, program, system, and method for detecting grapes from an image

    JP7479007B2