WO2023189428A1 - Color discernment device, color discernment system, and image forming device - Google Patents

Color discernment device, color discernment system, and image forming device Download PDF

Info

Publication number
WO2023189428A1
WO2023189428A1 PCT/JP2023/009334 JP2023009334W WO2023189428A1 WO 2023189428 A1 WO2023189428 A1 WO 2023189428A1 JP 2023009334 W JP2023009334 W JP 2023009334W WO 2023189428 A1 WO2023189428 A1 WO 2023189428A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
value
data
detection value
component detection
Prior art date
Application number
PCT/JP2023/009334
Other languages
French (fr)
Japanese (ja)
Inventor
匡 小林
志織 東
Original Assignee
ローム株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ローム株式会社 filed Critical ローム株式会社
Publication of WO2023189428A1 publication Critical patent/WO2023189428A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/46Measurement of colour; Colour measuring devices, e.g. colorimeters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/48Picture signal generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals

Definitions

  • the present disclosure relates to a color discrimination device.
  • Patent Document 1 color sensors that detect color components (RGB) of light are known (for example, Patent Document 1).
  • the color sensor Since the color sensor is inexpensive, it is suitable for being installed in, for example, wearable devices, but there is a need for a technology that uses the color sensor to discriminate colors with sufficient accuracy.
  • An object of the present disclosure is to provide a color discrimination device that can discriminate the color of an object with sufficient accuracy using a color sensor.
  • a color discrimination device uses RGB data based on an R component detection value, a G component detection value, and a B component detection value output from a color sensor, among S values and V values in an HSV color space.
  • an HSV converter configured to convert into at least one type of converted data
  • a teacher data holding unit configured to hold teacher data including at least one of an S value and a V value in addition to RGB values;
  • the apparatus further includes a similarity calculating section configured to calculate a degree of similarity between the color measured by the color sensor and the teacher data based on the RGB data, the conversion data, and the teacher data.
  • the color discrimination device it is possible to discriminate the color of an object with sufficient accuracy using a color sensor.
  • FIG. 1 is a diagram showing an example of the configuration of a color discrimination system.
  • FIG. 2 is a diagram showing an example of the configuration of a color sensor.
  • FIG. 3 is a diagram illustrating an example of the positional relationship of the measurement target with respect to the substrate (viewed in a direction parallel to the substrate surface).
  • FIG. 4 is a diagram illustrating an example of the positional relationship of the measurement target with respect to the substrate (viewed in a direction perpendicular to the substrate surface).
  • FIG. 5 is a table showing an example of the results of 8-bit conversion of RGB component detection values.
  • FIG. 6 is a block diagram showing a functional unit as a color discrimination device in a microcomputer.
  • FIG. 7 is a table showing an example of teacher data, teacher data after scaling processing, and calculated similarity.
  • FIG. 8 is a table showing an example of similarity calculation when three groups of training data for each color are prepared in the Munsell display system similar to that shown in FIG.
  • FIG. 9 is a diagram
  • FIG. 1 is a diagram showing an example of the configuration of a color discrimination system.
  • the color discrimination system 8 includes a substrate 4, a color sensor 5, a white LED (light emitting diode) 6, a microcomputer 7, a switch SW, and a resistor R.
  • the color sensor 5, white LED 6, switch SW, and resistor R are mounted on the substrate 4. Power is supplied to each part of the color discrimination system 8 from the power supply voltage VCC.
  • the white LED 6 is a chip LED that emits white light.
  • the switch SW and the resistor R are arranged on a path through which current flows to the white LED 6 by the power supply voltage VCC.
  • the switch SW is turned on and off by the microcomputer 7. By turning the switch SW on and off, the white LED 6 can be turned on and off.
  • the resistor R limits the current flowing through the white LED 6 and adjusts the amount of white light.
  • the color sensor 5 is a sensor IC that can detect color components of light. Specifically, the color components are an R component (red component), a G component (green component), and a B component (blue component).
  • the white LED 6 emits white light.
  • the white LED 6 irradiates the object to be measured with white light.
  • the color sensor 5 receives the light reflected by the object to be measured and detects the color component.
  • the color sensor 5 outputs the detected color components to the microcomputer 7 as digital data.
  • the digital data output by the color sensor 5 is, for example, 16-bit data.
  • the microcomputer 7 converts each detection value of the RGB components of the 16-bit data acquired from the color sensor 5 into, for example, 8-bit data.
  • FIG. 2 is a diagram showing an example of the configuration of the color sensor 5.
  • the color sensor 5 shown in FIG. 2 includes light receiving elements 51A, 51B, 51C, ADCs (AD converters) 52A, 52B, 52C, a logic circuit 53, an infrared cutoff filter 54, a red light transmission filter 55A, and a green light transmission filter 55A. It has a transmission filter 55B and a blue light transmission filter 55C.
  • the light receiving element 51A generates an analog current signal according to the amount of red light incident through the infrared cutoff filter 54 and the red light transmission filter 55A. That is, the light receiving element 51A detects the R component (red component) of the input light.
  • the light receiving element 51B generates an analog current signal according to the amount of green light incident through the infrared cutoff filter 54 and the green light transmission filter 55B. That is, the light receiving element 51B detects the G component (green component) of the input light.
  • the light receiving element 51C generates an analog current signal according to the amount of blue light incident through the infrared cutoff filter 54 and the blue light transmission filter 55C. That is, the light receiving element 51C detects the B component (blue component) of the input light.
  • a photodiode, a phototransistor, or the like can be suitably used as each of the above light receiving elements 51A, 51B, and 51C.
  • the ADCs 52A, 52B, and 52C convert the analog current signals from the light receiving elements 51A, 51B, and 51C into, for example, 16-bit digital data and output the converted data.
  • the infrared blocking filter 54 blocks the infrared component IR contained in the input light on the upstream side of each of the red light transmitting filter 55A, the green light transmitting filter 55B, and the blue light transmitting filter 55C. By providing such an infrared cutoff filter 54, RGB components can be detected with high accuracy.
  • the logic circuit 53 sends digital data as RGB component detection signals outputted from the ADCs 52A, 52B, and 52C to the microcomputer 7 through I 2 C communication.
  • Position of measurement target> 3 and 4 are diagrams showing an example of the positional relationship of the measurement object 3 with respect to the substrate 4.
  • FIG. 3 is a diagram of the measurement object 3 viewed in a direction X parallel to the substrate surface of the substrate 4.
  • FIG. 4 is a diagram of the substrate 4 viewed in the direction Y (hereinafter simply referred to as the vertical direction) perpendicular to the substrate surface.
  • the measurement object 3 includes a first measurement object 31 and a second measurement object 32.
  • the first measurement object 31 can take on various colors while the second measurement object 32 has a predetermined color.
  • the color discrimination system 8 is intended to detect the color of the first measurement object 31 among the measurement objects 3 .
  • the arrangement relationship and shape of the first measurement object 31 and the second measurement object 32 are not limited to those shown in FIGS. 3 and 4.
  • the white LED 6 irradiates the measurement object 3 with white light, and the color sensor 5 receives the reflected light from the measurement object 3.
  • the surface of the white LED 6 projected onto the measurement object 3 in the vertical direction overlaps with the first measurement object 31.
  • the white LED 6 can irradiate the first measurement object 31 with white light
  • the color sensor 5 can receive the reflected light from the first measurement object 31.
  • the surface of the white LED 6 projected onto the measurement object 3 in the vertical direction also overlaps with the second measurement object 32.
  • the white light from the white LED 6 is also applied to the second measurement object 32, and the reflected light from the second measurement object 32 is received by the color sensor 5. Therefore, the color detection of the first measurement object 31 by the color sensor 5 is performed with the color of the second measurement object 32 also taken into account.
  • the surface of the white LED 6 vertically projected onto the object to be measured 3 may overlap only the first object to be measured 31 of the object to be measured 3 .
  • the second measurement target 32 is not a measurement target, but corresponds to a part other than the first measurement target 31, and the white light is applied only to the first measurement target 31 among the first measurement target 31 and the above-mentioned part. irradiated.
  • the vertical distance L1 between the white LED 6 and the measurement object 3 shown in FIG. 3 is preferably such a distance that the light received by the color sensor 5 does not become too whitish or too black. Furthermore, if the distance L1 has to be shortened due to design, the amount of light from the white LED 6 can be limited and adjusted using the resistor R. Note that the resistor R may be a variable resistor.
  • the distance L2 in the direction along the substrate surface between the white LED 6 and the color sensor 5 shown in FIG. 3 is preferably a distance that suppresses the amount of white light directly received by the color sensor 5.
  • a wall may be provided between the white LED 6 and the color sensor 5 to block white light.
  • Color detection method> a color detection method using the color discrimination system 8 will be explained.
  • first measurement objects 31 having various colors are prepared in advance, white light is irradiated by a white LED for each first measurement object 31, the reflected light is received by a color sensor, and RGB components are detected by the color sensor. to be detected.
  • FIG. 5 shows, as an example, the results of preparing first measurement objects 31 having colors A to N and performing color component detection on each first measurement object 31 using a color sensor as described above.
  • “Color sensor value” shown in FIG. 5 indicates the RGB component detection value detected for each first measurement object 31.
  • the RGB component detection values are each 16-bit (0 to 65535) values.
  • the "color sensor value” shown in FIG. 5 is a value that takes into account the color of the second measurement object 32 in addition to the first measurement object 31, as described above.
  • the maximum value for each RGB component of the RGB component detection values measured in advance by the color sensor in this way is determined.
  • the obtained maximum values for each RGB component are stored in the microcomputer 7 in advance.
  • the microcomputer 7 causes the white LED 6 to irradiate the first measurement object 31 with white light, causes the color sensor 5 to receive the reflected light from the first measurement object 31, and detects the RGB components.
  • the microcomputer 7 then converts the RGB component detection values (16-bit digital data for each component) output from the color sensor 5 into 8-bit data for each RGB component (this conversion is performed by the microcomputer shown in FIG. 6, which will be described later). 7).
  • the maximum values of each component of the RGB component detection value by the color sensor 5 are "2100", “5150”, and "2710". Using this maximum value, values converted into 8-bit detection values for each first measurement object 31 based on the above equation (1) are shown in FIG. 5 ("after 8-bit conversion" in FIG. 5).
  • the white first measurement object 31 is irradiated with white light in advance and the reflected light is received by the color sensor 5 to be measured.
  • the RGB component detection values can be used as the reference white color. That is, assuming that each detected value of the RGB components obtained above corresponds to 255, the detected value by the color sensor 5 can be converted into an 8-bit detected value.
  • the color represented by the maximum value of the RGB component detection values obtained as described above is set as the virtual reference white color, and the 8-bit detection value is set as the virtual reference white color. It becomes possible to convert to
  • the following modification of the color detection method may be implemented.
  • the maximum value of each component of the RGB component detection values measured in advance by the color sensor is determined, and the minimum value of each component is also determined, and the determined minimum value is stored in the microcomputer 7.
  • the microcomputer 7 converts the RGB component detection value (16-bit data) detected by the color sensor 5 for the first measurement object 31 into an 8-bit detection value.
  • the maximum value of each component corresponds to 255, which is the maximum value of 8 bits
  • the minimum value of each component corresponds to a predetermined minimum value of 8 bits
  • the RGB components output from the color sensor 5 are detected. Convert the value to an 8-bit value. That is, the detection value is converted into 8 bits based on the following equation (2).
  • DET * (8bit) (DET * (16bit) - MIN * ) ⁇ (255 - min) / (MAX * - MIN * ) + min (2)
  • DET *(8bit) Detection value after 8-bit conversion
  • DET *(16bit) 16-bit detection value
  • MAX Maximum value obtained in advance
  • MIN Minimum value obtained in advance
  • *: R Either component of G or B
  • min predetermined minimum value of 8 bits
  • the color represented by each minimum value of the RGB component detection values is used as the virtual reference black, and conversion to an 8-bit detection value is possible.
  • Color discrimination method Conventionally, as a method for performing color discrimination, a method is known in which, for example, an RGB color space is converted to an absolute color space L*a*b*, and color discrimination is performed using an absolute color difference ⁇ E.
  • this method requires a highly sensitive camera and a specific color light source, as well as complex calculations or conversion tables (memory), making it unsuitable for color discrimination using inexpensive sensors. do not have.
  • color discrimination is greatly affected by external light, and conventionally it has been necessary to take thorough measures to block light, making it difficult to incorporate color discrimination technology into some products.
  • the color discrimination method according to the present disclosure it is possible to perform color discrimination with sufficient accuracy for practical use even when using an inexpensive color sensor 5 and a microcomputer 7 with low power consumption.
  • the color discrimination method according to the present disclosure will be specifically described below.
  • FIG. 6 is a block diagram showing a functional section of the microcomputer 7 as a color discrimination device.
  • the microcomputer 7 shown in FIG. 6 includes an 8-bit conversion section 71, an HSV conversion section 72, a teacher data holding section 73, a similarity calculation section 74, and a notification output section 75.
  • the 8-bit conversion unit 71 is configured to convert RGB detection value data RGB (16) of 16-bit digital data output from the color sensor 5 into RGB detection value data RGB (8) of 8-bit data.
  • the bit conversion here is performed using the virtual reference white color, as described above. However, in order to perform color discrimination according to the present disclosure, bit conversion may be performed using virtual reference black as described above. Furthermore, the bit conversion may be performed based on a detected value obtained by measuring a reference white prepared in advance using the color sensor 5, without necessarily using a virtual reference white. Similarly, a standard black color prepared in advance may be used. Further, when the color sensor 5 outputs an 8-bit detection value, the 8-bit converter 71 does not need to be provided in the microcomputer 7.
  • the HSV converter 72 is configured to convert the 8-bit RGB detection value data RGB (8) output from the 8-bit converter 71 into S and V values in the HSV color space.
  • the HSV color space is a color space consisting of three components: hue H (Hue), saturation S (Saturation), and brightness V (Value).
  • the H value can take a value from 0 to 360
  • the S value can take a value from 0 to 1
  • the V value can take a value from 0 to 255.
  • the HSV conversion unit 72 calculates only the S value and the V value among the values in the HSV color space, and outputs the calculation results as SV value data SV. Note that the HSV conversion unit 72 may calculate the H value.
  • the teacher data holding unit 73 is a storage circuit in which teacher data is held in advance.
  • the teacher data is composed of RGB values and SV values for each color.
  • the color of the teacher data that has a high degree of similarity to the detection value measured by the color sensor 5 is determined as the measured color (color of the measurement object).
  • the similarity calculation unit 74 calculates the similarity based on the RGB detection value data RGB (8) , the SV value data SV, and the teacher data Dt, and outputs the calculation result as similarity data Ds.
  • the degree of similarity is an index representing the degree of similarity between the color measured by the color sensor 5 and the color represented by the teacher data. Therefore, the degree of similarity can be calculated for each color represented by the teacher data.
  • the notification output unit 75 outputs a notification signal Sn for notifying the determined color based on the similarity data Ds.
  • the display device 9 is provided outside the microcomputer 7 and displays information such as the determined color based on the notification signal Sn. Note that instead of the display device 9, a speaker or the like that generates sound based on the notification signal Sn may be used.
  • the value of cos ⁇ calculated by the above equation (4) is calculated as the degree of similarity.
  • the similarity takes a value of 1 or less, and the closer it is to 1, the higher the similarity.
  • FIG. 7 is a table showing an example of the teacher data Dt, the teacher data after scaling processing, and the calculated similarity.
  • the colors of the teacher data Dt shown in FIG. 7 (5R, 5YR, etc.) are Munsell display colors.
  • the scaling process is performed by dividing the R value, G value, B value, and V value by the maximum possible value (256 in this case) so that the value becomes 1 or less. Since the S value is a value of 1 or less in the state of the teacher data, no scaling processing is performed. By performing the scaling process in this manner, it is possible to equalize the weighting of the R value, G value, B value, S value, and V value. Note that when the S value is not used as the teacher data, the weighting is equalized without performing scaling processing on the R value, G value, B value, and V value.
  • the R detection value, G detection value, and B detection value of the RGB detection value data RGB (8) based on the measurement results by the color sensor 5 and the V value of the SV value data SV are also considered.
  • scaling processing is performed in the same way as the teacher data.
  • the teacher data holding unit 73 may hold teacher data that has been subjected to scaling processing.
  • each component value of A and B uses a value after scaling processing (however, the S value is not subjected to scaling processing).
  • 5YR which has the maximum similarity of 0.999, is determined to be the color to be measured.
  • the color discrimination method according to the present disclosure even if the measurement result by the color sensor 5 is affected by external light, the degree of similarity is calculated using the SV value in addition to the RGB values, so the accuracy can be improved. This makes it possible to perform good color discrimination. Therefore, there is no need to take thorough measures against light shielding. Further, by using an inexpensive color sensor 5 and a microcomputer 7 with low power consumption, color discrimination can be performed with sufficient accuracy for practical use. An inexpensive white LED 6 can also be used as the light source. Therefore, the color discrimination method according to the present disclosure is particularly suitable for wearable devices.
  • the similarity may be calculated using only one of the S value and the V value.
  • the degree of similarity may be calculated using the H value in addition to at least one of the S value and the V value.
  • the H value may be scaled by dividing by 360.
  • the notification output unit 75 determines, for example, the color corresponding to the maximum similarity among the degrees of similarity calculated for each color of the teacher data as the discrimination color, and outputs the determined color included in the notification signal Sn. As a result, information regarding the color is displayed on the display device 9. That is, the notification output unit 75 also functions as a discrimination color determining unit that determines a discrimination color. Note that, in addition to the determined color, the notification output unit 75 may output the notification signal Sn by including the degree of similarity corresponding to the color.
  • the teacher data may be prepared in multiple groups with different external light environments.
  • FIG. 8 shows an example of similarity calculation when training data for each color in the Munsell display system similar to that shown in FIG. 7 is prepared in three groups (for convenience, specific values are omitted in FIG. 8). (There are some places) In this case, as shown in FIG. 8, the degree of similarity corresponding to each color is calculated for each group.
  • the notification output unit 75 determines, as the discrimination color, the color corresponding to the maximum degree of similarity among the degrees of similarity calculated as described above, and includes the determined color in the notification signal Sn and outputs it. Thereby, it is possible to discriminate colors according to the external light environment.
  • the notification output unit 75 may, for example, identify the top three similarities among the similarities calculated as described above, and determine the discrimination color by a majority vote of the colors corresponding to the identified similarities. Good too. For example, if the colors corresponding to the top three similarities are 5R, 5YR, and 5YR in the top order, 5R has the highest similarity, but 5YR is determined as the discrimination color by majority vote.
  • the notification output unit 75 may, for example, identify the maximum degree of similarity, and if the specified degree of similarity is less than or equal to a threshold value, it may include a warning in the notification signal Sn and output it.
  • the above-mentioned warning is, for example, a warning that urges the user to clean the color sensor 5 because it may be dirty.
  • the color discrimination system 8 as described above can be applied to various applications.
  • an image forming apparatus will be described as an example of an application. If the image forming apparatus can determine the color of paper, it becomes possible to perform appropriate image formation control according to the determination result.
  • FIG. 9 is a diagram showing a schematic configuration example of an image forming apparatus.
  • the image forming apparatus 10 shown in FIG. 9 includes a paper feed tray 101, and performs image formation on the paper P stored in the paper feed tray 101 and discharges the paper P.
  • the image forming apparatus 10 includes a paper transport section, an image forming section, a paper discharge section, etc. which are not shown in FIG. Further, the image forming method may be an inkjet method or a laser method.
  • the board 4 is arranged above the paper P stored in the paper feed tray 101. This allows the white LED 6 to irradiate the paper P with white light, and the color sensor 5 to receive the light reflected by the paper P. Then, the microcomputer 7 (not shown in FIG. 9) converts the RGB component detection values by the color sensor 5 into 8-bit detection values. In this case, even if the reference white color of the paper P is not specified, color detection can be performed based on the virtual reference white color by using the method described in the embodiment described above. Note that the arrangement of the substrate 4 is not limited to the example shown in FIG. 9, and may be arranged, for example, in the middle of the paper conveyance path.
  • the color discrimination device (7) uses RGB data based on the R component detection value, the G component detection value, and the B component detection value output from the color sensor (5).
  • an HSV conversion unit (72) configured to convert the data into conversion data of at least one of the S value and the V value in the HSV color space;
  • a teacher data holding unit (73) configured to hold teacher data including at least one of an S value and a V value in addition to RGB values;
  • a similarity calculation unit (74) configured to calculate the similarity between the color measured by the color sensor and the teacher data based on the RGB data, the conversion data, and the teacher data. (first configuration, Figure 6).
  • the similarity calculation unit (74) performs a first scaling process of dividing the RGB data by the maximum possible value, and dividing the V value of the converted data by the maximum possible value.
  • the similarity may be calculated after performing a second scaling process (second configuration).
  • the conversion data and the teacher data may include an H value (fourth configuration).
  • a first discrimination color determining unit configured to determine a color corresponding to the maximum similarity among the calculated degrees of similarity as a discrimination color ( 75) (fifth configuration).
  • the teacher data includes a plurality of groups of data of various colors
  • the color discrimination device (7) includes a second discrimination color determination unit (75) configured to determine a discrimination color based on a majority vote of colors corresponding to the higher similarity among the calculated similarities. It is good also as a structure further provided (6th structure).
  • the notification is configured to output a notification signal including a warning when the maximum similarity among the calculated similarities is less than or equal to a threshold value. It is also possible to have a configuration further including an output section (75) (seventh configuration).
  • a color discrimination system (8) includes a color discrimination device (7) having any of the above configurations; a light source (6) that irradiates the measurement (3) with white light; a color sensor (5) that receives the reflected light reflected by the measurement object and outputs the R component detection value, the G component detection value, and the B component detection value, each of which is a first predetermined bit; (eighth configuration).
  • the color discrimination device (7) detects each of the R component detection value, the G component detection value, and the B component detection value measured in advance by the color sensor for a plurality of types of measurement objects. Based on the maximum value, each of the R component detection value, the G component detection value, and the B component detection value output from the color sensor is set to a second predetermined bit number whose number of bits is smaller than the first predetermined bit number. It is also possible to have a configuration including a bit conversion section (71) that converts into a detected value (ninth configuration).
  • an image forming apparatus (10) includes a color discrimination system (8) having the eighth or ninth configuration, and the measurement object is a sheet of paper (P). (10th configuration).
  • the invention disclosed herein can be used, for example, for color discrimination in various devices.
  • Measurement object 4 Board 5 Color sensor 6 White LED 7 Microcomputer 8 Color discrimination system 9
  • Display device 10 Image forming device 31 First measurement object 32 Second measurement object 51A, 51B, 51C Light receiving element 52A, 52B, 52C AD converter 53 Logic circuit 54 Infrared cutoff filter 55A Red light transmission filter 55B Green light transmission filter 55C Blue light transmission filter 71 8-bit conversion unit 72 HSV conversion unit 73 Teacher data storage unit 74 Similarity calculation unit 75 Notification output unit 101 Paper feed tray P Paper R Resistor SW Switch

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

