Processing apparatus, program and method

By generating and fitting luminance histograms and calculating thresholds based on Gaussian curves, the method addresses inaccuracies in conventional image thresholding, especially in low-contrast or sparse-object images, achieving improved object extraction accuracy.

JP2026113968APending Publication Date: 2026-07-08YOKOGAWA ELECTRIC CORP

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
YOKOGAWA ELECTRIC CORP
Filing Date
2024-12-26
Publication Date
2026-07-08

AI Technical Summary

Technical Problem

Conventional methods struggle to accurately calculate thresholds for extracting objects from images, particularly when luminance differences between background and objects are small or when the number of objects is sparse or dense, leading to inaccuracies in object-background separation.

Method used

A processing device and method that generate a luminance histogram, divide it into low-luminance and high-luminance segments, perform Gaussian fitting on the high-luminance segment, and calculate a threshold based on the difference between the histograms to accurately binarize images.

Benefits of technology

Enables precise calculation of thresholds for object extraction, enhancing the accuracy of image processing even in challenging luminance conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026113968000001_ABST
    Figure 2026113968000001_ABST
Patent Text Reader

Abstract

The challenge is to accurately calculate the threshold for extracting objects from an image. [Solution] The processing device generates a luminance histogram based on the 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, performs Gaussian fitting based on the second luminance histogram to calculate a curve that corresponds to the second luminance histogram, and calculates a threshold for binarizing the image based on the difference between the first luminance histogram and the curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

Background Art

[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 to binarize the image, the region of the object and the region of the background can be specified.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Patent Document 2

Patent Document 3

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, in the conventional technique, it is impossible 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, the objective is to provide a processing device, program, and method that can accurately calculate a threshold for extracting an object from an image. [Means for solving the problem]

[0008] The processing device relating to one side includes a 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 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.

[0009] One aspect of the program involves instructing the computer to generate a luminance histogram based on the image, split the luminance histogram into a first luminance histogram for low luminance and a second luminance histogram for high luminance, perform Gaussian fitting based on the second luminance histogram to calculate a corresponding curve, and then calculate 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 luminance and a second luminance histogram for high luminance, 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. [Effects of the Invention]

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

[0012] [Figure 1] This is a diagram showing an example of an image. [Figure 2] This diagram illustrates the process by which the processing unit calculates a threshold value. [Figure 3] This is a functional block diagram showing the configuration of the processing unit according to this embodiment 1. [Figure 4] This is a flowchart showing the processing flow of the processing apparatus of this embodiment 1. [Figure 5] This is a diagram illustrating the other processes (1) used to calculate the threshold. [Figure 6] This is a diagram illustrating the other processes (2) used to calculate the threshold. [Figure 7] This is a diagram illustrating the system according to Embodiment 2. [Figure 8] This is a functional block diagram showing the configuration of the arithmetic unit according to this second embodiment. [Figure 9] This is a flowchart showing the processing procedure of the arithmetic unit according to this second embodiment. [Figure 10] This is a diagram illustrating an example hardware configuration. [Modes for carrying out the invention]

[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) (Regarding threshold calculation) An example of the process by which the processing apparatus according to this embodiment 1 calculates a threshold for extracting an object from an image will be described. In the following description, the processing apparatus according to this embodiment will be referred to as "processing apparatus 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] FIG. 1 is a diagram showing an example of an image. For example, image 10 shown in FIG. 1 is an image obtained by photographing droplets of H202 with a camera. The black portion of image 10 is the portion of the droplets, and the white portion is the background. Note that camera illumination is installed in the camera, and it is assumed that this camera illumination can be switched between "ON (illumination on)" and "OFF (illumination off)". Let image 10 shown in FIG. 1 be an image photographed with the camera illumination in the "ON" state.

[0016] FIG. 2 is a diagram for explaining the process in which the processing device calculates a threshold value. As shown in FIG. 2, the processing device 100 calculates a luminance histogram from an image. The image is image 10 etc. described in FIG. 1. The luminance histogram is shown by a curve L1 indicating the relationship between the number of pixels obtained from the image and the luminance. Graph G1 in FIG. 2 is a graph showing the luminance histogram from the image. The vertical axis of graph G1 is the axis corresponding to the number of pixels, and the horizontal axis is the axis corresponding to the luminance.

[0017] Note that the description regarding the vertical and horizontal axes of graphs G2, G3, G4, G5, and G6 shown in FIG. 2 is the same as the description regarding the vertical and horizontal axes of graph G1.

[0018] Based on position p1 where the number of pixels of curve L1 becomes the maximum value, the processing device 100 divides curve L1 in the direction of the luminance axis into the low-luminance side and the high-luminance side, and generates curve L2 shown in graph G2 by acquiring the high-luminance side half.

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

[0020] The processing device 100 generates curve L4 shown in graph G4 by performing curve fitting based on the Gaussian formula on curve L3. Curve fitting based on the Gaussian formula corresponds to "Gaussian fitting". Curve L4 is the luminance histogram of the background of the image. Curve L1 in graph G4 is 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 sum (A) as the threshold Th1. This threshold Th1 is used as 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 configuration of the processing unit 100) Next, an example of the configuration of the processing device according to this embodiment 1 will be described. Figure 3 is a functional block diagram showing the configuration of the processing device according to this embodiment 1. As shown in Figure 3, this processing device 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, 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's 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 curve L1 shown in graph G1 in Figure 2, for example. 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 obtaining the high-luminance half. Curve L2 corresponds to the second luminance histogram on the high-luminance side.

