Sensor device, object detection method, and object detection program
The sensor device simplifies threshold setting by calculating a single color index value from R, G, and B values, addressing inaccuracies in conventional color sensors and enhancing usability for detecting object deterioration.
Patent Information
- Application Number
- JP2024016645
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-19
AI Technical Summary
Conventional color sensors face difficulties in setting accurate threshold values for color difference determination due to varying light reflection and processing of multiple color channels, leading to inaccurate color judgments.
A sensor device that calculates a single color index value based on R, G, and B values, allowing easy threshold setting by comparing this value to a predetermined threshold, and includes units for RGB correction to account for light emission and sensitivity variations.
Enables easy threshold setting and improves usability by allowing accurate color determination, particularly in detecting object deterioration such as lubricant state changes.
Smart Images

Figure 2025121287000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a sensor device, an object detection method, and an object detection program that detect an object using color information. [Background technology]
[0002] For example, if the lubricating oil used in machine tools deteriorates, it can lead to the breakdown of the machine tools, so a color sensor is used to monitor the color of the lubricating oil and detect the deterioration state. For example, Patent Document 1 discloses a color sensor that includes three light-receiving elements that have transmission spectral sensitivity characteristics for each of the RGB colors and generate a photocurrent whose magnitude is proportional to the amount of light received, a switch circuit that selects the photocurrent, an A / D converter that converts the selected photocurrent into a digital signal, a register that stores digital values from the A / D converter, and a serial interface circuit that outputs the stored digital values via terminals SCL and SDA. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2011-106875 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the above-described conventional color sensor has the following problems. In other words, the color sensor disclosed in the above publication needs to process data on three colors (R, G, and B) to determine color differences, so for a detected object in which the three colors change simultaneously, it is difficult to set a threshold value for determining color differences due to the difference in the amount of light reflected from the detected object and the processing of the information on the three colors. Therefore, if the threshold value is not set appropriately, it is difficult to perform highly accurate color determination.
[0005] An object of the present invention is to provide a sensor device, an object detection method, and an object detection program that allow easy setting of a threshold value for determination and improve usability for the user. [Means for solving the problem]
[0006] A sensor device according to a first aspect of the present invention includes a light-projecting unit, a light-receiving unit, a color information acquiring unit, a color index value calculating unit, and a determining unit. The light-projecting unit projects light. The light-receiving unit detects reflected light from an illuminated area of the light projected from the light-projecting unit. The color information acquiring unit acquires color information of an object present in the illuminated area based on the reflected light detected by the light-receiving unit. The color index value calculating unit calculates a single color index value based on the R value, G value, and B value included in the color information acquired by the color information acquiring unit. The determining unit compares the color index value calculated by the color index value calculating unit with a predetermined threshold value to determine whether an object has been detected.
[0007] Here, whether or not an object such as deteriorated lubricant oil has been detected is determined based on the results of comparing a single color index value calculated based on the R value, G value, and B value contained in the color information of the reflected light of light projected onto the object with a threshold value. Here, the target object is an object for which a color-based determination is made by the sensor device, and may be in any form of solid, liquid, or gas.
[0008] The color index value is calculated from the color information (RGB values) of an object obtained from reflected light, and is a numerical value that indicates the degree of color, set on a scale from 0 to 10, for example, with achromatic colors (white, black, gray) indicating high values and chromatic colors (red, green, blue) indicating low values. Judgment based on color is, for example, a judgment of the deterioration state of a lubricant (object) used in a machine tool, and if the calculated color index value is equal to or lower than the threshold value, the lubricant is judged to be deteriorated.
[0009] This makes it possible to easily judge an object by comparing a single color index value calculated from the R, G, and B values with a preset threshold value, compared to the conventional method of judging color differences using each of the R, G, and B values. As a result, it is easy to set the threshold value for determination, and usability for the user can be improved.
[0010] A sensor device according to a second aspect of the present invention is the sensor device according to the first aspect of the present invention, further comprising an RGB value correction section that corrects the color information acquired by the color information acquisition section. This allows, for example, obtaining RGB correction values that are corrected to eliminate variations in the amount of light emitted and variations in light receiving sensitivity due to individual differences between the light-emitting unit and the light-receiving unit, thereby improving the accuracy of the above-mentioned color judgment.
[0011] A sensor device according to a third aspect of the present invention is the sensor device according to the second aspect of the present invention, wherein the RGB value correction unit corrects the R, G, B values so that the ratio of R, G, B when an achromatic object is detected is 1:1:1. This allows the accuracy of the color determination described above to be improved by correcting the color information so that the R·G·B values are 1:1:1, which is what they should be when detecting an achromatic object (white, black, gray, etc.).
[0012] A sensor device according to a fourth aspect of the present invention is a sensor device according to the first or second aspect of the present invention, wherein the color index value calculation unit calculates a color index value based on the R value, G value, and B value corrected in the RGB correction unit. This makes it possible to improve the accuracy of the judgment by performing the above-mentioned color judgment using color index values calculated using RGB correction values that have been corrected to eliminate variations in the amount of light emitted and variations in light receiving sensitivity due to individual differences between the light-emitting unit and the light-receiving unit.
[0013] A sensor device according to a fifth aspect of the present invention is the sensor device according to the first or second aspect of the present invention, further comprising a threshold storage unit that stores a threshold used for determining an object in the determination unit. This allows the object to be determined using the threshold value stored in the threshold value storage unit.
[0014] A sensor device according to a sixth aspect of the present invention is the sensor device according to the second or third aspect of the present invention, further comprising a correction value storage unit that stores correction values used in the RGB value correction unit. This allows the color information acquired by the color information acquisition unit to be corrected using the correction values stored in the correction value storage unit.
[0015] A sensor device according to a seventh aspect of the present invention is the sensor device according to the first or second aspect of the present invention, further comprising a determination result storage unit that stores the determination result of the determination unit. This allows the determination results stored in the determination result storage unit to be displayed on, for example, a display of a PC (Personal Computer).
[0016] The sensor device according to the eighth aspect of the present invention is the sensor device according to the first or second aspect of the present invention, further comprising a communication unit that communicates the determination result of the determination unit with an external device including the target object. This means that, for example, when monitoring changes in the color of the lubricant using a sensor device installed in a machine tool, etc., the presence or absence of a change in the color of the lubricant (whether or not the color index value is greater than a threshold value) can be transmitted to the machine tool, etc. as a judgment result, making it easy to grasp the deterioration state of the lubricant on a monitor screen of the machine tool, etc.
[0017] A sensor device according to a ninth aspect of the present invention is the sensor device according to the first or second aspect of the present invention, wherein the object is deteriorated oil. This allows the deterioration of lubricating oil used in machine tools, etc. to be detected with high accuracy and prompts for replacement by comparing a single value, the color index value, with a threshold value to detect the color of the deteriorated oil.
[0018] An object detection method according to a tenth aspect of the present invention includes a light projection step, a light reception step, a color information acquisition step, a color index value calculation step, and a determination step. In the light projection step, light is projected. In the light reception step, reflected light from an illuminated area of the light projected in the light projection step is detected. In the color information acquisition step, color information of an object present in the illuminated area is acquired based on the reflected light detected in the light reception step. In the color index value calculation step, a single color index value is calculated based on the R value, G value, and B value included in the color information acquired in the color information acquisition step. In the determination step, the color index value calculated in the color index value calculation step is compared with a predetermined threshold to determine whether an object has been detected.
[0019] Here, whether or not an object such as deteriorated lubricant oil has been detected is determined based on the results of comparing a single color index value calculated based on the R value, G value, and B value contained in the color information of the reflected light of light projected onto the object with a threshold value. Here, the target object is an object for which a color-based determination is made by the sensor device, and may be in any form of solid, liquid, or gas.
[0020] The color index value is calculated from the color information (RGB values) of an object obtained from reflected light, and is a numerical value that indicates the degree of color, set on a scale from 0 to 10, for example, with achromatic colors (white, black, gray) indicating high values and chromatic colors (red, green, blue) indicating low values. Judgment based on color is, for example, a judgment of the deterioration state of a lubricant (object) used in a machine tool, and if the calculated color index value is lower than the threshold value, the lubricant is judged to be deteriorated.
[0021] This makes it possible to easily judge an object by comparing a single color index value calculated from the R, G, and B values with a preset threshold value, compared to the conventional method of judging color differences using each of the R, G, and B values. As a result, it is easy to set the threshold value for determination, and usability for the user can be improved.
[0022] An object detection program according to an eleventh aspect of the present invention causes a computer to execute an object detection method including a light projection step, a light reception step, a color information acquisition step, a color index value calculation step, and a determination step. In the light projection step, light is projected. In the light reception step, reflected light from an illuminated area of the light projected in the light projection step is detected. In the color information acquisition step, color information of an object present in the illuminated area is acquired based on the reflected light detected in the light reception step. In the color index value calculation step, a single color index value is calculated based on the R value, G value, and B value included in the color information acquired in the color information acquisition step. In the determination step, the color index value calculated in the color index value calculation step is compared with a predetermined threshold to determine whether an object has been detected.
[0023] Here, whether or not an object such as deteriorated lubricant oil has been detected is determined based on the results of comparing a single color index value calculated based on the R value, G value, and B value contained in the color information of the reflected light of light projected onto the object with a threshold value. Here, the target object is an object for which a color-based determination is made by the sensor device, and may be in any form of solid, liquid, or gas.
[0024] The color index value is calculated from the color information (RGB values) of an object obtained from reflected light, and is a numerical value that indicates the degree of color, set on a scale from 0 to 10, for example, with achromatic colors (white, black, gray) indicating high values and chromatic colors (red, green, blue) indicating low values. Judgment based on color is, for example, a judgment of the deterioration state of a lubricant (object) used in a machine tool, and if the calculated color index value is lower than the threshold value, the lubricant is judged to be deteriorated.
[0025] This makes it possible to easily judge an object by comparing a single color index value calculated from the R, G, and B values with a preset threshold value, compared to the conventional method of judging color differences using each of the R, G, and B values. As a result, it is easy to set the threshold value for determination, and usability for the user can be improved. [Effects of the Invention]
[0026] According to the sensor device of the present invention, it is possible to easily set a threshold value for determination, and to improve usability for the user. [Brief explanation of the drawings]
[0027] [Figure 1] 1 is an exploded perspective view showing a configuration of a sensor device according to an embodiment of the present invention; [Figure 2] FIG. 2 is a control block diagram of the sensor device of FIG. 1. [Figure 3] (a) is a conceptual diagram showing the state in which the sensor device in Figure 1 is used to monitor the color change of lubricant oil before deterioration. (b) is a conceptual diagram showing the state in which the sensor device in Figure 1 is used to monitor the color change of lubricant oil after deterioration. [Figure 4] 10 is a graph showing the relationship between color change (achromatic / chromatic), color index value, and determination result (detected / not detected). [Figure 5] FIG. 10 is a diagram showing the relationship between the level of the color index value and achromatic / chromatic colors. [Figure 6] FIG. 10 is a diagram showing RGB values and color index values corresponding to new lubricating oil and deteriorated waste oil. [Figure 7] 3 is a flowchart showing the flow of processing of an object detection method performed by the sensor device of FIG. 2. [Figure 8] FIG. 10 is a schematic diagram showing the configuration of a transmission type sensor device according to another embodiment of the present invention. [Figure 9] 10 is a graph showing the relationship between color change (achromatic / chromatic), color index value, and determination result (detected / not detected) in a sensor device according to yet another embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0028] A sensor device according to one embodiment of the present invention will be described below with reference to FIGS. In the present embodiment, more detailed explanation than necessary may be omitted. For example, detailed explanation of well-known matters or redundant explanation of substantially the same configuration may be omitted. This is to avoid unnecessary redundancy in the following explanation and to facilitate understanding by those skilled in the art. Furthermore, the applicant provides the accompanying drawings and the following description to enable those skilled in the art to fully understand the present invention, and they are not intended to limit the subject matter described in the claims.
[0029] (1) Configuration of the sensor device 10 The sensor device 10 according to this embodiment is mounted on, for example, a machine tool, and determines the deterioration state of the lubricant (object) used in the machine tool by monitoring a change in color of the lubricant.
[0030] As shown in FIG. 1, the sensor device 10 includes a lens 11, a case 12, a substrate 13, a light projecting unit 14, a light receiving unit 15, a determining unit 16, and a cover 17. The lens 11 is attached to the case 12 and passes light emitted from the light-emitting unit 14 arranged inside the case 12, irradiating it toward an object such as lubricating oil, and also passes light reflected from the surface of the object, causing it to be received by the light-receiving unit 15.
[0031] The case 12 is a substantially box-shaped member and contains a substrate 13 on which a light projecting unit 14 and a light receiving unit 15 are mounted. The substrate 13 is housed in a case 12, and a light projecting section 14 and a light receiving section 15 are disposed on the surface facing the lens 11. The light projecting unit 14 is a light source such as an LED (Light Emitting Diode), and projects light onto an object such as lubricant through the lens 11.
[0032] The light receiving unit 15 receives, via the lens 11, the light that is irradiated from the light projecting unit 14, passes through the object, is reflected by the reflecting plate 18, and passes through the object again. The determination unit 16 determines whether or not an object (deteriorated lubricant) has been detected, using a single color index value calculated based on the R value, G value, and B value included in the color information of the reflected light received by the light receiving unit 15. The determination process by the determination unit 16 will be described in detail later.
[0033] The cover 17 is attached to the case 12 and covers the end opposite to the lens 11 . As shown in FIG. 2, the sensor device 10 includes the above-mentioned light-projecting unit 14, light-receiving unit 15, judgment unit 16, light-projection control unit 21, RGB value acquisition unit (color information acquisition unit) 22, RGB value correction unit 23, color index value calculation unit 24, memory unit (threshold memory unit, correction value memory unit, judgment result memory unit) 25, and communication unit 26.
[0034] The determination unit 16 compares the color index value calculated by the color index value calculation unit 24 (described later) with a predetermined threshold value to determine whether or not an object has been detected. The light projection control unit 21 controls the light projection unit 14 that irradiates light onto an object such as lubricant. The RGB value acquisition unit (color information acquisition unit) 22 acquires color information of an object present in the irradiation area based on the reflected light detected by the light receiving unit 15.
[0035] The RGB value correction unit 23 corrects the color information acquired by the RGB value acquisition unit 22. More specifically, the RGB value correction unit 23 corrects the R, G, and B values so that the ratio of R, G, and B when an achromatic (white, black, gray) object is detected becomes 1:1:1. The color index value calculation unit 24 calculates a single color index value based on the R value, G value, and B value included in the color information acquired by the RGB value acquisition unit 22. More specifically, the color index value calculation unit 24 calculates the color index value based on the R value, G value, and B value corrected by the RGB value correction unit 23.
[0036] The memory unit (threshold memory unit, correction value memory unit, judgment result memory unit) 25 stores the threshold value used to judge the object in the judgment unit 16, the correction value used in the RGB value correction unit 23, and the judgment result in the judgment unit 16. The communication unit 26 communicates the determination result of the determination unit 16 with an external device such as a machine tool that includes an object such as lubricant.
[0037] The communication unit 30 is provided, for example, in a machine tool on which the sensor device 10 is mounted, and receives the determination result from the sensor device 10. 3(a) and 3(b), the sensor device 10 monitors the degree of deterioration of the lubricant oil by irradiating the lubricant oil O1 circulating inside the machine tool with light and receiving the light reflected by the reflector 18. That is, the sensor device 10 utilizes the characteristic of lubricant oil, which changes from light brown (see FIG. 3(a)) to dark brown (see FIG. 3(b)) as deterioration progresses, to calculate a single color index value from the color information (R value, G value, B value) of the reflected light, and if it determines that the value is below a predetermined threshold, it determines that the lubricant oil is deteriorating and displays a message urging the lubricant oil to be replaced, as shown in FIG. 3(b).
[0038] This allows a monitor on the machine tool side to monitor the degree of lubricant deterioration, and if the color index value of the lubricant falls below a predetermined threshold, it can be determined that the lubricant has deteriorated and notify the user of the machine tool that it is time to replace the lubricant. Here, detection of deteriorated lubricating oil that requires replacement is performed by taking advantage of the fact that when the lubricating oil is in a new state, such as immediately after replacement, the color index value is high because it is close to achromatic, and as deterioration progresses, it changes to a low value closer to chromatic.
[0039] The color index value used for the judgment is a single value calculated from the color information (R value, G value, B value) of the light of the object, and as shown in Figure 5, achromatic colors (white, black, gray) have high values and chromatic colors (red, green, blue) have low values. That is, as the lubricant deteriorates and the color index value decreases, the color of the lubricant changes from achromatic to chromatic, as shown in Fig. 4. Therefore, the determination unit 16 detects that the color index value calculated from the color information of the lubricant has fallen below a predetermined threshold, and determines that the object (lubricant that has deteriorated to the point where it needs to be replaced) has been detected.
[0040] When the color of the object changes from a chromatic color to an achromatic color, as shown in FIG. 4, if the color index value becomes equal to or exceeds a preset hysteresis value, it is determined to be undetected. Specifically, as shown in Figure 6, the R value of new lubricating oil immediately after replacement is 1.237, the G value is 1.091, and the B value is 0.536. The color index value calculated from these R, G, and B values is 5.49.
[0041] On the other hand, as shown in Figure 6, the lubricant oil (to be replaced) that had been used in a machine tool and had deteriorated had an R value of 0.840, a G value of 0.339, and a B value of 0.023. The color index value calculated from these R, G, and B values was 1.08. As described above, the color index value of new lubricating oil immediately after replacement is high, while the color index value of lubricating oil that has deteriorated is lower.
[0042] Here, the color index value C can be calculated from color information (R value, G value, B value) using the following relational expression (1), for example.
[0043]
number
[0044] Specifically, under the condition that the hysteresis value is greater than or equal to the judgment threshold, if the color index value C is less than or equal to the judgment threshold, the state is judged from undetected to detected, and if the color index value C is greater than the hysteresis value, the state is judged from detected to undetected. On the other hand, under the condition that the hysteresis value is less than the judgment threshold, if the color index value C is greater than or equal to the judgment threshold, the state is judged from undetected to detected, and if the color index value C is less than the hysteresis value, the state is judged from detected to undetected.
[0045] <Object detection method> The sensor device 10 of this embodiment performs the object detection method according to the flowchart shown in FIG. That is, in step S11, the user of the machine tool inputs a setting value for the determination threshold value for determining the degree of deterioration of the lubricant.
[0046] Next, in step S12, the light projection control unit 21 controls the light projection unit 14 to project light onto the target (lubricant), and the light receiving unit 15 receives the reflected light. Next, in step S13, the RGB value acquisition unit 22 acquires color information (RGB values) of the light received by the light receiving unit 15. Next, in step S14, the RGB value correction unit 23 calculates corrected RGB values using the correction values stored in the storage unit 25. The calculation of the corrected RGB values is performed (corrected) so that, for example, when reflected light from an achromatic object is received, the R value, G value, and B value become 1:1:1.
[0047] Next, in step S15, the color index value calculation unit 24 calculates a color index value from the RGB correction value calculated in the RGB value correction unit 23. Here, the color index value C is calculated, for example, by the relational expression shown in Equation 1 above. Next, in step S16, the determination unit 16 determines whether the color index value C calculated by the color index value calculation unit 24 is equal to or less than the determination threshold value stored in the storage unit 25. If the calculated color index value C is equal to or less than the threshold value, it is determined that the lubricant has deteriorated and the color has changed to a chromatic color, and the process proceeds to step S17. If the calculated color index value C is greater than the threshold value, it is determined that the lubricant has not deteriorated yet and the color remains close to an achromatic color, and the process returns to step S12.
[0048] Next, in step S17, since it has been determined in step S16 that the color index value C is equal to or less than the threshold value and that the lubricant has deteriorated and changed color to the chromatic color side, the communication unit 26 notifies the determination result. This makes it possible to display a message on the display screen of the machine tool, for example, informing the user that the lubricant has deteriorated and needs to be replaced.
[0049] <Main features> As shown in FIG. 2 , the sensor device 10 of this embodiment includes a light-projecting unit 14, a light-receiving unit 15, an RGB value acquiring unit 22, a color index value calculating unit 24, and a determining unit 16. The light-projecting unit 14 projects light. The light-receiving unit 15 detects reflected light from an area illuminated by the light projected from the light-projecting unit 14. The RGB value acquiring unit 22 acquires color information of an object present in the illuminated area based on the reflected light detected by the light-receiving unit 15. The color index value calculating unit 24 calculates a single color index value based on the R value, G value, and B value included in the color information acquired by the RGB value acquiring unit 22. The determining unit 16 compares the color index value calculated by the color index value calculating unit 24 with a predetermined threshold value to determine whether or not an object has been detected.
[0050] This eliminates the need to set a threshold for each of the R, G, and B values, as compared with the conventional method of determining color differences using each of the R, G, and B values, and allows objects to be easily determined by comparing a single color index value with a preset threshold. As a result, it is easy to set the threshold value for determination, and usability for the user can be improved.
[0051] [Other embodiments] Although one embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and various modifications are possible without departing from the gist of the invention. (A) In the above embodiment, examples have been given in which the present invention is realized as a sensor device and an object detection method, but the present invention is not limited to this.
[0052] For example, the present invention may be realized as an object detection program that causes a computer to execute the object detection method described above. This object detection program is stored in a memory (storage unit) installed in the sensor device, and a CPU reads the object detection program stored in the memory and causes the hardware to execute each step. More specifically, the CPU reads the object detection program and executes the above-mentioned light projection step, light reception step, color information acquisition step, color index value calculation step, and judgment step, thereby achieving the same effects as those described above. The present invention may also be realized as a recording medium storing an object detection program.
[0053] (B) In the above embodiment, an example has been described in which a color index value is calculated using corrected R·G·B values obtained by correcting the R·G·B values acquired by the RGB value acquisition unit (color information acquisition unit) 22. However, the present invention is not limited to this. For example, if there is no need to consider a decrease in accuracy due to individual differences between the light-emitting unit and the light-receiving unit, the color index value may be calculated using the R·G·B values acquired by the color information acquisition unit without correcting the R·G·B values.
[0054] (C) In the above embodiment, an example was described in which a change in the color of an object (lubricant) having a color index value close to an achromatic color is monitored, and a change to a color close to a chromatic color is detected to determine the degree of deterioration of the lubricant. However, the present invention is not limited to this. For example, the degree of deterioration of an object may be determined by detecting that an object that is close to a chromatic color has deteriorated and changed to a color that is close to achromatic.
[0055] (D) In the above embodiment, an example has been described in which a user sets and inputs a determination threshold value for determining the degree of deterioration of the lubricant, but the present invention is not limited to this. For example, if the object is constant, a determination may be made using a color index value with a preset determination threshold value.
[0056] (E) In the above embodiment, an example has been described in which the communication unit 26 on the sensor device 10 side transmits the determination result from the determination unit 16 to the communication unit 30 on the machine tool side, and a message urging the user to change the lubricating oil is displayed on a display screen on the machine tool side, etc. However, the present invention is not limited to this. For example, in addition to or instead of displaying a message urging replacement of the lubricating oil due to deterioration, an alarm sound may be output to notify the user of the deterioration of the lubricating oil. Even in this case, the user of the machine tool can be made aware of the deterioration of the lubricating oil and can be urged to replace it promptly.
[0057] (F) In the above embodiment, an example has been described in which the sensor device of the present invention is applied to a device for monitoring the deterioration state of lubricating oil used in machine tools, etc. However, the present invention is not limited to this. For example, in addition to monitoring the deterioration of lubricating oil, the sensor device of the present invention may be applied to various devices that detect changes in color (color differences) of an object and perform various controls.
[0058] (G) In the above embodiment, the sensor device 10 is described as an example of a retro-reflective type in which light emitted from the light-emitting unit 14 is reflected by the reflecting surface 18 and the reflected light is received by the light-receiving unit 15. However, the present invention is not limited to this.
[0059] For example, as shown in FIG. 8, the sensor device 110 may be a transmission type sensor device having a light-projecting unit 114 that emits light toward an object (such as lubricant O1) and a light-receiving unit 115 that is positioned opposite (coaxial with) the light-projecting unit 114, and receives light that has passed through the object (such as lubricant O1) between the light-projecting unit 114 and the light-receiving unit 115 at the light-receiving unit 115. Alternatively, for example, as a solid detection sensor device for detecting an object such as a seam in a carrier tape, the device may be configured to detect a change in color by receiving reflected light from a light-emitting unit irradiated onto the object at a light-receiving unit.
[0060] (H) In the above embodiment, the sensor device 10 is described as an example that detects a change in color of lubricating oil from an achromatic color to a chromatic color, but the present invention is not limited to this. For example, as shown in FIG. 9, the sensor device may be configured to detect a change in color of an object from a chromatic color to an achromatic color.
[0061] <Additional Notes> The sensor device according to the first invention comprises: a light projection unit that projects light; a light receiving unit that detects the amount of reflected light received from an irradiation area of the light projected from the light projecting unit; a color information acquisition unit that acquires color information of an object present in the illumination area based on the amount of light received by the light receiving unit; a color index value calculation unit that calculates a single color index value based on the R value, G value, and B value included in the color information acquired by the color information acquisition unit; a determination unit that compares the color index value calculated by the color index value calculation unit with a predetermined threshold value and determines whether or not an object has been detected; It is equipped with:
[0062] A sensor device according to a second aspect of the present invention is the sensor device according to the first aspect of the present invention, The image processing device further includes an RGB value correction unit that corrects the color information acquired by the color information acquisition unit. A sensor device according to a third aspect of the present invention is the sensor device according to the second aspect of the present invention, The RGB value correction unit corrects the R·G·B values so that the ratio of R·G·B when an achromatic object is detected becomes 1:1:1.
[0063] A sensor device according to a fourth aspect of the present invention is the sensor device according to any one of the first to third aspects of the present invention, The color index value calculation unit calculates the color index value based on the R value, G value, and B value corrected by the RGB correction unit. A sensor device according to a fifth aspect of the present invention is the sensor device according to any one of the first to fourth aspects of the present invention, The image processing device further includes a threshold storage unit that stores a threshold used by the determination unit to determine the object.
[0064] A sensor device according to a sixth aspect of the present invention is the sensor device according to the second or third aspect of the present invention, The image forming apparatus further includes a correction value storage unit for storing the correction values used in the RGB value correction unit. A sensor device according to a seventh aspect of the present invention is the sensor device according to any one of the first to sixth aspects of the present invention, The device further includes a determination result storage unit for storing the determination result of the determination unit.
[0065] A sensor device according to an eighth aspect of the present invention is the sensor device according to any one of the first to seventh aspects of the present invention, The device further includes a communication unit that communicates the determination result of the determination unit with an external device including the object. A sensor device according to a ninth aspect of the present invention is the sensor device according to any one of the first to eighth aspects of the present invention, The object is deteriorated oil. [Industrial Applicability]
[0066] The sensor device of the present invention has the effect of making it easier to set threshold values for judgment and improving usability for users, and therefore can be widely applied to devices that make various judgments using color information. [Explanation of symbols]
[0067] 10 Sensor device 11 Lens 12 cases 13 PCB 14 Light projector 15 Light receiving part 16 Judgment section 17 Cover 18 Reflector 21 Light emission control section 22 RGB value acquisition unit (color information acquisition unit) 23 RGB value correction section 24 Color index value calculation unit 25 Memory unit (threshold value memory unit, correction value memory unit, judgment result memory unit) 26 Communications Department 30 Communications Department
Claims
1. a light projection unit that projects light; a light receiving unit that detects reflected light from an irradiation area of the light projected from the light projecting unit; a color information acquisition unit that acquires color information of an object present in the illumination area based on the reflected light detected by the light receiving unit; a color index value calculation unit that calculates a single color index value based on the R value, G value, and B value included in the color information acquired by the color information acquisition unit; a determination unit that compares the color index value calculated by the color index value calculation unit with a predetermined threshold value and determines whether or not an object has been detected; A sensor device comprising:
2. The color information acquisition unit may further include an RGB value correction unit that corrects the color information acquired by the color information acquisition unit. The sensor device according to claim 1 .
3. the RGB value correction unit corrects the RGB values so that the RGB values when an achromatic object is detected are 1:1:1, respectively; The sensor device according to claim 2 .
4. the color index value calculation unit calculates the color index value based on the R value, G value, and B value corrected by the RGB value correction unit; The sensor device according to claim 2 or 3.
5. The apparatus further includes a threshold storage unit that stores a threshold used for determining the object in the determination unit. The sensor device according to claim 1 or 2.
6. The image processing device further includes a correction value storage unit that stores correction values used in the RGB value correction unit. The sensor device according to claim 2 or 3.
7. Further provided is a judgment result storage unit that stores the judgment result of the judgment unit. The sensor device according to claim 1 or 2.
8. The device further includes a communication unit that communicates the determination result of the determination unit with an external device including the object. The sensor device according to claim 1 or 2.
9. The object is deteriorated oil. The sensor device according to claim 1 or 2.
10. a light projection step of projecting light; a light receiving step of detecting reflected light from an irradiation area of the light projected in the light projecting step; a color information acquiring step of acquiring color information of an object present in the irradiation area based on the reflected light detected in the light receiving step; a color index value calculation step of calculating a single color index value based on the R value, G value, and B value included in the color information acquired in the color information acquisition step; a determination step of comparing the color index value calculated in the color index value calculation step with a predetermined threshold value to determine whether or not an object has been detected; An object detection method comprising:
11. a light projection step of projecting light; a light receiving step of detecting reflected light from an irradiation area of the light projected in the light projecting step; a color information acquiring step of acquiring color information of an object present in the irradiation area based on the reflected light detected in the light receiving step; a color index value calculation step of calculating a single color index value based on the R value, G value, and B value included in the color information acquired in the color information acquisition step; a determination step of comparing the color index value calculated in the color index value calculation step with a predetermined threshold value to determine whether or not an object has been detected; An object detection program that causes a computer to execute an object detection method comprising the steps of:
Citation Information
Patent Citations
Optical sensor and display device
JP2011106875A