Processing device, program, and method

The processing device accurately calculates thresholds for image binarization by generating luminance histograms, performing Gaussian fitting, and determining thresholds based on luminance differences, addressing inaccuracies in conventional methods.

WO2026140640A1PCT designated stage Publication Date: 2026-07-02YOKOGAWA ELECTRIC CORP

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
YOKOGAWA ELECTRIC CORP
Filing Date
2025-11-25
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Conventional methods for calculating thresholds to separate objects from images, such as the Triangle and OTSU methods, struggle with accuracy when luminance differences between backgrounds and objects are small or when the number of objects is sparse or dense, leading to inaccurate threshold determination.

Method used

A processing device and method that generates a luminance histogram, divides it into low- and high-luminance sides, performs Gaussian fitting on the high-luminance side, and calculates a threshold based on the difference between the luminance histogram and the fitted curve to accurately separate objects from the background.

Benefits of technology

Enables precise threshold calculation for image binarization, even in scenarios with small luminance differences or uneven object distribution, enhancing the accuracy of object extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025041024_02072026_PF_FP_ABST
    Figure JP2025041024_02072026_PF_FP_ABST
Patent Text Reader

Abstract

This processing device generates a luminance histogram on the basis of an image, divides the luminance histogram into a first luminance histogram on a lower-luminance side and a second luminance histogram on a higher-luminance side, calculates a curve corresponding to the second luminance histogram by executing Gaussian fitting on the basis of the second luminance histogram, and calculates a threshold for binarizing the image on the basis of a difference between the first luminance histogram and the curve.
Need to check novelty before this filing date? Find Prior Art

Description

Processing device, program, and method

[0001] The present invention relates to a processing device, a program, and a method.

[0002] When extracting an object from an image, a threshold may be used, and it is important to appropriately calculate such a threshold.

[0003] As conventional techniques for calculating a threshold to separate a background and an object from an image, the Triangle method, the OTSU method, the K-mean method, etc. have been proposed. For example, by comparing the obtained threshold with the luminance of the pixels of the image and binarizing the image, the region of the object and the region of the background can be specified.

[0004] Japanese Unexamined Patent Application Publication No. 2018-190110, Japanese Unexamined Patent Application Publication No. 2022-133400, Japanese Unexamined Patent Application Publication No. 2009-244253

[0005] However, in the conventional technique, it is not possible to accurately calculate a threshold for extracting an object from an image, and there is room for improvement.

[0006] For example, when the luminance difference between the background and the object in the image is small, or when the number of objects in the entire image is very small (or very large), it is difficult to accurately calculate the threshold.

[0007] In one aspect, an object is to provide a processing device, a program, and a method capable of accurately calculating a threshold for extracting an object from an image.

[0008] A processing device according to one aspect includes a processor, and the processor generates a luminance histogram based on an image, divides the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, and based on the second luminance histogram, executes Gaussian fitting to calculate a curve paired with the second luminance histogram, and based on the difference between the first luminance histogram and the curve, calculates a threshold for binarizing the image.

[0009] One aspect of the program involves the computer generating a luminance histogram based on an image, splitting the luminance histogram into a first luminance histogram for low luminance and a second luminance histogram for high luminance, performing Gaussian fitting based on the second luminance histogram to calculate a corresponding curve, and then calculating a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

[0010] One approach involves a computer generating a luminance histogram based on an image, splitting it into a first luminance histogram for low luminances and a second luminance histogram for high luminances, performing Gaussian fitting on the second luminance histogram to calculate a corresponding curve, and then calculating a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

[0011] According to one embodiment, a threshold for extracting an object from an image can be calculated with high accuracy.

[0012] This is a diagram illustrating an example of an image. This is a diagram illustrating the process by which the processing unit calculates a threshold. This is a functional block diagram showing the configuration of the processing unit according to this embodiment 1. This is a flowchart illustrating the processing flow of the processing unit of this embodiment 1. This is a diagram illustrating other processes (1) for calculating a threshold. This is a diagram illustrating other processes (2) for calculating a threshold. This is a diagram illustrating the system according to embodiment 2. This is a functional block diagram showing the configuration of the arithmetic unit according to this embodiment 2. This is a flowchart illustrating the processing procedure of the arithmetic unit according to this embodiment 2. This is a diagram illustrating an example of a hardware configuration.