A color discernment device (7) comprises: an HSV conversion unit (72) configured so as to convert, to conversion data of an S value and/or V value in the HSV color space, RGB data based on an R component detection value, G component detection value, and B component detection value output from a color sensor (5); a training data retention unit (73) configured so as to retain training data including the S value and/or V value in addition to the RGB values; and a similarity calculation unit (74) configured so as to calculate, on the basis of the RGB data, the conversion data, and the training data, the similarity between the training data and a color measured by the color sensor.

Description

色判別装置、色判別システム、および画像形成装置Color discrimination device, color discrimination system, and image forming device
 本開示は、色判別装置に関する。 The present disclosure relates to a color discrimination device.
 従来、光の色成分(RGB)を検出するカラーセンサが知られている(例えば特許文献1)。 Conventionally, color sensors that detect color components (RGB) of light are known (for example, Patent Document 1).
特開2020-129756号公報JP2020-129756A
 上記カラーセンサは、安価であるため、例えばウェアラブル機器などに搭載するのに適しているが、当該カラーセンサを用いて色を十分な精度で判別する技術が要望されている。 Since the color sensor is inexpensive, it is suitable for being installed in, for example, wearable devices, but there is a need for a technology that uses the color sensor to discriminate colors with sufficient accuracy.
 本開示は、カラーセンサを用いて対象物の色を十分な精度で判別することが可能となる色判別装置を提供することを目的とする。 An object of the present disclosure is to provide a color discrimination device that can discriminate the color of an object with sufficient accuracy using a color sensor.
 本開示の一側面に係る色判別装置は、カラーセンサから出力されるR成分検出値、G成分検出値、およびB成分検出値に基づくRGBデータを、HSV色空間におけるS値とV値のうち少なくとも一方の変換データに変換するように構成されるHSV変換部と、
 RGB値に加えてS値とV値のうち少なくとも一方を含む教師データを保持するように構成される教師データ保持部と、
 前記RGBデータ、前記変換データ、および前記教師データに基づき前記カラーセンサにより測定された色と前記教師データとの類似度を算出するように構成される類似度算出部と、を備える構成としている。
