Roasting degree evaluation method, roasting manufacturing method, roasting degree evaluation program, roasting degree evaluation apparatus, and roasting degree evaluation system
By extracting the bean region from coffee bean images based on histogram valleys and calculating the L value, the method addresses the accuracy issues in roasting degree evaluation, improving precision in assessing coffee bean roasting.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2026-04-02
AI Technical Summary
Existing roasting degree evaluation methods for coffee beans face accuracy issues when the bean region and background region are unclear, leading to deteriorated evaluation precision.
The method involves extracting the bean region from an original or binarized image based on the appearance of valleys in R, G, and B histograms during roasting, calculating the L value of the bean region, and using a roasting degree evaluation device with components like a histogram generation unit, valley determination unit, bean region extraction unit, and L-value calculation unit to enhance accuracy.
This approach improves the accuracy of evaluating the roasting degree of coffee beans by providing clearer distinctions between the bean and background regions, thereby enhancing the precision of roasting degree assessment.
Smart Images

Figure 2026056784000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a roasting degree evaluation method, a roasting manufacturing method, a roasting degree evaluation program, a roasting degree evaluation device, and a roasting degree evaluation system.
Background Art
[0002] Roasting is a process of heating green coffee beans obtained by purifying coffee fruits, and the coffee beans expand while changing color during roasting. At this time, the chemical components contained in the green coffee beans undergo chemical reactions such as dehydration reaction, hydrolysis, oxidation-reduction reaction, etc., and the unique taste and aroma of coffee are generated.
[0003] The roasting degree is judged by a roaster, who is an expert in coffee roasting, in real time from the color and smell during roasting. However, due to the recent declining birthrate and aging population, there are concerns about a shortage of roasters and successors, and it is expected to be difficult to maintain the quality of coffee products in the future.
[0004] Patent Document 1 discloses a roasting degree evaluation method that photographs the scene inside the chamber of a bean roasting device, compares the image with a series of roasting history patterns, and evaluates the roasting degree indicated by the image. Thereby, the roasting degree of coffee beans can be automatically evaluated.
Prior Art Documents
Patent Documents
[0005]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0006] However, in the above roasting degree evaluation method, when evaluating the roasting degree of coffee beans with an image in which the bean region and the background region are unclear, the evaluation accuracy of the roasting degree of coffee beans may deteriorate.
[0007] The purpose of this disclosure is to provide a roasting degree evaluation method, a roasting method, a roasting degree evaluation program, a roasting degree evaluation device, and a roasting degree evaluation system that can improve the accuracy of evaluating the roasting degree of coffee beans. [Means for solving the problem]
[0008] The roasting degree evaluation method of the present disclosure evaluates the roasting degree of coffee beans by extracting a bean region from the original image or its binarized image associated with the histogram at the timing when a dip appears in at least one of the R, G, and B histograms of the captured image during the coffee bean roasting process, and calculating the L value of the bean region in the captured image or an L value obtained by processing the captured image.
[0009] The roasting degree evaluation apparatus of the present disclosure comprises: a histogram generation unit that generates at least one histogram among R, G, and B histograms in an image of coffee beans being roasted; a valley determination unit that determines whether it is the timing for a valley to appear in the histogram; a bean region extraction unit that, when the valley determination unit determines that it is the timing for a valley to appear, extracts a bean region from the original image or a binarized image thereof associated with the histogram for which the determination was made; an L-value calculation unit that calculates an L-value calculation image obtained by processing the image or the L-value of the bean region in the image; and a roasting degree evaluation unit that evaluates the roasting degree of the coffee beans from the L-value. [Brief explanation of the drawing]
[0010] [Figure 1] Figure 1 is a schematic diagram showing a roasting degree evaluation system according to one embodiment. [Figure 2] Figure 2 is a schematic diagram showing the roasting apparatus in the same embodiment. [Figure 3] Figure 3 illustrates the R, G, and B histograms in images of coffee beans in the early stages of roasting. [Figure 4] Figure 4 illustrates the R, G, and B histograms in images of coffee beans during the mid-roasting stage. [Figure 5] Figure 5 illustrates the R, G, and B histograms in images of coffee beans in the later stages of roasting. [Figure 6] Figure 6 is a flowchart showing a roasting degree evaluation method according to one embodiment. [Figure 7] Figure 7 is a diagram illustrating the background removal process for captured images. [Figure 8] Figure 8 is a schematic diagram showing the imaging environment in Example 1. [Figure 9] Figure 9 shows an image of coffee beans in Example 1. [Figure 10] Figure 10 shows the captured image before background removal processing in Example 2. [Figure 11] Figure 11 shows images obtained by applying the Rolling Ball method in Example 2. [Figure 12] Figure 12 shows the captured image after background removal processing in Example 2. [Figure 13] Figure 13 shows the results of calculating the L value of coffee beans in Example 3. [Figure 14] Figure 14 is a selected image of the bean region from the image acquired 30 seconds after the start of roasting in Example 3. [Figure 15] Figure 15 shows the L-value calculation results after excluding plots in Figure 13 where the proportion of the bean region was 20% or less. [Modes for carrying out the invention]
[0011] (Roast level evaluation system) The roasting degree evaluation system according to one embodiment will be described below with reference to Figures 1 to 5. Figure 1 is a schematic diagram showing the roasting degree evaluation system, and Figure 2 is a schematic diagram showing the roasting apparatus.
[0012] As shown in FIG. 1, the roasting degree evaluation system includes a roasting degree evaluation device 100, a roasting device 200, an imaging unit 300, and a lighting device 600. The roasting degree evaluation device 100 evaluates the roasting degree of the coffee beans Cb, for example, from an imaging image (or an L-value calculation image described later) of the coffee beans Cb being roasted by the roasting device 200 captured by the imaging unit 300.
[0013] As shown in FIG. 2, the roasting device 200 includes, for example, a roasting container 201 having a substantially rectangular parallelepiped shape with an observation window 202, a stirring blade 203 for stirring the coffee beans Cb in the roasting container 201, and a duct 204 for sending low-speed hot air into the roasting container 201. According to the roasting device 200 of this example, while sending low-speed hot air into the roasting container 201 from the duct 204, the coffee beans Cb can be roasted by stirring them with the stirring blade 203 rotating in the direction of the arrow in FIG. 2. As a result, it becomes possible to uniformly roast a large amount of coffee beans Cb in a short time.
[0014] As shown in FIG. 1, the imaging unit 300 is, for example, a color camera and captures the coffee beans Cb being roasted through the observation window 202. The imaging unit 300 is installed on a camera slider 500 fixed to a tripod 400. Thereby, the imaging unit 300 can be easily moved in the front-rear direction.
[0015] When the imaging unit 300 is a camera, the shutter speed, F-value, and ISO sensitivity are appropriately set according to the shooting environment and shooting conditions. The shutter speed refers to the time during which the camera's shutter is open. A fast shutter speed is suitable for stopping the movement of the subject (the coffee beans Cb being roasted) because the time for the sensor to receive light is short. On the other hand, a slow shutter speed is suitable for blurring the movement of the subject (the coffee beans Cb being roasted). The F-value refers to the aperture size of the camera lens. When the F-value is small, the aperture is wide open and a large amount of light reaches the sensor. On the other hand, when the F-value is large, the aperture becomes small and the amount of light decreases. The ISO sensitivity refers to the sensitivity of the camera's sensor to light. The higher the ISO sensitivity, the higher the sensitivity of the sensor, and the lower the ISO sensitivity, the lower the sensitivity.
[0016] Above the imaging means 300, a lighting device 600 such as an LED light is provided. The lighting device 600 is fixed to the tripod 400 by a support arm 601. The lighting device 600 is preferably installed at a position where the reflection light hardly enters the captured image.
[0017] The captured image captured by the imaging means 300 is preferably an image focused on the coffee beans Cb being roasted deeper than the observation window 202. According to such a configuration, it is possible to blur the dirt and cloudiness adhering to the observation window 202. The color camera which is the imaging means 300 is provided with a lens 301. The lens 301 is, for example, a macro lens with a small F value and a short minimum shooting distance.
[0018] The lens 301 is preferably a lens with a shallow depth of field and easy to blur. The lens 301 can be selected, for example, by calculating the maximum blur amount based on the F value, focal length, and minimum shooting distance of the lens.
[0019] (Modified example of roasting degree evaluation system) The roasting degree evaluation system can evaluate the roasting degree of the coffee beans Cb, but is not limited thereto. For example, the roasting degree evaluation system may be able to evaluate the roasting degree of barley tea, roasted green tea, nuts, cocoa beans, etc.
[0020] The roasting degree evaluation system may include, for example, an automatic adjustment unit that automatically adjusts the imaging position and frame area so that the ratio of the bean area in the captured image becomes large (for example, the ratio of the bean area exceeds 20%).
[0021] The imaging means 300 may include, for example, an image processing unit that analyzes the captured image and cuts out a bean area of a predetermined size from the captured image. Further, the imaging means 300 may include a multi-axis actuator that analyzes the captured image and moves the focus around the bean area of the captured image. The multi-axis actuator is, for example, configured to be able to perform operations such as Z-axis rotation and vertical tilt (inclination).
[0022] (Roasting degree evaluation device) Figure 1 shows an example where the roasting degree evaluation device 100 is a general-purpose notebook computer, but it is not limited to this. The roasting degree evaluation device 100 may be a general-purpose personal computer of a different form than that shown in Figure 1, or it may be an information terminal such as a tablet or smartphone. Image processing software (for example, ImageJ) is installed on the roasting degree evaluation device 100.
[0023] The roasting degree evaluation device 100 is wired (or wireless) to the imaging means 300 via a communication cable 700, enabling real-time analysis (evaluation) of the images captured by the imaging means 300. These images can include still images, videos, or processed images.
[0024] The roasting degree evaluation device 100 comprises a histogram generation unit 1, a valley determination unit 2, a bean region cutting unit 3, an L value calculation unit 4, and a roasting degree evaluation unit 5.
[0025] The histogram generation unit 1 generates at least one histogram from the R, G, and B histograms in the captured image of coffee beans Cb during roasting. In this embodiment, the histogram generation unit 1 generates all of the R, G, and B histograms in the captured image, but is not limited to this.
[0026] The histogram generation unit 1 generates a histogram (see Figures 3 to 5) with the vertical axis representing the number of pixels in the image and the horizontal axis representing the brightness value (for example, 0 to 255, 0 to 511, 0 to 1023).
[0027] The valley determination unit 2 determines whether a valley appears in the histogram generated by the histogram generation unit 1. The timing of a valley's appearance includes the timing at which a valley in the histogram is detected by the detection unit 6 (described later), and the timing at which a valley is predicted to be detected. The timing at which a valley is predicted to be detected is, for example, the timing (time) at which a valley is estimated to occur by machine learning, based on the accumulation of coffee bean Cb roasting data as training data. In a histogram, a downward-facing convex portion is a valley, and an upward-facing convex portion is a peak.
[0028] The roasting degree evaluation device 100 preferably includes a detection unit 6 for detecting dips in the histogram. The detection unit 6 detects dips in the histogram from the histogram's approximation curve when the slope of the curve changes from positive to negative or from negative to positive, and / or detects dips in the histogram from the variance of the convex distribution in the histogram's approximation curve (e.g., Otsu's binarization).
[0029] Specifically, the detection unit 6 detects a trough in the histogram when it checks the slope of the histogram's approximation curve from the maximum value (e.g., 255) to the minimum value (0) of the brightness value, and the slope of the approximation curve changes from positive to negative, or it detects a trough in the histogram when it checks the slope of the histogram's approximation curve from the minimum value to the maximum value, and the slope of the approximation curve changes from negative to positive.
[0030] Preferably, the detection unit 6 also detects the peaks of the histogram when the slope of the histogram's approximation curve changes from negative to positive or positive to negative. Specifically, when the detection unit 6 checks the slope of the histogram's approximation curve from the maximum value to the minimum value of the brightness, it detects the peaks of the histogram when the slope of the approximation curve changes from negative to positive, or when the detection unit 6 checks the slope of the histogram's approximation curve from the minimum value to the maximum value of the brightness, it detects the peaks of the histogram when the slope of the approximation curve changes from positive to negative.
[0031] When multiple valleys are detected, the detection unit 6 preferably detects the portion of the histogram where the difference in the number of pixels between adjacent valleys and peaks is largest as the valley in that histogram. Furthermore, if the difference in the number of pixels between adjacent valleys and peaks is less than or equal to a threshold (for example, 10% of the maximum number of pixels in the histogram's brightness value), the detection unit 6 does not need to detect that histogram valley. Note that the detection unit 6 is not limited to the above, and may, for example, detect histogram valleys and peaks using image analysis or other methods.
[0032] Figure 3 illustrates the R, G, and B histograms in images of coffee beans Cb in the early stages of roasting. Figure 4 illustrates the R, G, and B histograms in images of coffee beans Cb in the mid-stage of roasting. Figure 5 illustrates the R, G, and B histograms in images of coffee beans Cb in the late-stage of roasting.
[0033] The initial roasting stage is, for example, 0% to 33% of the total roasting period; the middle roasting stage is, for example, 34% to 66% of the total roasting period; and the final roasting stage is, for example, 67% to 100% of the total roasting period. However, the initial, middle, and final roasting stages are not limited to the above and may be set appropriately depending on the type of coffee beans, the type of roasting equipment, and the final roasting temperature.
[0034] In the early stages of roasting, as shown in Figure 3, dips tend to appear only in the B histogram (see Figure 3(A)). In the middle stages of roasting, as shown in Figure 4, dips tend to appear in the G histogram. Note that in Figure 4, dips also appear in the B and R histograms, but if the difference in the number of pixels between the dips and peaks of the histograms is below a threshold, it is not necessary to detect the dips in the B and R histograms.
[0035] In the later stages of roasting, as shown in Figure 5, a dip tends to appear only in the R histogram (see Figure 5(C)). Therefore, as the roasting of coffee beans progresses, dips tend to appear in the B histogram, G histogram, and R histogram in that order. For this reason, depending on the type of coffee bean, it may be possible to determine that the roasting is complete when a dip is detected in the R histogram. Note that the order in which dips appear in the B, G, and R histograms may vary depending on the type of coffee bean, etc.
[0036] As shown in Figure 1, the bean region extraction unit 3 extracts the bean region from the original image or the binarized image (described later) associated with the histogram in which the valley determination unit 2 determined that a valley should appear. The original image is an image from which only the R component pixels, only the G component pixels, or only the B component pixels have been extracted from the captured image. The bean region is all or part of the original image (captured image) in which beans are visible. The background region is the area of the original image (captured image) other than the bean region, and may include parts in which beans are visible.
[0037] The L-value calculation unit 4 uses the bean-shaped region extracted by the bean-shaped region extraction unit 3 to calculate the L-value of the L-value calculation image obtained by processing the captured image or the L-value of the bean-shaped region in the captured image. The captured image is, for example, an RGB color image. The L-value calculation image is, for example, a grayscale image obtained by processing the captured image which is an RGB color image. Preferably, the L-value calculation unit 4 calculates the average L-value of the bean-shaped region in the L-value calculation image or the captured image.
[0038] The L value represents the brightness of a color and is expressed as a number between 0 and 100. An L value of 100 indicates the brightest state (perfect white), while an L value of 0 indicates the darkest state (perfect black).
[0039] The L value can be calculated, for example, by converting an RGB color image to an 8-bit grayscale image (Gray = (Red + Green + Blue) / 3), converting the luminance value of each pixel in the bean-shaped region to an L value, summing them up (or summing the luminance values of each pixel in the bean-shaped region and converting them to an L value), and dividing by the number of pixels. Alternatively, the L value can also be calculated by converting the luminance values of the RGB components of each pixel in the bean-shaped region of an RGB color image to L values, summing them up, and dividing by the number of pixels and the number of components (3). Furthermore, the L value may be calculated using a weighted average of the luminance values of each component. The L value can be calculated (measured), for example, using image analysis software (e.g., ImageJ).
[0040] The roasting degree evaluation unit 5 evaluates the roasting degree of coffee beans Cb from the L value calculated by the L value calculation unit 4. With this configuration, the original image (or binarized image) associated with the histogram at the timing when a valley appears has a clearer distinction between the bean region and the background region compared to the image associated with the histogram at the timing when no valley appears. Therefore, by extracting the bean region from the original image (or binarized image), the accuracy of calculating the L value of the bean region in the captured image (or L value calculation image) can be improved. This improves the accuracy of evaluating the roasting degree of coffee beans Cb.
[0041] Coffee beans (Cb) are classified into three roast levels: light roast, medium roast, and dark roast. Light roast is further subdivided into light roast (e.g., L value of 29.1 or higher) and cinnamon roast (e.g., L value of 25.6 to less than 29.1). Medium roast is further subdivided into medium roast (e.g., L value of 22.7 to less than 25.6), high roast (e.g., L value of 19.8 to less than 22.7), and city roast (e.g., L value of 16.9 to less than 19.8). Dark roast is further subdivided into full city roast (e.g., L value of 15.1 to less than 16.9), French roast (e.g., L value of 14.1 to less than 15.1), and Italian roast (e.g., L value of 14.0 or lower).
[0042] Preferably, the original image associated with the histogram is an image that has undergone background removal processing by the image processing unit 7. With this configuration, the bias in the brightness values of the original image can be reduced, improving the accuracy of the bean region extraction unit 3 for extracting the bean region from the original image and the accuracy of the histogram valley detection unit 6. This improves the accuracy of calculating the L value of the bean region in the captured image (or L value calculation image) and improves the accuracy of evaluating the roasting degree of coffee beans Cb.
[0043] The image processing unit 7 may be provided in the roasting degree evaluation device 100 or in the imaging means 300. In this embodiment, the image processing unit 7 is, but is not limited to, image processing software (for example, ImageJ) installed in the roasting degree evaluation device 100.
[0044] The background removal process is preferably performed using the rolling ball method. The rolling ball method considers a three-dimensional surface of an image with its brightness as its height, and extracts the overall trend as the background by rolling a ball of a specific size from below the surface, ignoring fine peaks. By dividing this extracted background from the captured image, the bias in brightness values can be reduced.
[0045] The image processing unit 7 preferably binarizes the original image associated with the histogram in which the valley determination unit 2 has determined that a valley appears, dividing it into two regions: a bean region and a background region. The binarization process converts brightness values above a predetermined threshold to white and brightness values below a predetermined threshold to black for each pixel. For example, the Otsu binarization method may be used for the binarization process. The Otsu binarization method is a technique that automatically determines a threshold that maximizes the separation degree, which is the ratio of the intra-class variance to the inter-class variance, in the histogram of a given image. This binarization method has the characteristic of being less affected by disturbances such as cloudiness because it determines the threshold based on the variance, which is a global property of the histogram. The bean region extraction unit 3 preferably extracts the bean region from the binarized image processed by the image processing unit 7.
[0046] As shown in Figure 1, it is preferable for the L-value calculation unit 4 to calculate the L-value when the number of pixels in the bean region cut out by the bean region cutout unit 3 (area of the bean region) exceeds 20% of the total number of pixels in the original image (total area). This suppresses variations in the L-value and improves the accuracy of evaluating the roasting degree of coffee beans Cb. It is even more preferable for the L-value calculation unit 4 to calculate the L-value when the number of pixels in the bean region exceeds 30% of the total number of pixels. The bean region cutout unit 3 may also cut out the bean region when the number of pixels in the bean region to be cut out exceeds 20% (or 30%) of the total number of pixels.
[0047] (Modified version of the roasting degree evaluation device) The roasting degree evaluation unit 5 evaluates the roasting degree of coffee beans Cb from the L value calculated by the L value calculation unit 4, but is not limited to this. For example, the roasting degree evaluation unit 5 may evaluate the roasting degree of coffee beans Cb from the Agtron value of coffee beans Cb measured with near-infrared light.
[0048] The roasting degree evaluation device 100 may include, for example, a correction unit that corrects the L value calculated by the L value calculation unit 4 based on the measured L value of the accumulated coffee bean Cb.
[0049] (Method for evaluating roast level) The roasting degree evaluation method involves, during the roasting process of coffee beans Cb, selecting the bean region from the original image or its binarized image associated with the timing at which a dip appears in at least one of the R, G, and B histograms of the captured image. The L-value of the bean region in the captured image is then calculated to obtain an L-value calculation image or to evaluate the roasting degree of the coffee beans.
[0050] A specific flowchart for the roasting degree evaluation method will be explained with reference to Figures 6 and 7. Figure 6 is a flowchart of the roasting degree evaluation method according to one embodiment. Figure 7 is a diagram illustrating the background removal process of the captured image.
[0051] As shown in Figure 6, first, an image of the coffee beans being roasted, captured by the imaging means (see Figure 7(A)), is acquired (step S101), and the acquired image is duplicated (S102). Preferably, the image is one that focuses on the coffee beans being roasted behind the observation window. The image or its duplicate is converted into an image for L-value calculation (for example, a grayscale image) (step S103).
[0052] Next, background removal processing (for example, processing using the Rolling Ball method) is performed on the captured image or a copy of it (step S104). Then, it is determined whether a trough appears in the B histogram of the captured image or a copy of it (see Figure 7(B)) after background removal processing (step S105). If it is determined that a trough appears in the B histogram, the original image associated with that B histogram is binarized to obtain a binarized image (see Figure 7(C)) (step S106).
[0053] If it is determined in step S105 that a trough does not appear in the B histogram, it is determined in step S107 whether a trough appears in the G histogram of the captured image or a copy of it. If it is determined that a trough appears in the G histogram, the original image associated with the determined G histogram is binarized to obtain a binarized image (step S108).
[0054] If it is determined in step S107 that a trough does not appear in the G histogram, it is determined in step S109 whether a trough appears in the R histogram of the captured image or a copy thereof. If it is determined that a trough appears in the R histogram, the original image associated with the R histogram is binarized to obtain a binarized image (step S110).
[0055] If it is determined in step S109 that it is not the timing for a trough to appear in the R histogram, it is determined whether there is a histogram in the preceding (previous flow) where a trough appeared (step S111). If it is determined that there is a histogram in the preceding where a trough appeared, the original image associated with that histogram is binarized and a binarized image is obtained (step S112). The determination of whether it is the timing for a trough to appear in each histogram is made by the trough determination unit 2 (see Figure 1) or by a human.
[0056] Next, the bean-shaped region is extracted from the binarized image obtained in step S106, step S108, step S110, or step S112 (step S113). Then, the average L-value of the bean-shaped region (see Figure 7(D)) in the L-value calculation image is calculated (step S114).
[0057] Subsequently, the degree of roasting of the coffee beans during roasting is evaluated based on the L value calculated in step S114. If it is determined in step S111 that there is no histogram at the time when a dip appeared immediately before, steps S113 to S115 are not performed.
[0058] (Variations of the roasting degree evaluation method) In the above embodiment, step S113 extracts the bean region from the binarized image, but is not limited to this. Step S113 may also extract the bean region from the original image associated with each histogram. In that case, steps S106, S108, S110, and S112 are optional.
[0059] In the above embodiment, step S114 calculates the L value of the bean-shaped region in the image for L value calculation, but is not limited to this. Step S114 may calculate the L value of the bean-shaped region in the captured image. In that case, step S103 can be omitted.
[0060] In the above embodiment, the timing of the appearance of a histogram trough is determined in the order of steps S105, S107, and S109 (in the order of B, G, and R), but it is not limited to this. For example, the timing of the appearance of a histogram trough may be determined in the order of steps S109, S107, and S105 (in the order of R, G, and B), or the timing of the appearance of a histogram trough may be determined in only one or two of steps S105, S107, and S109.
[0061] (Roasting and manufacturing method) The coffee bean roasting and manufacturing method involves roasting the coffee beans to a predetermined roasting level using the roasting degree evaluation method described above.
[0062] (Roast level evaluation program) A coffee bean roasting degree evaluation program is a program that uses a computer or one or more processors to implement each step of the roasting degree evaluation method described above.
[0063] (Example 1) As shown in Figure 8, a digital camera was fixed on a camera slider, a vinyl film simulating an observation window was placed 50 cm from the digital camera, and coffee beans were placed 4 cm from the vinyl film. The effect of focusing on the coffee beans behind the observation window was then investigated. Figure 8 is a schematic diagram showing the imaging environment in Example 1.
[0064] The digital camera used was an EOS Kiss X10, and the lens was a MACRO 105mm F2.8 EX DG OS HSM. Chaff was applied to the vinyl film to simulate dirt, recreating the chaff-induced staining on the observation window. Coffee beans were fixed to the board with adhesive tape, and the f-stop was set to 2.8.
[0065] First, the image was taken with the focus on the vinyl film, and then the digital camera was moved 4 cm forward to shift the focus to the coffee beans and take another picture. Figure 9 shows the images of the coffee beans taken in Example 1. The image shown in Figure 9(A) is in focus on the vinyl film, and the image shown in Figure 9(B) is in focus on the coffee beans.
[0066] The image in Figure 9(A) clearly shows the dirt adhering to the vinyl film, whereas the image in Figure 9(B) shows the dirt adhering to the vinyl film blurred, indicating that it has been removed. From the above, it was confirmed that the effect of dirt on the observation window can be suppressed by using an image captured with the coffee beans focused behind the observation window (the vinyl film in this example).
[0067] (Example 2) As shown in Figure 10, images were prepared by placing coffee beans on a black cloth and taking photographs, and the effect of background removal processing using the Rolling Ball method was confirmed. Figure 10 shows the images taken before background removal processing in Example 2. Figure 10(A) shows the image processed so that it becomes brighter from left to right. Figure 10(B) shows a graph representing a three-dimensional surface with the brightness value of the image shown in Figure 10(A) as the height, and the X and Y axes correspond to the horizontal and vertical coordinates of Figure 10(A), respectively. Figure 10(C) shows the image shown in Figure 9(A) converted to a grayscale image and binarized using Otsu's binarization method.
[0068] As shown in Figure 10(B), the bright bean portion appears as a peak, and the brightness value of the background portion gradually increases from the left to the right of the image. In particular, at the right edge of the image, the height of the peak in the bean portion and the height of the background portion are close. When an image with similar brightness values in each region is binarized, as shown in Figure 10(C), the left half of the image is binarized into the bean region and the background region, but the right half is not binarized into the two regions.
[0069] Figure 11 shows images to which the Rolling Ball method was applied in Example 2. Figure 11(A) shows the image to which the Rolling Ball method was applied to the image shown in Figure 10(A), and Figure 11(B) shows a graph representing the three-dimensional surface with the brightness values of the image in Figure 11(A) as height. As shown in Figure 11(A), the bias in the brightness values of the entire image is extracted, and as shown in Figure 11(B), the background region is extracted while ignoring the peaks in the bean region.
[0070] Figure 12 shows the captured image after background removal processing in Example 2. Figure 12(A) shows the image obtained by dividing Figure 11(A) by Figure 10(A), Figure 12(B) shows a graph representing a three-dimensional surface with the brightness values of the image shown in Figure 12(A) as height, and Figure 12(C) shows the image obtained by converting the image shown in Figure 12(A) to a grayscale image and then binarizing it using Otsu's binarization method.
[0071] As shown in Figure 12(A), the bias in the brightness values of the entire image is removed by background removal processing using the Rolling Ball method. As shown in Figure 12(B), the background portion of the image is offset while retaining the peak in the bean region, and the image shown in Figure 12(A) is successfully binarized into two regions, the bean region and the background region, as shown in Figure 12(C). From the above, the effectiveness of background removal processing using the Rolling Ball method has been confirmed.
[0072] (Example 3) Coffee beans (Arabica variety (Brazilian Santos)) were roasted using a roasting machine, and the L-value of the coffee beans during roasting was measured (calculated) using a roasting degree evaluation device. Figure 13 shows the results of L-value calculation for coffee beans (Arabica variety (Brazilian Santos)). In Figure 13, the horizontal axis represents roasting time, and the vertical axis represents the L-value. L-value(B) is the average L-value of the bean region in the captured image (image used for L-value calculation) when a valley was detected in the B histogram, L-value(G) is the average L-value of the bean region in the captured image (image used for L-value calculation) when a valley was detected in the G histogram, and L-value(R) is the average L-value of the bean region in the captured image (image used for L-value calculation) when a valley was detected in the R histogram. The bean region is extracted from the binarized image of the original image associated with the histogram in which the valley was detected.
[0073] As shown in Figure 13, the L value peaks in the early stages of roasting, and then gradually declines from the mid- to late-stages of roasting. This indicates that the coffee beans became lighter in the early stages of roasting before changing to a darker color. Furthermore, it was confirmed that the histograms in which dips were detected tended to change in the order of Blue, Green, and Red.
[0074] Figure 14 shows a selected image of the bean region from an image acquired 30 seconds after the start of roasting. As shown in Figure 14, the selected bean region image shows both bright and dark beans. This is thought to be due to differences in how the beans appear depending on their position and individual differences in the beans. In this embodiment, the L value calculation result is output as an average of the brightness of the bean region. Therefore, even if there is variation in the brightness of the beans, if there is a large amount of beans captured in the image (selected bean region image), it is possible to suppress the variation in the L value calculation result.
[0075] On the other hand, if the amount of beans captured in the captured image (bean region selection image) is small, the influence of variations in bean brightness becomes larger, which is thought to cause variations in the L-value calculation results. Therefore, the ratio of the number of pixels in the bean region to the total number of pixels in the image used for L-value calculation was calculated, and L-values calculated using images with a small proportion of bean regions were excluded as unreliable values. Figure 15 shows the L-value calculation results after excluding plots in Figure 13 where the proportion of bean regions was 20% or less.
[0076] As shown in Figure 15, the variability of L values decreases from the mid-roasting stage to the late-roasting stage. In addition, the number of plots for L values (R) and L values (G) that appeared in the early roasting stage, and the number of plots for L values (R) that appeared in the mid-roasting stage, decreases. As a result, by excluding L value calculation results with a small proportion of bean area, we were able to confirm that the tendency for the histogram in which valleys are detected to change in the order of Blue, Green, and Red becomes stronger.
[0077] [1] As described above, in the roasting degree evaluation method according to one embodiment, at the timing when a valley appears in at least one of the R, G, and B histograms of the captured image of the coffee bean Cb during the roasting process, the bean region is extracted from the original image or its binarized image associated with the histogram at the timing when the valley appears, and the L value of the bean region in the captured image or an L value calculated by processing the captured image is calculated to evaluate the roasting degree of the coffee bean Cb.
[0078] According to this method, the original image (or binarized image) associated with the histogram at the timing when a valley appears has a clearer distinction between the bean region and the background region compared to the image associated with the histogram at the timing when no valley appears. Therefore, by extracting the bean region from the original image (or binarized image), the accuracy of calculating the L value of the bean region in the captured image (or image used for L value calculation) can be improved. This improves the accuracy of evaluating the roasting degree of coffee beans Cb.
[0079] [2] The roasting degree evaluation method described in [1] above preferably evaluates the roasting degree of coffee beans Cb by calculating the L value of the bean region in the L value calculation image, and the L value calculation image is a grayscale image obtained by processing an captured image which is an RGB color image. With such a method, the calculation of the L value becomes easier.
[0080] [3] In the roasting degree evaluation method described in [1] or [2] above, The timing of the appearance of the valley is the timing of the detection of the valley. Valley detection is, The determination is made by observing the change in the slope of the histogram's approximation curve, where the vertical axis represents the number of pixels and the horizontal axis represents the brightness value, from positive to negative or negative to positive, and / or, A preferred method is to determine this from the variance of the convex distribution in the histogram's approximation curve.
[0081] According to this method, by using the original image (or binarized image) at the time the valley was detected, the bean region and the background region become clearer, and the accuracy of evaluating the roasting degree of coffee beans Cb can be improved.
[0082] [4] The roasting degree evaluation method described in any one of the above [1] to [3] is: The system determines whether a trough appears in the B-histogram, and if it determines that a trough appears, it extracts a bean-shaped region from the original image or its binarized image associated with the B-histogram and calculates the L value. If it is determined that a trough does not appear in the B histogram, then it is determined that a trough does appear in the G histogram. If it is determined that a trough does appear in the G histogram, then the bean region is extracted from the original image or its binarized image associated with that G histogram, and the L value is calculated. If it is determined that a trough does not appear in the B and G histograms, then it is determined that a trough does appear in the R histogram. If it is determined that a trough does appear in the R histogram, then the bean region is extracted from the original image or its binarized image associated with that R histogram, and the L value is calculated. If it is determined that the timing is not such that a trough appears in the B, G, and R histograms, it is preferable to determine if there is a histogram from the time immediately preceding when a trough appeared, and if there is such a histogram, to extract the bean-shaped region from the original image or its binarized image associated with that histogram and calculate the L value.
[0083] According to this method, by determining when the troughs appear in the B histogram, G histogram, and R histogram in that order, it becomes possible to estimate, for example, whether the coffee beans being roasted are in the early, middle, or late stages of roasting, depending on the type of coffee bean Cb.
[0084] [5] The roasting degree evaluation method described in any one of the above [1] to [4] is preferably a method that obtains R, G, and B histograms from the captured image after background removal processing.
[0085] This method reduces the bias in the brightness values of the original image (or binarized image), improving the accuracy of extracting the bean region from the original image (or binarized image) and the accuracy of detecting valleys in the histogram. This improves the accuracy of calculating the L value of the bean region in the captured image (or image used for L value calculation), thereby improving the accuracy of evaluating the roasting degree of coffee beans Cb.
[0086] [6] In any of the roasting degree evaluation methods described in [1] to [5] above, it is preferable that the captured image is an image focused on the coffee beans Cb being roasted behind the observation window.
[0087] This method allows for blurring of dirt adhering to the observation window 202. This reduces the influence of dirt on the observation window 202, thereby improving the accuracy of evaluating the roasting level of coffee beans Cb.
[0088] [7] One embodiment of the roasting and manufacturing method involves roasting coffee beans Cb to a predetermined roasting degree using the roasting degree evaluation method described in any one of [1] to [6] above. This method allows for stable quality control of coffee beans Cb without relying on skilled personnel.
[0089] [8] A roasting degree evaluation program according to one embodiment implements the roasting degree evaluation method described in any one of [1] to [6] above using a computer or one or more processors. Such a program can improve the accuracy of evaluating the roasting degree of coffee beans Cb.
[0090] [9] A roasting degree evaluation device 100 according to one embodiment includes a histogram generation unit 1 that generates at least one histogram among R, G, and B histograms in an image of coffee beans Cb being roasted; a valley determination unit 2 that determines whether it is the timing for a valley to appear in the histogram; a bean region extraction unit 3 that, when the valley determination unit 2 determines that it is the timing for a valley to appear, extracts the bean region from the original image or its binarized image associated with the histogram for which the determination was made; an L value calculation unit 4 that calculates an L value calculation image obtained by processing the image or the L value of the bean region in the image; and a roasting degree evaluation unit 5 that evaluates the roasting degree of coffee beans Cb from the L value.
[0091] With this configuration, the original image (or binarized image) associated with the histogram at the time when a valley appears has a clearer distinction between the bean region and the background region compared to the image associated with the histogram at the time when no valley appears. Therefore, by extracting the bean region from the original image (or binarized image), the accuracy of calculating the L value of the bean region in the captured image (image for L value calculation) can be improved. This improves the accuracy of evaluating the roasting degree of coffee beans Cb.
[0092]
[10] In the roasting degree evaluation device 100 described in [9] above, it is preferable that the L-value calculation unit 4 calculates the L-value of the bean region in the L-value calculation image, and that the L-value calculation image is a grayscale image obtained by processing an captured image which is an RGB color image. With such a configuration, the calculation of the L-value becomes easier.
[0093]
[11] The roasting degree evaluation device 100 described in [9] or
[10] above includes a detection unit 6 for detecting histogram valleys, and the valley determination unit 2 determines the timing at which the histogram valley is detected by the detection unit 6 as the timing at which a histogram valley appears. The detection unit 6 is From the approximation curve of a histogram with the vertical axis representing the number of pixels and the horizontal axis representing the brightness value, a trough in the histogram is detected when the slope of the curve changes from positive to negative or from negative to positive, and / or, A preferred configuration is one in which the valleys in the histogram are detected from the variance of the convex distribution in the histogram's approximation curve.
[0094] With this configuration, by using the original image (or binarized image) at the time the valley was detected, the bean region and the background region become clearer, and the accuracy of evaluating the roasting level of the coffee beans (Cb) can be improved.
[0095]
[12] In the roasting degree evaluation device 100 described in any one of the above [9] to
[11] , Valley judgment unit 2, The histogram generation unit 1 determines when a trough appears in the B histogram, If it is determined that the timing is not such that a trough appears in the B histogram, then it is determined that the timing is such that a trough appears in the G histogram generated by the histogram generation unit 1. If it is determined that the timing is not such that a trough appears in the B and G histograms, then it is determined whether the timing is such that a trough appears in the R histogram generated by the histogram generation unit 1. If it is determined that a trough does not appear in the B, G, and R histograms, check if there is a histogram from the time immediately preceding when a trough appeared. The bean region extraction unit 3 is preferably configured to extract the bean region from the original image or its binarized image, which is associated with any one histogram that the valley determination unit 2 has determined to be the timing at which a valley appears.
[0096] With this configuration, by determining when the troughs appear in the B histogram, G histogram, and R histogram in that order, it becomes possible to estimate, for example, whether the coffee beans being roasted are in the early, middle, or late stages of roasting, depending on the type of coffee bean Cb.
[0097]
[13] In the roasting degree evaluation device 100 described in any one of [9] to
[12] above, it is preferable that the original image is an image from which background removal processing has been performed.
[0098] With this configuration, the bias in the brightness values of the original image (or binarized image) can be reduced, improving the accuracy of the bean region extraction unit 3 for the original image (or binarized image) and the detection accuracy of the histogram valleys for the detection unit 6. As a result, the accuracy of calculating the L value of the bean region in the captured image (or L value calculation image) can be improved, and the accuracy of evaluating the roasting degree of coffee beans Cb can be improved.
[0099]
[14] In the roasting degree evaluation device 100 described in any one of [9] to
[13] above, it is preferable that the captured image is an image focused on the coffee beans Cb being roasted behind the observation window 202.
[0100] With this configuration, dirt adhering to the observation window 202 can be blurred. This reduces the influence of dirt adhering to the observation window 202, thereby improving the accuracy of evaluating the roasting degree of coffee beans Cb.
[0101] A roasting degree evaluation system according to one embodiment comprises a roasting degree evaluation device 100 described in any one of [9] to
[14] above, a roasting device 200 having an observation window 202, an imaging means 300 for imaging coffee beans Cb being roasted in the roasting device 200 through the observation window 202, and an illumination device 600 for irradiating light toward the coffee beans Cb.
[0102] It should be noted that the roasting degree evaluation method, roasting manufacturing method, roasting degree evaluation program, roasting degree evaluation apparatus, and roasting degree evaluation system are not limited to the configurations of the embodiments described above, nor are they limited to the effects described above. Furthermore, it goes without saying that the roasting degree evaluation method, roasting manufacturing method, roasting degree evaluation program, roasting degree evaluation apparatus, and roasting degree evaluation system can be modified in various ways without departing from the spirit of the present invention. For example, it goes without saying that one or more of the configurations and methods related to the various modifications described above can be arbitrarily selected and adopted in the configurations and methods of the embodiments described above. [Explanation of Symbols]
[0103] 1...Histogram generation unit, 2...Valve determination unit, 3...Bean region extraction unit, 4...L value calculation unit, 5...Roast degree evaluation unit, 6...Detection unit, 7...Image processing unit, 100...Roast degree evaluation device, 200...Roasting device, 201...Roasting container, 202...Observation window, 203...Agitation blade, 204...Duct, 300...Imaging means, 301...Lens, 400...Tripod, 500...Camera slider, 600...Illumination device, 601...Support arm, 700...Communication cable, Cb...Coffee beans
Claims
1. A method for evaluating the degree of roasting of coffee beans, comprising: at the timing when a trough appears in at least one of the R, G, and B histograms of an image captured during the coffee bean roasting process, extracting a bean region from the original image or its binarized image associated with the histogram at the timing when the trough appears, and calculating an L-value calculation image obtained by processing the captured image or the L-value of the bean region in the captured image to evaluate the degree of roasting of the coffee beans.
2. The L-value of the bean region in the L-value calculation image is calculated to evaluate the degree of roasting of the coffee beans. The roasting degree evaluation method according to claim 1, wherein the image for calculating the L value is a grayscale image obtained by processing the captured image, which is an RGB color image.
3. The timing at which the aforementioned valley appears is the timing at which the aforementioned valley is detected. The detection of the aforementioned valley is The determination is made by observing the change in the slope of the histogram's approximation curve, where the vertical axis represents the number of pixels and the horizontal axis represents the brightness value, from positive to negative or from negative to positive, and / or, The roasting degree evaluation method according to claim 1, which is determined from the variance of the convex distribution in the approximation curve of the histogram.
4. It is determined whether a trough appears in the B-histogram, and if it is determined that a trough appears in the B-histogram, the bean region is extracted from the original image or its binarized image associated with the B-histogram for which the determination was made, and the L value is calculated. If it is determined that the timing is not such that a trough appears in the B histogram, then it is determined that the timing is such that a trough appears in the G histogram, and if it is determined that the timing is such that a trough appears in the G histogram, then the bean region is extracted from the original image or its binarized image associated with the G histogram for which the determination was made, and the L value is calculated. If it is determined that the timing is not such that a trough appears in the B and G histograms, then it is determined that the timing is such that a trough appears in the R histogram. If it is determined that the timing is such that a trough appears in the R histogram, then the bean region is extracted from the original image or its binarized image associated with the R histogram for which the determination was made, and the L value is calculated. The roasting degree evaluation method according to claim 1, wherein if it is determined that the timing for a valley to appear is not in the B, G, and R histograms, it is determined whether there is a histogram in which a valley appeared immediately before, and if it is determined that there is a histogram in which a valley appeared immediately before, the bean region is extracted from the original image or its binarized image associated with that histogram and the L value is calculated.
5. The roasting degree evaluation method according to claim 1, wherein the R, G, and B histograms are obtained from the captured image after background removal processing.
6. The roasting degree evaluation method according to claim 1, wherein the captured image is an image focused on coffee beans being roasted behind the observation window.
7. A roasting and manufacturing method for roasting coffee beans to a predetermined roasting degree using the roasting degree evaluation method described in any one of claims 1 to 6.
8. By a computer or one or more processors, A roasting degree evaluation program for realizing the roasting degree evaluation method described in any one of claims 1 to 6.
9. A histogram generation unit that generates at least one histogram among R, G, and B histograms in an image of coffee beans being roasted, A valley determination unit that determines whether it is the timing for a valley to appear in the histogram, When the aforementioned valley determination unit determines that it is the timing for a valley to appear, the bean region extraction unit extracts a bean region from the original image or its binarized image associated with the histogram for which the determination was made. An L-value calculation unit that calculates an L-value calculation image obtained by processing the captured image or the L-value of the bean region in the captured image, A roasting degree evaluation device comprising a roasting degree evaluation unit that evaluates the degree of roasting of the coffee beans from the L value.
10. The L-value calculation unit calculates the L-value of the bean region in the L-value calculation image, The roasting degree evaluation apparatus according to claim 9, wherein the image for calculating the L value is a grayscale image obtained by processing the captured image, which is an RGB color image.
11. The system includes a detection unit for detecting the valleys in the histogram, The valley determination unit determines the timing at which the histogram valley is detected by the detection unit as the timing at which the histogram valley appears. The detection unit is From the approximate curve of the histogram, with the vertical axis representing the number of pixels and the horizontal axis representing the brightness value, a trough in the histogram is detected when the slope of the curve changes from positive to negative or from negative to positive, and / or The roasting degree evaluation device according to claim 9, which detects the valleys in the histogram from the variance of the convex distribution in the approximation curve of the histogram.
12. The aforementioned valley determination unit, The system determines whether it is the timing when a trough appears in the B histogram generated by the histogram generation unit. If it is determined that the timing is not such that a trough appears in the B histogram, then it is determined that the timing is such that a trough appears in the G histogram generated by the histogram generation unit. If it is determined that the timing is not such that a trough appears in the B and G histograms, then it is determined whether the timing is such that a trough appears in the R histogram generated by the histogram generation unit. If it is determined that the timing for a trough to appear is not shown in the B, G, and R histograms, then it is determined whether there is a histogram from the time immediately preceding when a trough appeared. The roasting degree evaluation apparatus according to claim 9, wherein the bean region cutting unit cuts out a bean region from the original image or a binarized image thereof that is associated with any one histogram that the valley determination unit has determined to be at the timing when a valley appears.
13. The roasting degree evaluation apparatus according to claim 9, wherein the original image is an image that has undergone background removal processing.
14. The roasting degree evaluation apparatus according to claim 9, wherein the captured image is an image focused on coffee beans being roasted behind the observation window.
15. A roasting degree evaluation device according to any one of claims 9 to 14, A roasting apparatus having an observation window, The roasting apparatus includes an imaging means for imaging coffee beans being roasted through the observation window, A roasting degree evaluation system equipped with a lighting device that shines light onto coffee beans.
Citation Information
Patent Citations
Bean roasting auxiliary device and bean roasting device
JP6913069B2