[0013] Embodiments of the processing apparatus, program, and method disclosed herein will be described in detail below with reference to the drawings. However, the present invention is not limited by these embodiments. Furthermore, the same elements are denoted by the same reference numerals, redundant descriptions are omitted as appropriate, and each embodiment can be combined as appropriate within the bounds of consistency.

[0014] (Embodiment 1) (Threshold Calculation) An example of the process by which the processing device according to this embodiment 1 calculates a threshold for extracting an object from an image will be described. In the following description, the processing device according to this embodiment will be referred to as "processing device 100". In this embodiment 1, the object will be described as a "liquid droplet" as an example, but it is not limited to this.

[0015] Figure 1 shows an example of an image. For example, Image 10 shown in Figure 1 is an image of a droplet of H2O2 taken with a camera. In Image 10, the black area is the droplet, and the white area is the background. The camera is equipped with a camera light, and this camera light can be switched on and off. Image 10 shown in Figure 1 is an image taken with the camera light in the "ON" position.

[0016] Figure 2 is a diagram illustrating the process by which the processing unit calculates a threshold. As shown in Figure 2, the processing unit 100 calculates a luminance histogram from an image. The image is the same as image 10 described in Figure 1. The luminance histogram is shown by a curve L1 that shows the relationship between the number of pixels obtained from the image and the luminance. Graph G1 in Figure 2 is a graph showing the luminance histogram from an image. The vertical axis of graph G1 corresponds to the number of pixels, and the horizontal axis corresponds to the luminance.

[0017] Note that the explanations for the vertical and horizontal axes of graphs G2, G3, G4, G5, and G6 shown in Figure 2 are the same as those for the vertical and horizontal axes of graph G1.

[0018] The processing unit 100 divides curve L1 into a low-luminance side and a high-luminance side in the direction of the luminance axis, using position p1 where the number of pixels of curve L1 is at its maximum value as a reference, and generates curve L2 shown in graph G2 by acquiring the high-luminance half.

[0019] The processing device 100 generates the curve L3 shown in graph G3 by folding the curve L2 at position p1.

[0020] The processing unit 100 generates the curve L4 shown in graph G4 by performing curve fitting based on the Gaussian equation on the curve L3. Curve fitting based on the Gaussian equation corresponds to "Gaussian fitting". Curve L4 is the brightness histogram of the background of the image. Curve L1 in graph G4 is the same as curve L1 in graph G1.

[0021] The processing unit 100 generates curve L5 shown in graph G5 by subtracting curve L4 from curve L1. The processing unit 100 calculates the area between curve L5 and the horizontal axis. The area between curve L5 and the horizontal axis is denoted as the total value (A).

[0022] The processing unit 100 repeatedly calculates the integral value from the minimum brightness to the upper brightness of the curve L1 shown in graph G6, while changing the upper brightness, and calculates the upper brightness at which the integral value matches the total value (A) as the threshold Th1. This threshold Th1 becomes the threshold for binarizing the image. For example, the region of the image where the pixels are less than the threshold Th1 is the region of the object. On the other hand, the region of the image where the pixels are greater than or equal to the threshold Th1 is the background region.

[0023] As described above, the processing unit 100 generates a luminance histogram based on the image and divides the luminance histogram into a low-luminance luminance histogram and a high-luminance luminance histogram. Based on the high-luminance luminance histogram, the processing unit 100 performs curve fitting to calculate a curve that corresponds to the high-luminance luminance histogram. Based on the image's luminance histogram and curve, the processing unit 100 calculates a threshold for binarizing the image. This allows for accurate calculation of a threshold for extracting objects from the image.

[0024] (Example of the configuration of the processing unit 100) Next, an example of the configuration of the processing unit according to this embodiment 1 will be described. Figure 3 is a functional block diagram showing the configuration of the processing unit according to this embodiment 1. As shown in Figure 3, this processing unit 100 has a communication unit 110, an input unit 120, a display unit 130, a storage unit 140, and a control unit 150.