A color discrimination device according to one aspect of the present disclosure uses RGB data based on an R component detection value, a G component detection value, and a B component detection value output from a color sensor, among S values and V values in an HSV color space. an HSV converter configured to convert into at least one type of converted data;
a teacher data holding unit configured to hold teacher data including at least one of an S value and a V value in addition to RGB values;
The apparatus further includes a similarity calculating section configured to calculate a degree of similarity between the color measured by the color sensor and the teacher data based on the RGB data, the conversion data, and the teacher data.
 本開示に係る色判別装置によれば、カラーセンサを用いて対象物の色を十分な精度で判別することが可能となる。 According to the color discrimination device according to the present disclosure, it is possible to discriminate the color of an object with sufficient accuracy using a color sensor.
図1は、色判別システムの構成例を示す図である。FIG. 1 is a diagram showing an example of the configuration of a color discrimination system. 図2は、カラーセンサの構成例を示す図である。FIG. 2 is a diagram showing an example of the configuration of a color sensor. 図3は、測定対象物の基板に対する位置関係の一例を示す図である(基板面に平行な方向に視た図)。FIG. 3 is a diagram illustrating an example of the positional relationship of the measurement target with respect to the substrate (viewed in a direction parallel to the substrate surface). 図4は、測定対象物の基板に対する位置関係の一例を示す図である(基板面に垂直な方向に視た図)。FIG. 4 is a diagram illustrating an example of the positional relationship of the measurement target with respect to the substrate (viewed in a direction perpendicular to the substrate surface). 図5は、RGB成分検出値の8ビット変換の結果例を示す表である。FIG. 5 is a table showing an example of the results of 8-bit conversion of RGB component detection values. 図6は、マイコンにおける色判別装置としての機能部を示すブロック図である。FIG. 6 is a block diagram showing a functional unit as a color discrimination device in a microcomputer. 図7は、教師データ、スケーリング処理後の教師データ、および算出された類似度の一例を示す表である。FIG. 7 is a table showing an example of teacher data, teacher data after scaling processing, and calculated similarity. 図8は、図7と同様のマンセル表示系における各色の教師データを3つのグループで用意した場合の類似度算出例を示す表である。FIG. 8 is a table showing an example of similarity calculation when three groups of training data for each color are prepared in the Munsell display system similar to that shown in FIG. 図9は、画像形成装置の概略的な構成例を示す図である。FIG. 9 is a diagram illustrating a schematic configuration example of an image forming apparatus.
 以下に本発明の例示的な実施形態について図面を参照して説明する。 Exemplary embodiments of the present invention will be described below with reference to the drawings.
<1.色検出装置の構成>
 図1は、色判別システムの構成例を示す図である。図1に示すように、色判別システム8は、基板4と、カラーセンサ5と、白色LED(light  emitting  diode)6と、マイコン7と、スイッチSWと、抵抗Rと、を有している。カラーセンサ5、白色LED6、スイッチSW、および抵抗Rは、基板4に実装される。電源電圧VCCから色判別システム8の各部に電力が供給される。
<1. Configuration of color detection device>
FIG. 1 is a diagram showing an example of the configuration of a color discrimination system. As shown in FIG. 1, the color discrimination system 8 includes a substrate 4, a color sensor 5, a white LED (light emitting diode) 6, a microcomputer 7, a switch SW, and a resistor R. The color sensor 5, white LED 6, switch SW, and resistor R are mounted on the substrate 4. Power is supplied to each part of the color discrimination system 8 from the power supply voltage VCC.
 白色LED6は、白色光を発光するチップLEDである。スイッチSWおよび抵抗Rは、電源電圧VCCによって白色LED6に電流が流れる経路に配置される。スイッチSWは、マイコン7によりオンオフを制御される。スイッチSWのオンオフにより、白色LED6の発光・消灯を切り替えることができる。抵抗Rは、白色LED6に流れる電流を制限し、白色光の光量を調整する。 The white LED 6 is a chip LED that emits white light. The switch SW and the resistor R are arranged on a path through which current flows to the white LED 6 by the power supply voltage VCC. The switch SW is turned on and off by the microcomputer 7. By turning the switch SW on and off, the white LED 6 can be turned on and off. The resistor R limits the current flowing through the white LED 6 and adjusts the amount of white light.
 カラーセンサ5は、光の色成分を検出可能なセンサICである。上記色成分は、具体的には、R成分(赤色成分)、G成分(緑色成分)、B成分(青色成分)である。マイコン7によりスイッチSWがオン状態とされることで白色LED6は白色光を発光する。白色LED6は、白色光を測定対象物に照射する。カラーセンサ5は、測定対象物で反射された光を受光して色成分を検出する。カラーセンサ5は、検出した色成分をデジタルデータとしてマイコン7へ出力する。カラーセンサ5が出力するデジタルデータは、例えば16ビットデータである。マイコン7は、カラーセンサ5から取得した16ビットデータのRGB成分各検出値を例えば8ビットデータに変換する。 The color sensor 5 is a sensor IC that can detect color components of light. Specifically, the color components are an R component (red component), a G component (green component), and a B component (blue component). When the switch SW is turned on by the microcomputer 7, the white LED 6 emits white light. The white LED 6 irradiates the object to be measured with white light. The color sensor 5 receives the light reflected by the object to be measured and detects the color component. The color sensor 5 outputs the detected color components to the microcomputer 7 as digital data. The digital data output by the color sensor 5 is, for example, 16-bit data. The microcomputer 7 converts each detection value of the RGB components of the 16-bit data acquired from the color sensor 5 into, for example, 8-bit data.
<2.カラーセンサの構成>
 図2は、カラーセンサ5の構成例を示す図である。図2に示すカラーセンサ5は、受光素子51A,51B,51Cと、ADC(ADコンバータ)52A,52B,52Cと、ロジック回路53と、赤外線遮断フィルタ54と、赤色光透過フィルタ55Aと、緑色光透過フィルタ55Bと、青色光透過フィルタ55Cと、を有している。