[0034] The fitting unit 152 generates curve L3 shown in graph G3 by folding curve L2 at position p1. The fitting unit 152 generates curve L4 shown in graph G4 by performing Gaussian fitting on curve L3. Curve L4 corresponds to the curve described above. 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] (Process flow) Next, an example of the processing flow of the processing device 100 according to this embodiment 1 will be described. Figure 4 is a flowchart of the processing flow of the processing device of this embodiment 1. As shown in Figure 4, the generation unit 151 of the processing device 100 acquires image data 141 from the 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 corresponds to 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 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.

[0044] (Regarding other threshold calculations) The process by which the processing unit 100 calculates a threshold from the image data 141 described above is just one example; the threshold may also be calculated from the image data 141 by performing other processes. Below, other processes (1), (2), and (3) by which the processing unit 100 calculates a threshold will be described.

[0045] First, we will explain the other processes (1) for calculating the threshold. Figure 5 is a diagram illustrating the other processes (1) for calculating the threshold. In Figure 5, the explanation of the processing of the processing unit 100 for graphs G1 to G4 is the same as the explanation of the processing of the processing unit 100 for graphs G1 to G4 explained in Figure 2. The explanation of the vertical and horizontal axes of graph G5a is the same as the explanation of the vertical and horizontal axes of graph G1.

[0046] Let's explain graph G5a. The processing unit 100 generates curve L5 shown in graph G5a by subtracting curve L4 from curve L1. The processing unit 100 identifies the intersection point p2 of curve L4 and curve L5. The processing unit 100 calculates the value of the luminance axis corresponding to the intersection point p2 as the threshold Th2.

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

[0048] Next, we will explain the other processes (2) for calculating the threshold. First, as a preprocessing step, the processing unit 100 generates a luminance histogram based on an image taken with the camera lighting turned "OFF". In this luminance histogram, the processing unit 100 identifies the luminance with the maximum number of pixels as the noise luminance.

[0049] After performing the above preprocessing, the processing unit 100 performs the processing shown in Figure 6. Figure 6 is a diagram illustrating the other processing (2) for calculating the threshold. In Figure 6, the explanation of the processing unit 100 for graphs G1 to G3 is the same as the explanation of the processing unit 100 for graphs G1 to G3 explained in Figure 2. The explanation of the vertical and horizontal axes of graphs G4b and G5b is the same as the explanation of the vertical and horizontal axes 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 pre-generates the function f(x) from the relationship between coverage rate and spread width. 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 width for a given 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, if the proportion of the object is greater than the proportion of the background, swaps the background and the object and calculates the threshold.

[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 in Embodiment 1 can be used for various processes. Embodiment 2 describes a calculation device that calculates the concentration of a droplet using the threshold value calculated by the processing device 100. 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 liquid droplet being measured, and 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 unit 200.

[0066] The computing unit 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 unit 200 is a computer such as a personal computer or a server device.

[0067] (Example 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 may be 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 absorption spectrum SR and 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 unit 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, using 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 results 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 pre-calculated value and is calculated 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] (effect) 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 (FDs), CD-ROMs, MO (Magneto-Optical disks), and DVDs (Digital Versatile Discs), and executed by reading the program from these media using a computer.

[0093] (others) Some examples of the combinations of technical features that will be disclosed are listed below.

[0094] (1) The processing unit comprises a processor, The aforementioned processor, Generating a brightness histogram based on an image, The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, and a curve corresponding to the second luminance histogram is calculated by performing Gaussian fitting based on the second luminance histogram. Based on the difference between the first luminance histogram and the curve, a threshold for binarizing the image is calculated. A processing unit that executes this process.

[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 the 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 the 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 the 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) To the computer, A brightness histogram is generated based on the image. The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side. Based on the aforementioned second luminance histogram, a curve corresponding to the aforementioned second luminance histogram is calculated by performing a Gaussian fitting. A threshold for binarizing the image is calculated based on the difference between the first luminance histogram and the curve. A program that executes a process.

[0104] (11) A computer A brightness histogram is generated based on the image. The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side. Based on the aforementioned second luminance histogram, a curve corresponding to the aforementioned second luminance histogram is calculated by performing a Gaussian fitting. A threshold for binarizing the image is calculated based on the difference between the first luminance histogram and the curve. How to execute the process. [Explanation of Symbols]

[0105] 100 Processing Units 110,210 Communications Department 120,220 Input section 130,230 Display section 140,240 storage section 141,241 image data 150,250 Control Unit 151 Generation part 152 Fitting section 153,251 Threshold calculation unit 242 Absorption Spectrum Data 252 Acquisition Department 253 First Calculation Unit 254 Second Calculation Unit

Claims

1. The processing unit includes a processor, The aforementioned processor, Generating a brightness histogram based on an image, The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side, and a curve corresponding to the second luminance histogram is calculated by performing Gaussian fitting based on the second luminance histogram. Based on the difference between the first luminance histogram and the curve, a threshold for binarizing the image is calculated. A processing unit that executes this process.

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, 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 when the integral value matches the total value as the threshold value.

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 as the threshold value. This curve represents the relationship between the number of pixels and brightness, as shown in the difference between the first brightness histogram and the curve.

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 calculating the threshold based on the spread of the luminance histogram obtained by inputting the luminance of the set point into a predetermined function.

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 brightness histogram generated 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. On the computer, A brightness histogram is generated based on the image. The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side. Based on the aforementioned second luminance histogram, a curve corresponding to the second luminance histogram is calculated by performing a Gaussian fitting. A threshold for binarizing the image is calculated based on the difference between the first luminance histogram and the curve. A program that executes a process.

11. Computers A brightness histogram is generated based on the image. The luminance histogram is divided into a first luminance histogram on the low-luminance side and a second luminance histogram on the high-luminance side. Based on the aforementioned second luminance histogram, a curve corresponding to the second luminance histogram is calculated by performing a Gaussian fitting. A threshold for binarizing the image is calculated based on the difference between the first luminance histogram and the curve. How to execute the process.