[0025] The communication unit 110 communicates data with the camera and other external devices. For example, the communication unit 110 acquires image data captured by the camera and outputs it to the control unit 150. In the following description, the image data will be referred to as image data.

[0026] The input unit 120 is an input device that inputs various types of information to the control unit 150. The user may use the input unit 120 to input image data to the control unit 150.

[0027] The display unit 130 displays information output from the control unit 150. The display unit 130 may also display the threshold calculation result.

[0028] The storage unit 140 stores the image data 141. The storage unit 140 is implemented by memory, a hard disk, or the like.

[0029] Image data 141 is image data captured by the camera. For example, image data 141 corresponds to image 10 shown in Figure 1. Assume that image data 141 is an image captured with the camera illumination "ON".

[0030] The control unit 150 is a processing unit that oversees the entire processing unit 100 and is implemented by, for example, a processor. The control unit 150 includes a generation unit 151, a fitting unit 152, and a threshold calculation unit 153.

[0031] The generation unit 151 acquires image data 141 and stores it in the storage unit 140. The generation unit 151 generates a luminance histogram based on the image data 141. The luminance histogram generated by the generation unit 151 is a histogram that represents the relationship between the number of pixels in the image data 141 and the luminance, and is information that corresponds to, for example, the curve L1 shown in graph G1 in Figure 2. The generation unit 151 outputs the luminance histogram information to the fitting unit 152.

[0032] The fitting unit 152 divides the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, and calculates a curve that corresponds to the second luminance histogram by performing Gaussian fitting based on the second luminance histogram.

[0033] For example, the fitting unit 152 may perform the following processing. The processing of the fitting unit 152 will be explained using Figure 2. The luminance histogram received from the generation unit 151 corresponds to curve L1 in graph G1 of Figure 2. The fitting unit 152 divides curve L1 into a low-luminance side and a high-luminance side in the direction of the luminance axis, using position p1 where the number of pixels in curve L1 is at its maximum value as a reference, and generates curve L2 shown in graph G2 by acquiring the high-luminance half. Curve L2 corresponds to the second luminance histogram on the high-luminance side.

[0034] The fitting unit 152 generates the curve L3 shown in graph G3 by folding the curve L2 at position p1. The fitting unit 152 generates the curve L4 shown in graph G4 by performing Gaussian fitting on the curve L3. Curve L4 corresponds to the above curve. The fitting unit 152 outputs the fitting result to the threshold calculation unit 153.

[0035] The threshold calculation unit 153 calculates a threshold for binarizing the image data based on the difference between the first luminance histogram on the low-luminance side and the curve.

[0036] For example, the threshold calculation unit 153 may perform the following processing. The threshold calculation unit 153 will be explained using Figure 2. The threshold calculation unit 153 generates the curve L5 shown in graph G5 by subtracting curve L4 from curve L1.

[0037] The threshold calculation unit 153 calculates the area between curve L5 and the horizontal axis as the total value (A). The threshold calculation unit 153 repeatedly calculates the integral value from the minimum brightness to the upper limit brightness of curve L1 shown in graph G6 while changing the upper limit brightness, and calculates the upper limit brightness at which the integral value matches the total value (A) as the threshold Th1.

[0038] The threshold calculation unit 153 may output the calculated threshold Th1 information to the display unit 130 for display, or it may notify other external devices of the threshold Th1 information via the communication unit 110.

[0039] (Processing Flow) Next, an example of the processing flow of the processing device 100 according to Embodiment 1 will be described. FIG. 4 is a flowchart showing the processing flow of the processing device of Embodiment 1. As shown in FIG. 4, the generation unit 151 of the processing device 100 acquires image data 141 from a camera (step S101).

[0040] The generation unit 151 generates a luminance histogram based on the image data 141 (step S102). The fitting unit 152 of the processing device 100 divides the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side (step S103).

[0041] The fitting unit 152 calculates a curve that pairs with the second luminance histogram by performing Gaussian fitting based on the second luminance histogram on the high-luminance side (step S104).

[0042] The threshold calculation unit 153 of the processing device 100 calculates a threshold based on the difference between the first luminance histogram and the curve (step S105). The threshold calculation unit 153 outputs the threshold (step S106).