<2. Color sensor configuration>
FIG. 2 is a diagram showing an example of the configuration of the color sensor 5. As shown in FIG. The color sensor 5 shown in FIG. 2 includes light receiving elements 51A, 51B, 51C, ADCs (AD converters) 52A, 52B, 52C, a logic circuit 53, an infrared cutoff filter 54, a red light transmission filter 55A, and a green light transmission filter 55A. It has a transmission filter 55B and a blue light transmission filter 55C.
 受光素子51Aは、赤外線遮断フィルタ54および赤色光透過フィルタ55Aを介して入射される赤色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子51Aは、入力光のR成分(赤色成分)を検出する。 The light receiving element 51A generates an analog current signal according to the amount of red light incident through the infrared cutoff filter 54 and the red light transmission filter 55A. That is, the light receiving element 51A detects the R component (red component) of the input light.
 受光素子51Bは、赤外線遮断フィルタ54および緑色光透過フィルタ55Bを介して入射される緑色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子51Bは、入力光のG成分(緑色成分)を検出する。 The light receiving element 51B generates an analog current signal according to the amount of green light incident through the infrared cutoff filter 54 and the green light transmission filter 55B. That is, the light receiving element 51B detects the G component (green component) of the input light.
 受光素子51Cは、赤外線遮断フィルタ54および青色光透過フィルタ55Cを介して入射される青色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子51Cは、入力光のB成分(青色成分)を検出する。 The light receiving element 51C generates an analog current signal according to the amount of blue light incident through the infrared cutoff filter 54 and the blue light transmission filter 55C. That is, the light receiving element 51C detects the B component (blue component) of the input light.
 上記の受光素子51A,51B,51Cとしては、それぞれ、フォトダイオードあるいはフォトトランジスタなどを好適に用いることができる。 A photodiode, a phototransistor, or the like can be suitably used as each of the above light receiving elements 51A, 51B, and 51C.
 ADC52A,52B,52Cは、受光素子51A,51B,51Cからのアナログ電流信号を例えば16ビットのデジタルデータに変換して出力する。 The ADCs 52A, 52B, and 52C convert the analog current signals from the light receiving elements 51A, 51B, and 51C into, for example, 16-bit digital data and output the converted data.
 赤外線遮断フィルタ54は、赤色光透過フィルタ55A、緑色光透過フィルタ55B、および、青色光透過フィルタ55Cそれぞれの上流側で、入力光に含まれる赤外線成分IRを遮断する。このような赤外線遮断フィルタ54を設けることにより、RGB成分を精度良く検出することができる。 The infrared blocking filter 54 blocks the infrared component IR contained in the input light on the upstream side of each of the red light transmitting filter 55A, the green light transmitting filter 55B, and the blue light transmitting filter 55C. By providing such an infrared cutoff filter 54, RGB components can be detected with high accuracy.
 ロジック回路53は、ADCロジック機能(=ADCの時分割制御機能)、および、I2Cインターフェイス機能(=データ信号SDAとクロック信号SCLの通信機能)を備えている。ロジック回路53は、ADC52A,52B,52Cから出力されるRGB成分検出信号としてのデジタルデータをI2C通信によってマイコン7に送出する。 The logic circuit 53 has an ADC logic function (=ADC time division control function) and an I 2 C interface function (=communication function of data signal SDA and clock signal SCL). The logic circuit 53 sends digital data as RGB component detection signals outputted from the ADCs 52A, 52B, and 52C to the microcomputer 7 through I 2 C communication.
<3.測定対象物の位置>
 図3および図4は、測定対象物3の基板4に対する位置関係の一例を示す図である。なお、図3は、測定対象物3を基板4の基板面に平行な方向Xに視た状態の図である。図4は、基板4の基板面に垂直な方向Y(以下、単に垂直方向)に視た状態の図である。測定対象物3は、第1測定対象31と、第2測定対象32と、から構成される。所定の色の第2測定対象32に対して第1測定対象31は種々の色を採りうる。色判別システム8は、測定対象物3のうち第1測定対象31の色を検出することを目的としている。なお、第1測定対象31および第2測定対象32の配置関係および形状などは図3および図4に示すものに限らない。
<3. Position of measurement target>
3 and 4 are diagrams showing an example of the positional relationship of the measurement object 3 with respect to the substrate 4. Note that FIG. 3 is a diagram of the measurement object 3 viewed in a direction X parallel to the substrate surface of the substrate 4. As shown in FIG. FIG. 4 is a diagram of the substrate 4 viewed in the direction Y (hereinafter simply referred to as the vertical direction) perpendicular to the substrate surface. The measurement object 3 includes a first measurement object 31 and a second measurement object 32. The first measurement object 31 can take on various colors while the second measurement object 32 has a predetermined color. The color discrimination system 8 is intended to detect the color of the first measurement object 31 among the measurement objects 3 . Note that the arrangement relationship and shape of the first measurement object 31 and the second measurement object 32 are not limited to those shown in FIGS. 3 and 4.
 図3に矢印で示すように、白色LED6により白色光を測定対象物3に照射して、測定対象物3での反射光をカラーセンサ5により受光する。 As shown by the arrow in FIG. 3, the white LED 6 irradiates the measurement object 3 with white light, and the color sensor 5 receives the reflected light from the measurement object 3.
 また、図4に示すように、白色LED6を垂直方向に測定対象物3に投影した面は、第1測定対象31と重なる。これにより、白色LED6により白色光を第1測定対象31に照射して、第1測定対象31での反射光をカラーセンサ5により受光させることができる。なお、図4に示すように、白色LED6を垂直方向に測定対象物3に投影した面は、第2測定対象32とも重なる。これにより、白色LED6による白色光は第2測定対象32にも照射されて、第2測定対象32での反射光がカラーセンサ5により受光される。従って、カラーセンサ5による第1測定対象31の色検出は第2測定対象32の色も加味して行われる。なお、白色LED6を垂直方向に測定対象物3に投影した面が測定対象物3のうち第1測定対象31のみに重なるようにしてもよい。この場合、第2測定対象32は、測定対象とはならず、第1測定対象31以外の部位に相当し、第1測定対象31と上記部位とのうち第1測定対象31のみに白色光が照射される。 Further, as shown in FIG. 4, the surface of the white LED 6 projected onto the measurement object 3 in the vertical direction overlaps with the first measurement object 31. Thereby, the white LED 6 can irradiate the first measurement object 31 with white light, and the color sensor 5 can receive the reflected light from the first measurement object 31. Note that, as shown in FIG. 4, the surface of the white LED 6 projected onto the measurement object 3 in the vertical direction also overlaps with the second measurement object 32. As a result, the white light from the white LED 6 is also applied to the second measurement object 32, and the reflected light from the second measurement object 32 is received by the color sensor 5. Therefore, the color detection of the first measurement object 31 by the color sensor 5 is performed with the color of the second measurement object 32 also taken into account. Note that the surface of the white LED 6 vertically projected onto the object to be measured 3 may overlap only the first object to be measured 31 of the object to be measured 3 . In this case, the second measurement target 32 is not a measurement target, but corresponds to a part other than the first measurement target 31, and the white light is applied only to the first measurement target 31 among the first measurement target 31 and the above-mentioned part. irradiated.
 また、図3に示す白色LED6と測定対象物3との間の垂直方向の距離L1は、カラーセンサ5での受光される光が白っぽくなりすぎず、かつ黒っぽくなりすぎないような距離が望ましい。また、設計により上記距離L1を短くせざるを得ない場合は、抵抗Rにより白色LED6の光量を制限して調整することができる。なお、抵抗Rは、可変抵抗であってもよい。 Further, the vertical distance L1 between the white LED 6 and the measurement object 3 shown in FIG. 3 is preferably such a distance that the light received by the color sensor 5 does not become too whitish or too black. Furthermore, if the distance L1 has to be shortened due to design, the amount of light from the white LED 6 can be limited and adjusted using the resistor R. Note that the resistor R may be a variable resistor.
 また、図3に示す白色LED6とカラーセンサ5との間の基板面に沿う方向の距離L2は、白色光が直接カラーセンサ5により受光される量を抑えるような距離が望ましい。なお、白色LED6とカラーセンサ5との間に白色光を遮蔽するための壁を設けてもよい。 Further, the distance L2 in the direction along the substrate surface between the white LED 6 and the color sensor 5 shown in FIG. 3 is preferably a distance that suppresses the amount of white light directly received by the color sensor 5. Note that a wall may be provided between the white LED 6 and the color sensor 5 to block white light.
 なお、白色LED6とカラーセンサ5を同じ基板4に実装させることで、白色LED6、カラーセンサ5、および測定対象物3の位置関係のばらつきを抑制できる。 Note that by mounting the white LED 6 and the color sensor 5 on the same substrate 4, variations in the positional relationship between the white LED 6, the color sensor 5, and the object to be measured 3 can be suppressed.
<4.色検出方法>
 ここで、色判別システム8による色検出方法について説明する。ここで、あらかじめ、各種の色を有する第1測定対象31を用意して、第1測定対象31ごとに白色LEDにより白色光を照射し、反射光をカラーセンサにより受光させ、カラーセンサによりRGB成分を検出させる。
<4. Color detection method>
Here, a color detection method using the color discrimination system 8 will be explained. Here, first measurement objects 31 having various colors are prepared in advance, white light is irradiated by a white LED for each first measurement object 31, the reflected light is received by a color sensor, and RGB components are detected by the color sensor. to be detected.
 図5には、一例としてA~Nまでの色を有する第1測定対象31を用意して、各第1測定対象31について上記のようにカラーセンサにより色成分検出を行った結果を示す。図5に示す「カラーセンサ値」が第1測定対象31ごとの検出されたRGB成分検出値を示している。当該RGB成分検出値は、それぞれ16ビット(0から65535)の値である。なお、図5に示す「カラーセンサ値」は、先述したように第1測定対象31に加えて第2測定対象32の色も加味された値となっている。 FIG. 5 shows, as an example, the results of preparing first measurement objects 31 having colors A to N and performing color component detection on each first measurement object 31 using a color sensor as described above. “Color sensor value” shown in FIG. 5 indicates the RGB component detection value detected for each first measurement object 31. The RGB component detection values are each 16-bit (0 to 65535) values. Note that the "color sensor value" shown in FIG. 5 is a value that takes into account the color of the second measurement object 32 in addition to the first measurement object 31, as described above.
 そして、このようにあらかじめカラーセンサにより測定されたRGB成分検出値のRGB成分ごとの最大値を求める。求められたRGB成分ごとの各最大値をマイコン7に、あらかじめ記憶させる。 Then, the maximum value for each RGB component of the RGB component detection values measured in advance by the color sensor in this way is determined. The obtained maximum values for each RGB component are stored in the microcomputer 7 in advance.
 そして、マイコン7は、第1測定対象31に白色LED6により白色光を照射させ、第1測定対象31での反射光をカラーセンサ5に受光させてRGB成分を検出する。そして、マイコン7は、カラーセンサ5から出力されるRGB成分検出値(各成分16ビットデジタルデータ)をRGB各成分の8ビットデータに変換する(なお、当該変換は、後述する図6に示すマイコン7における8ビット変換部71により行われる)。 Then, the microcomputer 7 causes the white LED 6 to irradiate the first measurement object 31 with white light, causes the color sensor 5 to receive the reflected light from the first measurement object 31, and detects the RGB components. The microcomputer 7 then converts the RGB component detection values (16-bit digital data for each component) output from the color sensor 5 into 8-bit data for each RGB component (this conversion is performed by the microcomputer shown in FIG. 6, which will be described later). 7).
 このとき、各成分の上記最大値が8ビットの最大値である255に相当するとし、上記最大値とカラーセンサ5から出力されるRGB成分検出値との比率に基づき、RGB成分検出値を8ビットの値に変換する。すなわち、下記(1)式に基づいて8ビットへの検出値の変換が行われる。
 DET*(8bit)=255×(DET*(16bit)/MAX*)   (1)
 ただし、DET*(8bit):8ビット変換後の検出値、DET*(16bit):16ビットの検出値、MAX:あらかじめ取得される最大値、*:R,G,Bのいずれかの成分
At this time, assume that the maximum value of each component corresponds to 255, which is the maximum value of 8 bits, and based on the ratio between the maximum value and the RGB component detection value output from the color sensor 5, the RGB component detection value is set to 8 bits. Convert to bit value. That is, the detection value is converted into 8 bits based on the following equation (1).
DET *(8bit) = 255×(DET *(16bit) /MAX * ) (1)
However, DET *(8bit) : Detected value after 8-bit conversion, DET *(16bit) : 16-bit detected value, MAX: Maximum value obtained in advance, *: Any component of R, G, or B
 図5の例では、カラーセンサ5によるRGB成分検出値の各成分の各最大値は、「2100」、「5150」、「2710」である。この最大値を用いて上記(1)式に基づき、各第1測定対象31について8ビットの検出値に変換した値を図5に示す(図5の「8ビット変換後」)。 In the example of FIG. 5, the maximum values of each component of the RGB component detection value by the color sensor 5 are "2100", "5150", and "2710". Using this maximum value, values converted into 8-bit detection values for each first measurement object 31 based on the above equation (1) are shown in FIG. 5 ("after 8-bit conversion" in FIG. 5).
 ここで仮に、第1測定対象31の基準となる白色が存在する場合は、あらかじめ当該白色の第1測定対象31に白色光を照射して反射光をカラーセンサ5により受光することで測定されるRGB成分検出値を基準の白色とすることができる。すなわち、上記で得られるRGB成分の各検出値が255に相当するとして、カラーセンサ5による検出値を8ビットの検出値に変換することができる。 Here, if there is a white color that serves as a reference for the first measurement object 31, the white first measurement object 31 is irradiated with white light in advance and the reflected light is received by the color sensor 5 to be measured. The RGB component detection values can be used as the reference white color. That is, assuming that each detected value of the RGB components obtained above corresponds to 255, the detected value by the color sensor 5 can be converted into an 8-bit detected value.
 本実施形態によれば、基準白色が定められていない場合でも、先述のように求められるRGB成分検出値の各最大値で表される色を仮想的な基準の白色として、8ビットの検出値への変換が可能となる。 According to the present embodiment, even if the reference white color is not determined, the color represented by the maximum value of the RGB component detection values obtained as described above is set as the virtual reference white color, and the 8-bit detection value is set as the virtual reference white color. It becomes possible to convert to
 また、次のような色検出方法の変形例を実施してもよい。ここでは、先述のようにあらかじめカラーセンサにより測定されたRGB成分検出値の各成分の最大値を求めるとともに、各成分の最小値も求め、求めた最小値をマイコン7に記憶させる。 Additionally, the following modification of the color detection method may be implemented. Here, as described above, the maximum value of each component of the RGB component detection values measured in advance by the color sensor is determined, and the minimum value of each component is also determined, and the determined minimum value is stored in the microcomputer 7.
 そして、マイコン7は、第1測定対象31についてカラーセンサ5により検出されたRGB成分検出値(16ビットデータ)を8ビットの検出値に変換する。この場合、各成分の上記最大値が8ビットの最大値である255に相当し、各成分の上記最小値が8ビットの所定最小値に相当するとし、カラーセンサ5から出力されるRGB成分検出値を8ビットの値に変換する。すなわち、下記(2)式に基づいて8ビットへの検出値の変換が行われる。
 DET*(8bit)=(DET*(16bit)-MIN*)×(255-min)/(MAX*-MIN*)+min   (2)
 ただし、DET*(8bit):8ビット変換後の検出値、DET*(16bit):16ビットの検出値、MAX:あらかじめ取得される最大値、MIN:あらかじめ取得される最小値、*:R,G,Bのいずれかの成分、min:8ビットの所定最小値
Then, the microcomputer 7 converts the RGB component detection value (16-bit data) detected by the color sensor 5 for the first measurement object 31 into an 8-bit detection value. In this case, it is assumed that the maximum value of each component corresponds to 255, which is the maximum value of 8 bits, and the minimum value of each component corresponds to a predetermined minimum value of 8 bits, and the RGB components output from the color sensor 5 are detected. Convert the value to an 8-bit value. That is, the detection value is converted into 8 bits based on the following equation (2).
DET * (8bit) = (DET * (16bit) - MIN * ) × (255 - min) / (MAX * - MIN * ) + min (2)
However, DET *(8bit) : Detection value after 8-bit conversion, DET *(16bit) : 16-bit detection value, MAX: Maximum value obtained in advance, MIN: Minimum value obtained in advance, *: R, Either component of G or B, min: predetermined minimum value of 8 bits
 ここで、上記8ビットの所定最小値は0としてもよいが、この場合、色が暗くなりすぎてしまう可能性がある。そこで、上記8ビットの所定最小値は、人の目から見て実際の色に近い値を得られるように、色見本の黒色をもとに設定することが望ましい。例えば、色見本としてTOCOL  fan deck -  Aを使用し、当該色見本の黒色(No.159)(R=47 G=47 B=46)をもとにすれば、上記8ビットの所定最小値は50付近の値とすることができる。具体的には、45から55までの値とすればよい。 Here, the predetermined minimum value of the 8 bits may be set to 0, but in this case, the color may become too dark. Therefore, it is desirable to set the above-mentioned 8-bit predetermined minimum value based on the black color of the color sample so that a value close to the actual color as seen by the human eye can be obtained. For example, if you use TOCOL fan deck - A as a color sample and based on the black color (No. 159) (R=47 G=47 B=46) of the color sample, the predetermined minimum value of the above 8 bits is The value can be around 50. Specifically, the value may be between 45 and 55.
 このように、仮想的な基準の白色に加えて、RGB成分検出値の各最小値で表される色を仮想的な基準の黒色として、8ビットの検出値への変換が可能となる。 In this way, in addition to the virtual reference white, the color represented by each minimum value of the RGB component detection values is used as the virtual reference black, and conversion to an 8-bit detection value is possible.
<5.色判別方法>
 従来、色判別を行う方法としては、例えばRGB色空間から絶対色空間L*a*b*へ変換し、絶対色差ΔEを用いて色判別を行う方法が知られている。しかしながら、当該方法では、高感度のカメラおよび特定の色光源が必要であったり、複雑な計算あるいは変換テーブル(メモリ)が必要になることもあり、安価なセンサで色判別を行う用途には合わない。また、色判別は外光の影響が大きく、従来では遮光対策を万全にする必要があり、現実的に色判別技術を組み込むことが難しい製品も存在していた。
<5. Color discrimination method>
Conventionally, as a method for performing color discrimination, a method is known in which, for example, an RGB color space is converted to an absolute color space L*a*b*, and color discrimination is performed using an absolute color difference ΔE. However, this method requires a highly sensitive camera and a specific color light source, as well as complex calculations or conversion tables (memory), making it unsuitable for color discrimination using inexpensive sensors. do not have. Furthermore, color discrimination is greatly affected by external light, and conventionally it has been necessary to take thorough measures to block light, making it difficult to incorporate color discrimination technology into some products.
 そこで、本開示に係る色判別方法によれば、安価なカラーセンサ5と低電力消費のマイコン7を用いても、実用的に十分な精度の色判別を行うことを可能としている。以下、本開示に係る色判別方法について、具体的に説明する。 Therefore, according to the color discrimination method according to the present disclosure, it is possible to perform color discrimination with sufficient accuracy for practical use even when using an inexpensive color sensor 5 and a microcomputer 7 with low power consumption. The color discrimination method according to the present disclosure will be specifically described below.
<5-1.色判別装置の構成>
 図6は、マイコン7における色判別装置としての機能部を示すブロック図である。図6に示すマイコン7は、8ビット変換部71と、HSV変換部72と、教師データ保持部73と、類似度算出部74と、通知出力部75と、を備える。
<5-1. Configuration of color discrimination device>
FIG. 6 is a block diagram showing a functional section of the microcomputer 7 as a color discrimination device. The microcomputer 7 shown in FIG. 6 includes an 8-bit conversion section 71, an HSV conversion section 72, a teacher data holding section 73, a similarity calculation section 74, and a notification output section 75.
 8ビット変換部71は、カラーセンサ5から出力される16ビットデジタルデータのRGB検出値データRGB(16)を8ビットデータのRGB検出値データRGB(8)に変換するよう構成される。ここでのビット変換は、先述したように仮想的な基準の白色を用いて行われる。ただし、本開示に係る色判別を実施するためには、先述したように仮想的な基準の黒色を用いてビット変換を行ってもよい。また、必ずしも仮想的な基準の白色を用いずに、あらかじめ準備される基準の白色をカラーセンサ5により測定した場合の検出値に基づきビット変換を行うようにしてもよい。同様に、あらかじめ準備される基準の黒色を用いてもよい。また、カラーセンサ5から8ビットの検出値が出力される場合は、マイコン7において8ビット変換部71を設けなくてもよい。 The 8-bit conversion unit 71 is configured to convert RGB detection value data RGB (16) of 16-bit digital data output from the color sensor 5 into RGB detection value data RGB (8) of 8-bit data. The bit conversion here is performed using the virtual reference white color, as described above. However, in order to perform color discrimination according to the present disclosure, bit conversion may be performed using virtual reference black as described above. Furthermore, the bit conversion may be performed based on a detected value obtained by measuring a reference white prepared in advance using the color sensor 5, without necessarily using a virtual reference white. Similarly, a standard black color prepared in advance may be used. Further, when the color sensor 5 outputs an 8-bit detection value, the 8-bit converter 71 does not need to be provided in the microcomputer 7.
 HSV変換部72は、8ビット変換部71から出力される8ビットデータのRGB検出値データRGB(8)をHSV色空間におけるS値およびV値に変換するように構成される。HSV色空間は、色相H(Hue)、彩度S(Saturation)、明度V(Value)の三つの成分からなる色空間である。 The HSV converter 72 is configured to convert the 8-bit RGB detection value data RGB (8) output from the 8-bit converter 71 into S and V values in the HSV color space. The HSV color space is a color space consisting of three components: hue H (Hue), saturation S (Saturation), and brightness V (Value).
 RGB空間からHSV色空間への変換は、以下のように行うことができる。
 Imax=Max(R,G,B)
 Imin=Min(R,G,B)とすると、
R=Imaxのとき、
 H=60×(G-B)/(Imax-Imin)
G=Imaxのとき、
 H=60×(B-R)/(Imax-Imin)+120
B=Imaxのとき、
 H=60×(R-G)/(Imax-Imin)+240
 S=(Imax-Imin)/Imax
 V=Imax
Conversion from RGB space to HSV color space can be performed as follows.
Imax=Max(R,G,B)
If Imin=Min(R,G,B),
When R=Imax,
H=60×(GB)/(Imax-Imin)
When G=Imax,
H=60×(BR)/(Imax-Imin)+120
When B=Imax,
H=60×(RG)/(Imax-Imin)+240
S=(Imax-Imin)/Imax
V=Imax
 これにより、H値は0~360の値を、S値は0~1の値を、V値は0~255の値をとりうる。
 HSV変換部72は、HSV色空間の値のうちS値およびV値のみを算出し、算出結果をSV値データSVとして出力する。なお、HSV変換部72は、H値を算出してもよい。