[0043] (Effect) The processing device 100 generates a luminance histogram based on an image, and divides the luminance histogram into a luminance histogram on the low-luminance side and a luminance histogram on the high-luminance side. The processing device 100 calculates a curve that pairs with the luminance histogram on the high-luminance side by performing curve fitting based on the luminance histogram on the high-luminance side. The processing device 100 calculates a threshold for binarizing the image based on the luminance histogram and the curve of the image. As a result, a threshold for extracting an object from the image can be accurately calculated.

[0044] (Regarding Other Threshold Calculations) The process in which the above-described processing device 100 calculates a threshold from the image data 141 is an example, and a threshold may be calculated from the image data 141 by performing other processes. Hereinafter, other processes (1), (2), and (3) in which the processing device 100 calculates a threshold will be described.

[0045] First, other processing (1) for calculating the threshold value will be described. FIG. 5 is a diagram for explaining other processing (1) for calculating the threshold value. In FIG. 5, the description of the processing of the processing device 100 regarding graphs G1 to G4 is the same as the description of the processing of the processing device 100 regarding graphs G1 to G4 described in FIG. 2. The description of the vertical axis and the horizontal axis of graph G5a is the same as the description of the vertical axis and the horizontal axis of graph G1.

[0046] Regarding graph G5a, the processing device 100 generates a curve L5 shown in graph G5a by subtracting curve L4 from curve L1. The processing device 100 specifies an intersection point p2 between curve L4 and curve L5. The processing device 100 calculates the value of the luminance axis corresponding to the intersection point p2 as the threshold value Th2.

[0047] As described above, the processing device 100 can efficiently calculate the threshold value by calculating the luminance corresponding to the intersection point p2 between curve L4 and curve L5 as the threshold value.

[0048] Subsequently, other processing (2) for calculating the threshold value will be described. First, as preprocessing, the processing device 100 generates a luminance histogram based on an image captured with the camera illumination turned "OFF". The processing device 100 specifies the luminance at which the number of pixels is maximum in this luminance histogram as the noise luminance.

[0049] After executing the above preprocessing, the processing device 100 executes the processing shown in FIG. 6. FIG. 6 is a diagram for explaining other processing (2) for calculating the threshold value. In FIG. 6, the description of the processing of the processing device 100 regarding graphs G1 to G3 is the same as the description of the processing of the processing device 100 regarding graphs G1 to G3 described in FIG. 2. The description of the vertical axis and the horizontal axis of graphs G4b and G5b is the same as the description of the vertical axis and the horizontal axis of graph G1.

[0050] Let's explain graph G4b. The processing unit 100 sets a point p4 on the curve L3 of graph G4b that is not affected by noise. For example, the processing unit 100 identifies a brightness p3-2 that is twice the noise brightness p3-1 obtained in the preprocessing, and sets the point on the curve L3 corresponding to this brightness p3-2 as point p4.

[0051] Let's explain graph G5b. The processing unit 100 calculates the spread width w1 by inputting a value corresponding to point p4 into the spread width function f(x). The processing unit 100 calculates the brightness obtained by moving from the brightness of point p4 in the low-brightness direction by a spread width w1 as the threshold Th3. The spread width function f(x) is an example of a predetermined function.

[0052] Here, we will provide a supplementary explanation of the spread function f(x). For example, the processing unit 100 acquires many luminance histograms for different coverage rates and generates the function f(x) in advance from the relationship between the coverage rate and the spread. The coverage rate is defined as "droplet area / background area". The processing unit 100 sets a point unaffected by noise in the luminance histogram generated from an image with a certain coverage rate, draws a horizontal line passing through this point, identifies the luminance that crosses the left side of the luminance histogram, and identifies the width from the identified luminance to the point unaffected by noise as the spread for a certain coverage rate.

[0053] The processing unit 100 identifies the relationship between points unaffected by noise and the spread width for each coverage rate, and based on the identification results, generates a function f(x) that derives the spread width from the points unaffected by noise. The processing unit 100 may also use a pre-prepared function f(x).

[0054] In this way, the processing unit 100 can accurately calculate the threshold by inputting values ​​corresponding to points unaffected by noise into the spread function f(x), calculating the spread width w1, and then determining the threshold. For example, if the function f(x) is generated in advance, the computational cost required for threshold calculation can also be reduced.

[0055] Next, we will explain the other processes (3) for calculating the threshold. The processing unit 100, with respect to the background and object included in the image data, calculates the threshold by swapping the background and object if the proportion of the object is greater than the proportion of the background.

[0056] For example, the processing unit 100 generates a luminance histogram based on the image data 141. The processing unit 100 divides the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, and calculates a curve that corresponds to the first luminance histogram by performing Gaussian fitting based on the first luminance histogram. The processing unit 100 calculates a threshold for binarizing the image data based on the difference between the second luminance histogram on the high-luminance side and the curve.

[0057] The processing unit 100 may determine in any way whether the proportion of the target object is greater than the proportion of the background. For example, the processing unit 100 differentiates the luminance histogram generated from the image, counts the convex and concave luminances, and determines that the proportion of the target object is greater than or equal to a predetermined proportion if convex = 1 and concave = 0. When convex = 1 and concave = 0, the luminance histogram is a single peak, indicating that the target object is present in greater numbers than the background.

[0058] As described above, the processing unit 100 can accurately calculate the threshold even when the proportion of objects is greater than the proportion of background, by swapping the background and objects in the image data and calculating the threshold.

[0059] (Embodiment 2) The threshold value calculated by the processing device 100 of Embodiment 1 can be used for various processes. Embodiment 2 describes a calculation device that uses the threshold value calculated by the processing device 100 to calculate the concentration of a droplet. In the following description, the calculation device will be referred to as "calculation device 200".

[0060] Figure 7 is a diagram illustrating the system according to Embodiment 2. As shown in Figure 7, this system includes a spectrometer 12, a camera 13, a light source 14, an output fiber 15, an ATR prism 16, and an input fiber 17.

[0061] For example, in Embodiment 2, ATR (Attenuated Total Reflection) is performed. The material of the ATR prism 16 is a material that satisfies the total internal reflection condition with respect to the liquid droplet that is the object to be measured. The incident light is reflected at least once at the surface where the droplet is in contact with the ATR prism 16. The angle of the incident light is adjusted so as to satisfy the total internal reflection condition at the surface of the ATR prism 16, under the conditions of the concentration of the substance contained in the droplet and the refractive index of the ATR prism 16.

[0062] The spectrometer 12 has a wavelength range that includes the wavelength absorbed by the droplet being measured, and has a measurement speed that can track changes in concentration. For example, the spectrometer 12 measures the absorption spectrum based on the total internal reflection method and outputs the absorption spectrum data to the computing device 200.

[0063] The spectrometer 12 measures two absorption spectra: absorption spectrum SR and absorption spectrum SA. Absorption spectrum SR is a reference spectrum measured when there are no droplets on the ATR prism 16. Absorption spectrum SA is an absorption spectrum measured when there are droplets on the ATR prism 16.

[0064] The light source 14 emits light that includes the wavelength range absorbed by the droplet, and can deliver sufficient light to the spectrometer 12. The incident fiber 17 connects the light source 14 and the ATR prism 16, delivering light used for measuring the absorption spectrum from the light source 14 to the ATR prism 16. The exit fiber 15 connects the ATR prism 16 and the spectrometer 12, delivering light containing absorption information from the ATR prism 16 to the spectrometer 12.

[0065] Camera 13 is positioned to photograph the droplet through the ATR prism 16. For example, camera 13 is positioned to photograph an area equivalent to the area where light reflection occurs. That is, camera 3 can photograph the position where light reflection occurs and an area equivalent to the area where light reflection occurs. Camera 13 outputs the captured image data to the computing device 200.

[0066] The computing device 200 is connected to the spectrometer 12 and camera 13 by wire or wireless connection and is capable of communicating with the spectrometer 12 and camera 13. For example, the computing device 200 is a computer such as a personal computer or a server device.

[0067] (Example of the configuration of the arithmetic unit 200) Figure 8 is a functional block diagram showing the configuration of the arithmetic unit according to this second embodiment. As shown in Figure 8, this arithmetic unit 200 has a communication unit 210, an input unit 220, a display unit 230, a storage unit 240, and a control unit 250.

[0068] The communication unit 210 communicates data with the spectrometer 12, the camera 13, and other external devices.