As a result, the H value can take a value from 0 to 360, the S value can take a value from 0 to 1, and the V value can take a value from 0 to 255.
The HSV conversion unit 72 calculates only the S value and the V value among the values in the HSV color space, and outputs the calculation results as SV value data SV. Note that the HSV conversion unit 72 may calculate the H value.
 教師データ保持部73は、あらかじめ教師データが保持される記憶回路である。教師データは、各種の色ごとのRGB値およびSV値から構成される。カラーセンサ5により測定された検出値との類似度が高い教師データの色が、測定された色(測定対象物の色)として判別される。 The teacher data holding unit 73 is a storage circuit in which teacher data is held in advance. The teacher data is composed of RGB values and SV values for each color. The color of the teacher data that has a high degree of similarity to the detection value measured by the color sensor 5 is determined as the measured color (color of the measurement object).
 類似度算出部74は、RGB検出値データRGB(8)、SV値データSV、および教師データDtに基づき類似度を算出し、算出結果を類似度データDsとして出力する。上記類似度は、カラーセンサ5により測定された色と教師データが表す色との類似度を表す指標である。従って、類似度は、教師データが表す各種の色ごとに算出することが可能である。 The similarity calculation unit 74 calculates the similarity based on the RGB detection value data RGB (8) , the SV value data SV, and the teacher data Dt, and outputs the calculation result as similarity data Ds. The degree of similarity is an index representing the degree of similarity between the color measured by the color sensor 5 and the color represented by the teacher data. Therefore, the degree of similarity can be calculated for each color represented by the teacher data.
 通知出力部75は、類似度データDsに基づき、色判別された色などを通知するための通知信号Snを出力する。 The notification output unit 75 outputs a notification signal Sn for notifying the determined color based on the similarity data Ds.
 表示装置9は、マイコン7の外部に設けられ、通知信号Snに基づき、色判別された色などの情報を表示する。なお、表示装置9の代わりに、通知信号Snに基づき音声を発生するスピーカなどとしてもよい。 The display device 9 is provided outside the microcomputer 7 and displays information such as the determined color based on the notification signal Sn. Note that instead of the display device 9, a speaker or the like that generates sound based on the notification signal Sn may be used.
<5-2.類似度の算出方法>
 ここで、類似度の算出方法の一例について説明する。RGB検出値データRGB(8)、およびSV値データSVからなる第1ベクトルをA、教師データDtからなる第2ベクトルをBとすると、AとBの内積は、下記(3)式のように表される。
 A・B=|A||B|cosθ  (3)
<5-2. How to calculate similarity>
Here, an example of a method for calculating similarity will be described. Assuming that the first vector consisting of RGB detection value data RGB (8) and SV value data SV is A, and the second vector consisting of teacher data Dt is B, the inner product of A and B is as shown in equation (3) below. expressed.
A・B=|A||B|cosθ (3)
 ここで、第1ベクトルAと第2ベクトルBを成分表示すると、
 A=(RA,GA,BA,SA,VA)、B=(RB,GB,BB,SB,VB)となる。
 ただし、
 RA:RGB検出値データRGB(8)のR検出値、GA:RGB検出値データRGB(8)のG検出値、BA,:RGB検出値データRGB(8)のB検出値、SA:SV値データSVのS値、VA:SV値データSVのV値
 RB:教師データDtのR値、GB:教師データDtのG値、BB,:教師データDtのB値、SB:教師データDtのS値、VB:教師データDtのV値
Here, when the first vector A and the second vector B are expressed as components,
A=(R A , G A , B A , S A , V A ), B=(R B , G B , B B , S B , V B ).
however,
R A : RGB detection value data RGB (8) R detection value, G A : RGB detection value data RGB (8) G detection value, B A , : RGB detection value data RGB (8) B detection value, S A : S value of SV value data SV, V A : V value of SV value data SV, R B : R value of teacher data Dt, G B : G value of teacher data Dt, B B ,: B value of teacher data Dt. , S B : S value of teacher data Dt, V B : V value of teacher data Dt
 従って、上記(3)式は、下記(4)式のように書き換えられる。
 cosθ=(A・B)/|A||B|
     =(RA・RB+GA・GB+BA・BB+SA・SB+VA・VB)/(√(RA 2+GA 2+BA 2+SA 2+VA 2)・√(RB 2+GB 2+BB 2+SB 2+VB 2))  (4)
Therefore, the above equation (3) can be rewritten as the following equation (4).
cosθ=(A・B)/|A||B|
=(R A・R B +G A・G B +B A・B B +S A・S B +V A・V B )/(√(R A 2 +G A 2 +B A 2 +S A 2 +V A 2 )・√ (R B 2 + G B 2 + B B 2 + S B 2 + V B 2 )) (4)
 上記(4)式により算出されるcosθの値が類似度として算出される。類似度は、1以下の値をとり、1に近いほど類似度が高いことを示す。 The value of cos θ calculated by the above equation (4) is calculated as the degree of similarity. The similarity takes a value of 1 or less, and the closer it is to 1, the higher the similarity.
 図7は、教師データDt、スケーリング処理後の教師データ、および算出された類似度の一例を示す表である。図7に示す教師データDtの色(5R、5YRなど)は、マンセル表示系の色としている。スケーリング処理は、R値、G値、B値、V値については、1以下の値となるように、とりうる最大値(ここでは256)で除することで行っている。S値については教師データの状態で1以下の値であるため、スケーリング処理は行っていない。このようにスケーリング処理を行うことで、R値、G値、B値、S値、V値の重みづけを均一化することができる。なお、S値を教師データに用いない場合は、R値、G値、B値、V値のスケーリング処理は行わなくても、重みづけは均一化される。 FIG. 7 is a table showing an example of the teacher data Dt, the teacher data after scaling processing, and the calculated similarity. The colors of the teacher data Dt shown in FIG. 7 (5R, 5YR, etc.) are Munsell display colors. The scaling process is performed by dividing the R value, G value, B value, and V value by the maximum possible value (256 in this case) so that the value becomes 1 or less. Since the S value is a value of 1 or less in the state of the teacher data, no scaling processing is performed. By performing the scaling process in this manner, it is possible to equalize the weighting of the R value, G value, B value, S value, and V value. Note that when the S value is not used as the teacher data, the weighting is equalized without performing scaling processing on the R value, G value, B value, and V value.
 また、類似度算出の際には、カラーセンサ5による測定結果に基づくRGB検出値データRGB(8)のR検出値、G検出値、およびB検出値と、SV値データSVのV値についても、教師データと同様にスケーリング処理が行われる。なお、教師データ保持部73には、スケーリング処理済の教師データが保持されていてもよい。 In addition, when calculating the similarity, the R detection value, G detection value, and B detection value of the RGB detection value data RGB (8) based on the measurement results by the color sensor 5 and the V value of the SV value data SV are also considered. , scaling processing is performed in the same way as the teacher data. Note that the teacher data holding unit 73 may hold teacher data that has been subjected to scaling processing.
 図7では、先述した(4)式による類似度の算出において、AおよびBの各成分値は、スケーリング処理後の値(ただしS値はスケーリング処理なし)を用いている。図7では、一例としてマンセル表示系における10YRの色をカラーセンサ5により測定し、その測定結果に基づき類似度を算出している(A=(RA,GA,BA,SA,VA)=(188,98,48,0.745,188))。図7に示すように、教師データの各色のうち、類似度=0.999となって類似度が最大となる5YRが、測定対象の色であると判別される。 In FIG. 7, in calculating the degree of similarity using equation (4) described above, each component value of A and B uses a value after scaling processing (however, the S value is not subjected to scaling processing). In FIG. 7, as an example, the color of 10YR in the Munsell display system is measured by the color sensor 5, and the degree of similarity is calculated based on the measurement result (A=(R A , G A , B A , S A , V A )=(188,98,48,0.745,188)). As shown in FIG. 7, among the colors of the teacher data, 5YR, which has the maximum similarity of 0.999, is determined to be the color to be measured.
 このように、本開示に係る色判別方法によれば、カラーセンサ5による測定結果が外光の影響を受けたとしても、RGB値に加えてSV値を用いて類似度を算出するため、精度の良い色判別を行うことが可能となる。従って、遮光対策を万全に行う必要がなくなる。また、安価なカラーセンサ5と低消費電力のマイコン7を用いて、実用的に十分な精度の色判別を行うことができる。光源としても、安価な白色LED6を用いることができる。従って、本開示に係る色判別方法は、特にウェアラブル機器などに好適なものとなる。 In this way, according to the color discrimination method according to the present disclosure, even if the measurement result by the color sensor 5 is affected by external light, the degree of similarity is calculated using the SV value in addition to the RGB values, so the accuracy can be improved. This makes it possible to perform good color discrimination. Therefore, there is no need to take thorough measures against light shielding. Further, by using an inexpensive color sensor 5 and a microcomputer 7 with low power consumption, color discrimination can be performed with sufficient accuracy for practical use. An inexpensive white LED 6 can also be used as the light source. Therefore, the color discrimination method according to the present disclosure is particularly suitable for wearable devices.
 なお、S値とV値のうち一方のみを用いて類似度を算出するようにしてもよい。または、S値とV値のうち少なくとも一方に加えて、H値を用いて類似度を算出するようにしてもよい。この場合、H値のスケーリング処理は、360で除することにより行えばよい。 Note that the similarity may be calculated using only one of the S value and the V value. Alternatively, the degree of similarity may be calculated using the H value in addition to at least one of the S value and the V value. In this case, the H value may be scaled by dividing by 360.
<5-3.通知出力方法>
 次に、通知出力部75における処理について述べる。通知出力部75は、例えば教師データの色ごとに算出された類似度のうち、最大の類似度に対応する色を判別色として決定し、決定された色を通知信号Snに含めて出力する。これにより、表示装置9において、上記色に関する情報が表示される。すなわち、通知出力部75は、判別色を決定する判別色決定部としても機能する。なお、通知出力部75は、上記決定された色に加えて、当該色に対応する類似度も通知信号Snに含めて出力してもよい。