[0069] The input unit 220 inputs various types of information to the control unit 250. For example, the input unit 220 is an input device such as a keyboard, mouse, or touch panel.

[0070] The display unit 230 displays information output from the control unit 250. The display unit 230 is a display device such as a display or touch panel.

[0071] The storage unit 240 stores image data 241, absorbance spectrum data 242, etc. The storage unit 240 is implemented by memory, a hard disk, or the like.

[0072] Image data 241 is image data captured by camera 13.

[0073] Absorption spectrum data 242 is the absorption spectrum data acquired from the spectrometer 12. Absorption spectrum data 242 includes the absorption spectrum SR and the absorption spectrum SA.

[0074] The control unit 250 is a processing unit that oversees the entire arithmetic unit 200 and is implemented by, for example, a processor. The control unit 250 includes a threshold calculation unit 251, an acquisition unit 252, a first calculation unit 253, and a second calculation unit 254.

[0075] The threshold calculation unit 251 acquires image data 241 from the camera 13 and stores the acquired image data 241 in the storage unit 240. Based on the image data 241, the threshold calculation unit 251 calculates a threshold for extracting droplets and background from the image data 241. The process by which the threshold calculation unit 251 calculates the threshold is the same as the process by which the processing device 100 described in Embodiment 1 calculates the threshold. The threshold calculation unit 251 outputs the threshold calculation result to the first calculation unit 253.

[0076] The acquisition unit 252 acquires absorbance spectrum data 242 from the spectrometer 12 and stores the acquired absorbance spectrum data 242 in the storage unit 240.

[0077] The first calculation unit 253 calculates the area ratio (coverage rate) based on the image data 241 and the threshold calculation result. For example, the first calculation unit 253 identifies the area of ​​the image data 241 below the threshold as the droplet area, based on the image data 241 and the threshold. The first calculation unit 253 identifies the area of ​​the image data 241 above the threshold as the background area, based on the image data 241 and the threshold. The first calculation unit 253 calculates the area ratio based on "droplet area / background area".

[0078] The first calculation unit 253 calculates a correction value F by providing one or more parameters, including the area ratio, to a pre-generated formula. Since the correction value F is a value that has a negative correlation with the area ratio, the smaller the area ratio, the greater the degree of correction. For example, by using the correction value F, it becomes possible to obtain an absorption spectrum similar to that obtained when the entire ATR prism is made of material. The first calculation unit 253 outputs the correction value F to the second calculation unit 254.

[0079] The second calculation unit 254 calculates the absorbance spectrum SB by multiplying the absorbance spectrum SA by the correction value F. The absorbance spectrum SB is the absorbance spectrum of the droplet.

[0080] The second calculation unit 254 calculates the absorbance ABS for each wavelength. The absorbance ABS is calculated, for example, as ABS = -log(SB / SR). The Lambert-Beer law then applies to the conversion to concentration.

[0081] The second calculation unit 254 performs spectral feature extraction (for example, the second derivative method or the area method). For example, differential absorbance dABS obtained by the second derivative method is used for feature extraction. The second derivative is performed with respect to wavelength, and the minimum value in the range around 1900 nm of the calculation result is taken as the differential absorbance dABS. The range around 1900 nm is, for example, from wavelengths that are a predetermined length shorter than 1900 nm to wavelengths that are a predetermined length longer than 1900 nm. Differential absorbance dABS is used because it is difficult to calculate the substance concentration from the peak height of absorbance ABS when the difference in peak height between the substance concentration and the absorbance ABS is small. Similar to absorbance, the Lambert-Beer law also applies to differential absorbance.

[0082] The second calculation unit 254 uses the relationship differential absorbance dABS = concentration C * absorption coefficient to calculate the concentration C of the substance contained in the droplet on the ATR prism 16 based on the absorption coefficient and the differential absorbance dABS. The absorption coefficient is a value calculated in advance and is obtained from the differential absorbance dABS and concentration C when measured while the surface of the ATR prism 16 is continuously filled with liquid.

[0083] The second calculation unit 254 outputs the calculated concentration C information to the display unit 230 for display.