<5-3. Notification output method>
Next, the processing in the notification output unit 75 will be described. The notification output unit 75 determines, for example, the color corresponding to the maximum similarity among the degrees of similarity calculated for each color of the teacher data as the discrimination color, and outputs the determined color included in the notification signal Sn. As a result, information regarding the color is displayed on the display device 9. That is, the notification output unit 75 also functions as a discrimination color determining unit that determines a discrimination color. Note that, in addition to the determined color, the notification output unit 75 may output the notification signal Sn by including the degree of similarity corresponding to the color.
 また、教師データは、外光環境の異なる複数のグループを用意してもよい。図8は、一例として、図7と同様のマンセル表示系における各色の教師データを3つのグループで用意した場合の類似度算出例を示す(便宜上、図8において具体的な値を省略している箇所がある)。この場合、図8に示すように、グループごとに各色に対応する類似度が算出される。 Furthermore, the teacher data may be prepared in multiple groups with different external light environments. As an example, FIG. 8 shows an example of similarity calculation when training data for each color in the Munsell display system similar to that shown in FIG. 7 is prepared in three groups (for convenience, specific values are omitted in FIG. 8). (There are some places) In this case, as shown in FIG. 8, the degree of similarity corresponding to each color is calculated for each group.
 通知出力部75は、例えば、上記のように算出された類似度のうち、最大の類似度に対応する色を判別色として決定し、決定された色を通知信号Snに含めて出力する。これにより、外光環境に応じた色を判別することができる。 For example, the notification output unit 75 determines, as the discrimination color, the color corresponding to the maximum degree of similarity among the degrees of similarity calculated as described above, and includes the determined color in the notification signal Sn and outputs it. Thereby, it is possible to discriminate colors according to the external light environment.
 また、通知出力部75は、例えば、上記のように算出された類似度のうち、上位3位の類似度を特定し、特定された類似度に対応する色の多数決により判別色を決定してもよい。例えば、上位3位の類似度に対応する色が、上位の順に5R、5YR、5YRであるとした場合、5Rの類似度が最大であるが、多数決として5YRが判別色として決定される。 In addition, the notification output unit 75 may, for example, identify the top three similarities among the similarities calculated as described above, and determine the discrimination color by a majority vote of the colors corresponding to the identified similarities. Good too. For example, if the colors corresponding to the top three similarities are 5R, 5YR, and 5YR in the top order, 5R has the highest similarity, but 5YR is determined as the discrimination color by majority vote.
 また、通知出力部75は、例えば、最大の類似度を特定するが、特定された類似度が閾値以下である場合、警告を通知信号Snに含めて出力してもよい。上記警告は、例えば、カラーセンサ5が汚れている可能性があるため、清掃するように使用者に促すなどの警告である。 Further, the notification output unit 75 may, for example, identify the maximum degree of similarity, and if the specified degree of similarity is less than or equal to a threshold value, it may include a warning in the notification signal Sn and output it. The above-mentioned warning is, for example, a warning that urges the user to clean the color sensor 5 because it may be dirty.
<6.画像形成装置への適用>
 以上説明したような色判別システム8は、様々なアプリケーションに適用が可能である。ここでは、アプリケーションの一例として、画像形成装置について説明する。画像形成装置において用紙の色判別を行うことができれば、判別結果に応じて適切な画像形成制御を行うことが可能となる。
<6. Application to image forming apparatus>
The color discrimination system 8 as described above can be applied to various applications. Here, an image forming apparatus will be described as an example of an application. If the image forming apparatus can determine the color of paper, it becomes possible to perform appropriate image formation control according to the determination result.
 図9は、画像形成装置の概略的な構成例を示す図である。図9に示す画像形成装置10は、給紙トレイ101を有し、給紙トレイ101に収容された用紙Pに対して画像形成を行って排出する。画像形成装置10は、図9に図示しない用紙搬送部、画像形成部、用紙排出部などを有している。また、画像形成方法は、インクジェット方式あるいはレーザー方式など方式は問わない。 FIG. 9 is a diagram showing a schematic configuration example of an image forming apparatus. The image forming apparatus 10 shown in FIG. 9 includes a paper feed tray 101, and performs image formation on the paper P stored in the paper feed tray 101 and discharges the paper P. The image forming apparatus 10 includes a paper transport section, an image forming section, a paper discharge section, etc. which are not shown in FIG. Further, the image forming method may be an inkjet method or a laser method.
 図9の例では、基板4を給紙トレイ101に収容された用紙Pの上方に配置させている。これにより、白色LED6により白色光を用紙Pに照射させ、用紙Pでの反射光をカラーセンサ5により受光することができる。そして、マイコン7(図9で図示せず)により、カラーセンサ5によるRGB成分検出値は、8ビットの検出値に変換される。この場合、用紙Pの基準の白色が指定されていない場合であっても、先述した実施形態のような方法を用いることにより、仮想的な基準の白色に基づいた色検出を行うことができる。なお、基板4の配置は、図9の例に限らず、例えば、用紙搬送路の途中に配置してもよい。 In the example of FIG. 9, the board 4 is arranged above the paper P stored in the paper feed tray 101. This allows the white LED 6 to irradiate the paper P with white light, and the color sensor 5 to receive the light reflected by the paper P. Then, the microcomputer 7 (not shown in FIG. 9) converts the RGB component detection values by the color sensor 5 into 8-bit detection values. In this case, even if the reference white color of the paper P is not specified, color detection can be performed based on the virtual reference white color by using the method described in the embodiment described above. Note that the arrangement of the substrate 4 is not limited to the example shown in FIG. 9, and may be arranged, for example, in the middle of the paper conveyance path.
<7.その他>
 本明細書中に開示されている種々の技術的特徴は、上記実施形態のほか、その技術的創作の主旨を逸脱しない範囲で種々の変更を加えることが可能である。すなわち、上記実施形態は、全ての点で例示であって制限的なものではないと考えられるべきであり、本発明の技術的範囲は、上記実施形態に限定されるものではなく、特許請求の範囲と均等の意味および範囲内に属する全ての変更が含まれると理解されるべきである。
<7. Others>
The various technical features disclosed in this specification can be modified in addition to the embodiments described above without departing from the gist of the technical creation. That is, the above embodiments should be considered to be illustrative in all respects and not restrictive, and the technical scope of the present invention is not limited to the above embodiments, and the claims Ranges and equivalents should be understood to include all changes falling within the range.
<8.付記>
 以上のように、例えば、本開示の一側面に係る色判別装置(7)は、カラーセンサ(5)から出力されるR成分検出値、G成分検出値、およびB成分検出値に基づくRGBデータを、HSV色空間におけるS値とV値のうち少なくとも一方の変換データに変換するように構成されるHSV変換部(72)と、
 RGB値に加えてS値とV値のうち少なくとも一方を含む教師データを保持するように構成される教師データ保持部(73)と、
 前記RGBデータ、前記変換データ、および前記教師データに基づき前記カラーセンサにより測定された色と前記教師データとの類似度を算出するように構成される類似度算出部(74)と、を備える構成としている(第1の構成、図6)。
<8. Additional notes>
As described above, for example, the color discrimination device (7) according to one aspect of the present disclosure uses RGB data based on the R component detection value, the G component detection value, and the B component detection value output from the color sensor (5). an HSV conversion unit (72) configured to convert the data into conversion data of at least one of the S value and the V value in the HSV color space;
a teacher data holding unit (73) configured to hold teacher data including at least one of an S value and a V value in addition to RGB values;
A similarity calculation unit (74) configured to calculate the similarity between the color measured by the color sensor and the teacher data based on the RGB data, the conversion data, and the teacher data. (first configuration, Figure 6).
 また、上記第1の構成において、前記類似度算出部(74)は、前記RGBデータをとりうる最大値で除する第1スケーリング処理、および前記変換データの前記V値をとりうる最大値で除する第2スケーリング処理を行った上で、前記類似度を算出するように構成されることとしてもよい(第2の構成)。 Further, in the first configuration, the similarity calculation unit (74) performs a first scaling process of dividing the RGB data by the maximum possible value, and dividing the V value of the converted data by the maximum possible value. The similarity may be calculated after performing a second scaling process (second configuration).
 また、上記第1または第2の構成において、前記類似度算出部(74)は、下記式に基づき前記類似度を算出するように構成されることとしてもよい(第3の構成)。
 cosθ=(A・B)/|A||B|
 ただし、A:前記RGBデータの値および前記変換データの値を成分とする第1ベクトル、B:前記教師データの値を成分とする第2ベクトル
Furthermore, in the first or second configuration, the similarity calculation unit (74) may be configured to calculate the similarity based on the following formula (third configuration).
cosθ=(A・B)/|A||B|
However, A: a first vector whose components are the values of the RGB data and the values of the conversion data, and B: a second vector whose components are the values of the teacher data.
 また、上記第1から第3のいずれかの構成において、前記変換データおよび前記教師データは、H値を含む構成としてもよい(第4の構成)。 Furthermore, in any one of the first to third configurations, the conversion data and the teacher data may include an H value (fourth configuration).
 また、上記第1から第4のいずれかの構成において、算出された前記類似度のうち最大の前記類似度に対応する色を判別色として決定するように構成される第1判別色決定部(75)をさらに備える構成としてもよい(第5の構成)。 Further, in any one of the first to fourth configurations, a first discrimination color determining unit configured to determine a color corresponding to the maximum similarity among the calculated degrees of similarity as a discrimination color ( 75) (fifth configuration).
 また、上記第1から第5のいずれかの構成において、前記教師データは、各種色のデータを複数グループ有しており、
 当該色判別装置(7)は、算出された前記類似度のうち上位の前記類似度に対応する色の多数決に基づき判別色を決定するように構成される第2判別色決定部(75)をさらに備える構成としてもよい(第6の構成)。
Further, in any one of the first to fifth configurations, the teacher data includes a plurality of groups of data of various colors,
The color discrimination device (7) includes a second discrimination color determination unit (75) configured to determine a discrimination color based on a majority vote of colors corresponding to the higher similarity among the calculated similarities. It is good also as a structure further provided (6th structure).
 また、上記第1から第6のいずれかの構成において、算出された前記類似度のうち最大の前記類似度が閾値以下である場合に、警告を含む通知信号を出力するように構成される通知出力部(75)をさらに備える構成としてもよい(第7の構成)。 Further, in any one of the first to sixth configurations, the notification is configured to output a notification signal including a warning when the maximum similarity among the calculated similarities is less than or equal to a threshold value. It is also possible to have a configuration further including an output section (75) (seventh configuration).
 また、本開示の一側面に係る色判別システム(8)は、上記いずれかの構成である色判別装置(7)と、
 白色光を測定(3)に照射する光源(6)と、
 前記測定対象物で反射した反射光を受光して、各々第1所定ビットである前記R成分検出値、前記G成分検出値、および前記B成分検出値を出力するカラーセンサ(5)と、を備える構成としている(第8の構成)。