[0084] (Processing Procedure) Next, an example of the processing procedure of the arithmetic unit 200 according to this second embodiment will be described. Figure 9 is a flowchart of the processing procedure of the arithmetic unit according to this second embodiment. As shown in Figure 9, the threshold calculation unit 251 of the arithmetic unit 200 acquires image data from the camera 13 and calculates a threshold (step S201).

[0085] The acquisition unit 252 of the arithmetic unit 200 acquires absorbance spectrum data from the spectrometer 12 (step S202). The first calculation unit 253 of the arithmetic unit 200 calculates a correction value F based on the image data 241 and a threshold value (step S203).

[0086] The second calculation unit 254 of the arithmetic unit 200 corrects the absorbance spectrum SA with a correction value F to calculate the absorbance spectrum SB of the droplet (step S204). The second calculation unit 254 calculates the absorbance ABS (step S205). The second calculation unit 254 extracts feature quantities (step S206). The second calculation unit 254 calculates the concentration (step S207).

[0087] (Effects) As described above, the arithmetic unit 200 can calculate the coverage rate of droplets in the image data by using the threshold calculated by the method of Embodiment 1, and can accurately calculate the concentration of the droplets.

[0088] (Hardware) Next, an example of the hardware configuration of the processing unit 100 will be described. Figure 10 is a diagram illustrating an example of the hardware configuration. As shown in Figure 10, the processing unit 100 includes a communication device 6a, an HDD (Hard Disk Drive) 6b, memory 6c, and a processor 6d. Furthermore, each of the parts shown in Figure 10 is interconnected by a bus or the like.

[0089] The communication device 6a communicates with external devices, etc. The HDD 6b stores programs and databases that operate the functions shown in Figure 3.

[0090] The processor 6d operates the processes that perform the functions described in Figure 3 by reading programs that perform the same processing as each processing unit shown in Figure 3 from the HDD 6b or the like and loading them into memory 6c. For example, this process performs the same functions as each processing unit of the processing unit 100. Specifically, the processor 6d executes processes that perform the same processing as the generation unit 151, fitting unit 152, threshold calculation unit 153, etc.

[0091] Thus, the processing unit 100 operates as a processing unit that performs an information provision method by reading and executing a program. Furthermore, the processing unit 100 can also achieve the same functionality as the embodiment described above by reading the program from the recording medium using a media reader and executing the read program. It should be noted that the program referred to in these other embodiments is not limited to being executed by the processing unit 100. For example, the present invention can be similarly applied when another computer or server executes the program, or when they collaborate to execute the program.

[0092] This program can be distributed via networks such as the internet. Furthermore, this program can be recorded on computer-readable storage media such as hard disks, flexible disks (floppy disks), CD-ROMs, MOs (Magneto-Optical disks), and DVDs (Digital Versatile Discs), and executed by reading the program from these media using a computer.

[0093] (Other) Some examples of combinations of disclosed technical features are listed below.

[0094] (1) The processing device comprises a processor, the processor which performs the following: generating a luminance histogram based on an image; dividing the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, calculating a curve that is paired with the second luminance histogram by performing Gaussian fitting based on the second luminance histogram; and calculating a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

[0095] (2) The processing apparatus according to (1), wherein the processor generates a luminance histogram showing the relationship between the number of pixels and luminance of an image based on the image, and further performs the process of calculating a curve showing the relationship between the number of pixels and luminance of an image in a portion that is paired with the second luminance histogram.

[0096] (3) The processing apparatus according to (1) or (2), wherein the processor further performs a process of identifying the brightness at which the number of pixels in the brightness histogram is at its maximum value, and dividing the brightness histogram into the first brightness histogram and the second brightness histogram based on the identified brightness.

[0097] (4) The processing apparatus according to (1), (2), or (3), wherein the processor calculates the total number of pixels based on the difference between the first luminance histogram and the curve, repeatedly calculates the integral value from the minimum luminance to the upper limit luminance of the luminance histogram while changing the upper limit luminance, and calculates the upper limit luminance when the integral value matches the total value as the threshold.

[0098] (5) The processing apparatus according to (1), (2), or (3), wherein the processor calculates the brightness corresponding to the intersection point of the curve and the curve, which is shown in the difference between the first brightness histogram and the curve, as the threshold.