Further, a color discrimination system (8) according to one aspect of the present disclosure includes a color discrimination device (7) having any of the above configurations;
a light source (6) that irradiates the measurement (3) with white light;
a color sensor (5) that receives the reflected light reflected by the measurement object and outputs the R component detection value, the G component detection value, and the B component detection value, each of which is a first predetermined bit; (eighth configuration).
 また、上記第8の構成において、前記色判別装置(7)は、あらかじめ複数種類の測定対象物についてカラーセンサにより測定されたR成分検出値、G成分検出値、およびB成分検出値の各々の最大値に基づき、前記カラーセンサから出力される前記R成分検出値、前記G成分検出値、および前記B成分検出値を各々、前記第1所定ビットよりも小さいビット数である第2所定ビットの検出値に変換するビット変換部(71)を有する構成としてもよい(第9の構成)。 Further, in the eighth configuration, the color discrimination device (7) detects each of the R component detection value, the G component detection value, and the B component detection value measured in advance by the color sensor for a plurality of types of measurement objects. Based on the maximum value, each of the R component detection value, the G component detection value, and the B component detection value output from the color sensor is set to a second predetermined bit number whose number of bits is smaller than the first predetermined bit number. It is also possible to have a configuration including a bit conversion section (71) that converts into a detected value (ninth configuration).
 また、本開示の一側面に係る画像形成装置(10)は、上記第8または第9の構成である色判別システム(8)を備え、前記測定対象物は、用紙(P)である構成としている(第10の構成)。 Further, an image forming apparatus (10) according to one aspect of the present disclosure includes a color discrimination system (8) having the eighth or ninth configuration, and the measurement object is a sheet of paper (P). (10th configuration).
 本明細書中に開示されている発明は、例えば、各種の機器における色判別に利用することができる。 The invention disclosed herein can be used, for example, for color discrimination in various devices.
   3   測定対象物
   4   基板
   5   カラーセンサ
   6   白色LED
   7   マイコン
   8   色判別システム
   9   表示装置
  10   画像形成装置
  31   第1測定対象
  32   第2測定対象
  51A,51B,51C 受光素子
  52A,52B,52C ADコンバータ
  53   ロジック回路
  54   赤外線遮断フィルタ
  55A  赤色光透過フィルタ
  55B  緑色光透過フィルタ
  55C  青色光透過フィルタ
  71   8ビット変換部
  72   HSV変換部
  73   教師データ保持部
  74   類似度算出部
  75   通知出力部
 101   給紙トレイ
   P   用紙
   R   抵抗
  SW   スイッチ
3 Measurement object 4 Board 5 Color sensor 6 White LED
7 Microcomputer 8 Color discrimination system 9 Display device 10 Image forming device 31 First measurement object 32 Second measurement object 51A, 51B, 51C Light receiving element 52A, 52B, 52C AD converter 53 Logic circuit 54 Infrared cutoff filter 55A Red light transmission filter 55B Green light transmission filter 55C Blue light transmission filter 71 8-bit conversion unit 72 HSV conversion unit 73 Teacher data storage unit 74 Similarity calculation unit 75 Notification output unit 101 Paper feed tray P Paper R Resistor SW Switch

Claims (10)

  1.  カラーセンサから出力されるR成分検出値、G成分検出値、およびB成分検出値に基づくRGBデータを、HSV色空間におけるS値とV値のうち少なくとも一方の変換データに変換するように構成されるHSV変換部と、
     RGB値に加えてS値とV値のうち少なくとも一方を含む教師データを保持するように構成される教師データ保持部と、
     前記RGBデータ、前記変換データ、および前記教師データに基づき前記カラーセンサにより測定された色と前記教師データとの類似度を算出するように構成される類似度算出部と、
     を備える、色判別装置。
    The color sensor is configured to convert RGB data based on an R component detection value, a G component detection value, and a B component detection value output from the color sensor into conversion data of at least one of an S value and a V value in the HSV color space. an HSV converter,
    a teacher data holding unit configured to hold teacher data including at least one of an S value and a V value in addition to RGB values;
    a similarity calculation unit configured to calculate the similarity between the color measured by the color sensor and the teacher data based on the RGB data, the conversion data, and the teacher data;
    A color discrimination device comprising:
  2.  前記類似度算出部は、前記RGBデータをとりうる最大値で除する第1スケーリング処理、および前記変換データの前記V値をとりうる最大値で除する第2スケーリング処理を行った上で、前記類似度を算出するように構成される、請求項1に記載の色判別装置。 The similarity calculation unit performs a first scaling process in which the RGB data is divided by the maximum possible value, and a second scaling process in which the V value of the converted data is divided by the maximum possible value, and then The color discrimination device according to claim 1, configured to calculate a degree of similarity.
  3.  前記類似度算出部は、下記式に基づき前記類似度を算出するように構成される、請求項1または請求項2に記載の色判別装置。
     cosθ=(A・B)/|A||B|
     ただし、A:前記RGBデータの値および前記変換データの値を成分とする第1ベクトル、B:前記教師データの値を成分とする第2ベクトル
    The color discrimination device according to claim 1 or 2, wherein the similarity calculation unit is configured to calculate the similarity based on the following formula.
    cosθ=(A・B)/|A||B|
    However, A: a first vector whose components are the values of the RGB data and the values of the conversion data, and B: a second vector whose components are the values of the teacher data.
  4.  前記変換データおよび前記教師データは、H値を含む、請求項1から請求項3のいずれか1項に記載の色判別装置。 The color discrimination device according to any one of claims 1 to 3, wherein the conversion data and the teacher data include an H value.
  5.  算出された前記類似度のうち最大の前記類似度に対応する色を判別色として決定するように構成される第1判別色決定部をさらに備える、請求項1から請求項4のいずれか1項に記載の色判別装置。 Any one of claims 1 to 4, further comprising a first discrimination color determination unit configured to determine a color corresponding to the maximum similarity among the calculated similarities as a discrimination color. The color discrimination device described in .
  6.  前記教師データは、各種色のデータを複数グループ有しており、
     当該色判別装置は、算出された前記類似度のうち上位の前記類似度に対応する色の多数決に基づき判別色を決定するように構成される第2判別色決定部をさらに備える、請求項1から請求項5のいずれか1項に記載の色判別装置。
    The teacher data has multiple groups of data of various colors,
    1 . The color discriminating device further comprises a second discriminating color determining unit configured to determine a discriminating color based on a majority vote of colors corresponding to the higher similarity among the calculated similarities. 6. The color discrimination device according to claim 5.
  7.  算出された前記類似度のうち最大の前記類似度が閾値以下である場合に、警告を含む通知信号を出力するように構成される通知出力部をさらに備える、請求項1から請求項6のいずれか1項に記載の色判別装置。 Any one of claims 1 to 6, further comprising a notification output unit configured to output a notification signal including a warning when the maximum similarity among the calculated similarities is less than or equal to a threshold value. The color discrimination device according to item 1.
  8.  請求項1から請求項7のいずれか1項に記載の色判別装置と、
     白色光を測定対象物に照射する光源と、
     前記測定対象物で反射した反射光を受光して、各々第1所定ビットである前記R成分検出値、前記G成分検出値、および前記B成分検出値を出力するカラーセンサと、
     を備える、色判別システム。
    The color discrimination device according to any one of claims 1 to 7,
    a light source that irradiates a measurement target with white light;
    a color sensor that receives the reflected light reflected by the measurement object and outputs the R component detection value, the G component detection value, and the B component detection value, each of which is a first predetermined bit;
    A color discrimination system.
  9.  前記色判別装置は、あらかじめ複数種類の測定対象物についてカラーセンサにより測定されたR成分検出値、G成分検出値、およびB成分検出値の各々の最大値に基づき、前記カラーセンサから出力される前記R成分検出値、前記G成分検出値、および前記B成分検出値を各々、前記第1所定ビットよりも小さいビット数である第2所定ビットの検出値に変換するビット変換部を有する、請求項8に記載の色判別システム。 The color discrimination device outputs an output from the color sensor based on the maximum value of each of the R component detection value, the G component detection value, and the B component detection value measured in advance by the color sensor for a plurality of types of measurement objects. A bit conversion unit that converts each of the R component detection value, the G component detection value, and the B component detection value into a detection value of a second predetermined bit having a smaller number of bits than the first predetermined bit. The color discrimination system according to item 8.
  10.  請求項8または請求項9に記載の色判別システムを備え、
     前記測定対象物は、用紙である、画像形成装置。
    Comprising the color discrimination system according to claim 8 or 9,
    An image forming apparatus in which the object to be measured is a sheet of paper.
PCT/JP2023/009334 2022-03-31 2023-03-10 Color discernment device, color discernment system, and image forming device WO2023189428A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022060055 2022-03-31
JP2022-060055 2022-03-31

Publications (1)

Publication Number Publication Date
WO2023189428A1 true WO2023189428A1 (en) 2023-10-05

Family

ID=88200825

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/009334 WO2023189428A1 (en) 2022-03-31 2023-03-10 Color discernment device, color discernment system, and image forming device

Country Status (1)

Country Link
WO (1) WO2023189428A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104019902A (en) * 2014-06-16 2014-09-03 武汉工程大学 Household test paper reader device and detection method thereof
JP2015066192A (en) * 2013-09-30 2015-04-13 株式会社ジーシー Tooth colorimetric method, tooth colorimetric device, and tooth colorimetric program
US20170048419A1 (en) * 2014-04-30 2017-02-16 Hewlett-Packard Development Company, L.P. Generating Color Similarity Measures
JP2018524598A (en) * 2015-07-29 2018-08-30 デン、ウェンシュアイ Color stone color quality detection method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015066192A (en) * 2013-09-30 2015-04-13 株式会社ジーシー Tooth colorimetric method, tooth colorimetric device, and tooth colorimetric program
US20170048419A1 (en) * 2014-04-30 2017-02-16 Hewlett-Packard Development Company, L.P. Generating Color Similarity Measures
CN104019902A (en) * 2014-06-16 2014-09-03 武汉工程大学 Household test paper reader device and detection method thereof
JP2018524598A (en) * 2015-07-29 2018-08-30 デン、ウェンシュアイ Color stone color quality detection method

Similar Documents

Publication Publication Date Title
JP5432911B2 (en) Ambient light level detection in vision systems
US20110248151A1 (en) System and Circuit Including Multiple Photo Detectors
US8987656B2 (en) Optical finger navigation device having an integrated ambient light sensor and electronic system comprising the same
US7847942B1 (en) Peripheral interface device for color recognition
TW200639772A (en) Display device including function to input information from screen by light
WO2011145287A1 (en) Method for calculating weight ratio by quality in grain appearance quality discrimination device
WO2023189428A1 (en) Color discernment device, color discernment system, and image forming device
TW201427418A (en) Sensing apparatus and sensing method
JPS59166824A (en) Method and device for recognizing color
WO2019214618A1 (en) Color picking device
TW201903384A (en) Color detection device and method thereof
US11592334B2 (en) Photosensors for color measurement
WO2022250043A1 (en) Color detection device
KR101312533B1 (en) Luminous intensity detecting apparatus and method having high sensitivity
Moghavvemi et al. Design of low cost flexible RGB color sensor
JP6311283B2 (en) Image reading apparatus and program
US20180299325A1 (en) Color Capture Arrangement and Correction Method Using the Color Capture Arrangement
US20130250299A1 (en) Methods of calibrating color measurement devices
WO2022255342A1 (en) Liquid surface height detecting device
WO2017029681A1 (en) A led based colorimeter device
JP2004333173A (en) Multi-optical axis photoelectric sensor
US20240035882A1 (en) Light sensing method having sensing order adjusting mechanism
US20240085323A1 (en) Method and apparatus for measuring surface gloss and spectral reflectance
JPS63163218A (en) Color discriminating device
JP2005151320A (en) Light receiving device and optical communication system using it

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23779452

Country of ref document: EP

Kind code of ref document: A1