[0099] (6) The processing apparatus according to (1), (2), or (3), wherein the processor sets a point in the luminance histogram on the high-luminance side that corresponds to a luminance that is not affected by noise, and further performs a process of calculating the threshold based on the spread of the luminance histogram obtained by inputting the luminance of the set point into a predetermined function.

[0100] (7) The processing apparatus according to (6), wherein the processor calculates a noise-free brightness based on the brightness of the highest frequency among the brightness of the brightness of the generated brightness histogram, based on an image taken while the light source is off.

[0101] (8) The processing apparatus according to any one of (1) to (7), wherein the processor further performs the operation of identifying the object region and the background region of the image based on the threshold.

[0102] (9) The processing apparatus according to any one of (1) to (8), wherein the processor, when the proportion of objects included in the image is greater than the proportion of the background, swaps the background and objects and calculates the threshold.

[0103] (10) A program that causes a computer to perform the following processes: generate a luminance histogram based on an image; divide the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side; calculate a curve corresponding to the second luminance histogram by performing Gaussian fitting based on the second luminance histogram; and calculate a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

[0104] (11) A method in which a computer generates a luminance histogram based on an image, divides the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, calculates a curve that corresponds to the second luminance histogram by performing Gaussian fitting based on the second luminance histogram, and calculates a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

[0105] 100 Processing unit 110, 210 Communication unit 120, 220 Input unit 130, 230 Display unit 140, 240 Storage unit 141, 241 Image data 150, 250 Control unit 151 Generation unit 152 Fitting unit 153, 251 Threshold calculation unit 242 Absorption spectrum data 252 Acquisition unit 253 First calculation unit 254 Second calculation unit

Claims

1. The processing device comprises a processor, which performs the following actions: generating a luminance histogram based on an image; dividing the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, calculating a curve paired with the second luminance histogram by performing Gaussian fitting based on the second luminance histogram; and calculating a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

2. The processing apparatus according to claim 1, wherein the processor further performs a process of generating a luminance histogram showing the relationship between the number of pixels and luminance of an image based on the image, and calculating a curve showing the relationship between the number of pixels and luminance of a portion of the image that is paired with the second luminance histogram.

3. The processing apparatus according to claim 1, wherein the processor further performs a process of identifying the brightness at which the number of pixels in the brightness histogram is at its maximum value, and dividing the brightness histogram into a first brightness histogram and a second brightness histogram based on the identified brightness.

4. The processing apparatus according to claim 1, wherein the processor calculates the total number of pixels based on the difference between the first luminance histogram and the curve, repeatedly calculates the integral value from the minimum luminance to the upper limit luminance of the luminance histogram while changing the upper limit luminance, and calculates the upper limit luminance at which the integral value matches the total value as the threshold.

5. The processing apparatus according to claim 1, wherein the processor calculates the brightness corresponding to the intersection point of the curve and the first brightness histogram, which is shown in the difference between the first brightness histogram and the curve, as the threshold.

6. The processing apparatus according to claim 1, wherein the processor further performs a process of setting a point in the luminance histogram on the high-luminance side that corresponds to a luminance that is not affected by noise, and inputting the luminance of the set point into a predetermined function to calculate the threshold based on the spread of the luminance histogram obtained.

7. The processing apparatus according to claim 6, wherein the processor calculates a noise-free brightness based on the brightness of the highest frequency among the brightness of the brightness of the generated brightness histogram, based on an image taken while the light source is off.

8. The processing apparatus according to claim 1, wherein the processor further performs the operation of identifying the object region and the background region of the image based on the threshold.

9. The processing apparatus according to claim 1, wherein the processor, when the proportion of objects included in the image is greater than the proportion of the background, swaps the background and objects and calculates the threshold.

10. A program that causes a computer to perform the following processes: generate a luminance histogram based on an image; divide the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side; calculate a curve corresponding to the second luminance histogram by performing Gaussian fitting based on the second luminance histogram; and calculate a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.

11. A method comprising: a computer generating a luminance histogram based on an image; dividing the luminance histogram into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side; calculating a curve corresponding to the second luminance histogram by performing Gaussian fitting based on the second luminance histogram; and calculating a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.