Excrement determination method, excrement determination device, and excrement determination program

By calculating the G/R and B/R values ​​in color image data, the problem of fading excrement color in toilet water was solved, achieving high-precision detection of defecation, urination, and bleeding, reducing processing load and improving detection accuracy.

CN116710964BActive Publication Date: 2026-07-10PANASONIC LIVING SPACE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PANASONIC LIVING SPACE CO LTD
Filing Date
2021-11-05
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify images of defecation, urination, and bleeding when detecting excrement in toilet water, especially due to the issue of the excrement on the surface of the water fading in color over time.

Method used

By calculating the G/R and B/R values ​​in the color image data captured by the camera, it is determined whether the image contains images of defecation, urination, and bleeding. The characteristics of G/R and B/R values ​​are used to maintain the color stability of excrement and improve detection accuracy.

Benefits of technology

It enables high-precision detection of excrement such as feces, urine, and blood, reducing processing load and improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116710964B_ABST
    Figure CN116710964B_ABST
Patent Text Reader

Abstract

The present invention relates to a feces determination method, a feces determination device, and a feces determination program. The feces determination device acquires image data of feces captured by a camera that captures an inside of a bowl of a toilet, calculates a G / R value and a B / R value based on R (red) values, G (green) values, and B (blue) values included in the image data, determines whether or not an image of at least one of defecation, urination, and bleeding is included in the image data based on the G / R value and the B / R value, and outputs a result of the determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to techniques for determining excrement based on image data. Background Technology

[0002] Patent document 1 discloses the following technology: converting a color image into a grayscale image, calculating the gradient of the image based on the grayscale image, classifying the calculated gradient into sub-regions (bins) of a histogram with a certain step size, and inputting the histograms classified into sub-regions into a classifier such as a support vector machine to determine the hardness of the stool, etc.

[0003] However, in the technology of Patent Document 1, further improvements are needed in the accurate detection of excrement in the stagnant water of the toilet.

[0004] Prior art literature

[0005] Patent documents

[0006] Patent Document 1: Japanese Patent Publication No. 2020-516422 Summary of the Invention

[0007] This disclosure was made to solve such a problem and provides a technique that can detect excrement in the stagnant water of a toilet bowl with high precision.

[0008] The method for determining excrement in one aspect of this disclosure is a method for determining excrement in an excrement determination device. The processor of the excrement determination device performs the following processing: acquiring color image data of excrement captured by a camera that captures images of the toilet bowl; calculating a G / R value and a B / R value based on the R (red), G (green), and B (blue) values ​​included in the image data; determining, based on the G / R value and the B / R value, whether the image data includes an image of at least one of defecation, urination, and bleeding; and outputting the determination result.

[0009] According to this disclosure, it is possible to detect excrement in the stagnant water of a toilet with high precision. Attached Figure Description

[0010] Figure 1 This is a diagram showing the structure of the excrement determination system in Embodiment 1 of this disclosure.

[0011] Figure 2 This is a diagram illustrating the configuration of the sensor unit and the excrement determination device in Embodiment 1 of this disclosure.

[0012] Figure 3 This is a diagram showing the detection area.

[0013] Figure 4 This is a timing diagram showing an overview of the processing of the excrement determination device in Embodiment 1 of this disclosure.

[0014] Figure 5 This is a flowchart illustrating an example of the process by which an excrement determination device generates image data that will be sent to the target.

[0015] Figure 6 This is a flowchart illustrating an example of the process in the excrement determination device of Embodiment 1 from the time the user sits down until he or she leaves the seat.

[0016] Figure 7 This is a flowchart illustrating an example of an excretion detection process.

[0017] Figure 8 It is a table that summarizes the conditions for defecation, urination, and bleeding.

[0018] Figure 9 This is a block diagram illustrating an example of the structure of the excrement determination system in Embodiment 2.

[0019] Figure 10 This is a flowchart illustrating an example of the excretion detection process in Implementation 2.

[0020] Figure 11 It is a table summarizing the conditions for black stool.

[0021] Figure 12 It is a table summarizing the conditions for yellow stool. Detailed Implementation

[0022] (The knowledge that forms the basis of this disclosure)

[0023] In care facilities, information such as the frequency and timing of bowel movements is crucial for assessing health risks. However, assigning this task to caregivers increases their workload. Furthermore, recording this information while in the presence of the caregiver increases the psychological burden on the caregiver. Therefore, it is necessary to identify excrement using image data from cameras installed in the toilet, generate bowel information based on the identification results, and automatically record this information.

[0024] However, the surface layer of excrement in the sump of the toilet bowl gradually sinks to the bottom, causing its color to fade over time. Therefore, if the excrement is detected solely based on the R, G, and B values ​​of the image data, there is a problem that the excrement cannot be detected accurately.

[0025] This disclosure was made to address such a problem.

[0026] The method for determining excrement in one aspect of this disclosure is a method for determining excrement in an excrement determination device. The processor of the excrement determination device performs the following processing: acquiring color image data of excrement captured by a camera that captures images of the toilet bowl; calculating a G / R value and a B / R value based on the R (red), G (green), and B (blue) values ​​included in the image data; determining, based on the G / R value and the B / R value, whether the image data includes an image of at least one of defecation, urination, and bleeding; and outputting the determination result.

[0027] According to this structure, G / R and B / R values ​​are calculated based on the R, B, and G values ​​included in the image data. Based on the calculated G / R and B / R values, it is determined whether the image data includes an image of at least one of defecation, urination, and bleeding. Here, the G / R and B / R values ​​have the characteristic of maintaining their values ​​even if the color of the excrement on the surface of the toilet becomes lighter over time due to the gradual settling of excrement to the bottom. As a result, images of excrement can be detected with high accuracy even if the color of the excrement on the surface of the toilet becomes lighter over time due to the influence of water in the toilet bowl.

[0028] In the above-described method for determining excrement, it is also possible that, in the determination, if the G / R value and the B / R value respectively meet the given defecation conditions, the image data is determined to include an image of defecation; if the G / R value and the B / R value respectively meet the given urination conditions, the image data is determined to include an image of urination; and if the G / R value and the B / R value respectively meet the given bleeding conditions, the image data is determined to include an image of bleeding.

[0029] Based on this structure, it is possible to correctly determine the images of defecation, urination, and bleeding from the image data.

[0030] In the above-mentioned method for determining excrement, it is also possible that, in the determination, if the G / R value, the B / R value, the R value, the G value, and the B value each satisfy a given black feces condition, the image data is determined to include an image containing black feces.

[0031] According to this structure, in addition to the G / R value and B / R value, if the R value, G value and B value each satisfy a given black feces condition, it is determined that the image data contains black feces, thus enabling the high-precision detection of images containing black feces in the image data.

[0032] In the above feces determination method, it can also be that in the determination, when the R value, the G value, and the B value each satisfy a given yellow feces condition, it is determined that the image data includes an image of yellow feces.

[0033] According to this structure, an image including yellow feces in the image data can be detected with high accuracy.

[0034] In the above feces determination method, the defecation condition can also be a condition that the G / R value is less than A1% and the B / R value is less than A2% (<A1%).

[0035] According to this structure, an image including defecation in the image data can be detected with high accuracy.

[0036] In the above feces determination method, the urination condition can also be a condition that the G / R value is B1% to B2% and the B / R value is B3% (<B1%) to B4% (<B2%).

[0037] According to this structure, an image including urination in the image data can be detected with high accuracy.

[0038] In the above feces determination method, the bleeding condition can also be a condition that the G / R value is less than C1% and the B / R value is less than C2% (<C1%).

[0039] According to this structure, an image including bleeding in the image data can be determined with high accuracy.

[0040] In the above feces determination method, the black feces condition can also be a condition that the G / R value is D1% to D2%, the B / R value is D3% (<D1%) to D4% (=D2%), and the R value, the G value, and the B value are each less than E.

[0041] According to this structure, an image including black feces in the image data can be detected with high accuracy.

[0042] In the above feces determination method, the yellow feces condition can also be a condition that the R value, the G value, and the B value are each F1 to F2.

[0043] According to this structure, an image including yellow feces in the image data can be detected with high accuracy.

[0044] In the above-described method for determining excrement, it is also possible that, in the determination, if the image data includes pixel data that meets the urination condition with a first number of pixels or more, the image data is determined to include an image of urination; if the image data includes pixel data that meets the defecation condition with a second number of pixels or more, the image data is determined to include an image of defecation; and if the image data includes pixel data that meets the bleeding condition with a third number of pixels or more, the image data is determined to include an image of bleeding.

[0045] Based on this structure, it is possible to correctly distinguish whether pixel data meeting the defecation condition is simply noise or represents defecation. Furthermore, it is possible to correctly distinguish whether pixel data meeting the urination condition is simply noise or represents urination. Moreover, it is possible to correctly distinguish whether pixel data meeting the bleeding condition is simply noise or represents bleeding.

[0046] In the above-described method for determining excrement, the calculation may also involve calculating the G / R value and the B / R value based on the R value, the G value, and the B value of a given detection area within the image data, wherein the given detection area includes the accumulation portion of the toilet.

[0047] According to this structure, the processing of excrement detection can be reduced, thus reducing the processing load compared to detecting excrement based on the overall image data.

[0048] Another aspect of this disclosure discloses an excrement determination device for determining excrement, comprising: an acquisition unit for acquiring color image data of excrement captured by a camera that captures images of the toilet bowl; a calculation unit for calculating a G / R value and a B / R value based on the R (red) value, G (green) value, and B (blue) value included in the image data; a determination unit for determining, based on the G / R value and the B / R value, whether the image data includes an image of at least one of defecation, urination, and bleeding; and an output unit for outputting the determination result.

[0049] Based on this structure, an excrement determination device can be provided that achieves the same effect as the above-mentioned excrement determination method.

[0050] In another aspect of this disclosure, the excrement determination procedure is an excrement determination procedure that enables a computer to function as an excrement determination device. The excrement determination procedure causes the computer to perform the following processes: acquire color image data of excrement captured by a camera that captures images of the toilet bowl; calculate a G / R value and a B / R value based on the R (red) value, G (green) value, and B (blue) value included in the image data; determine, based on the G / R value and the B / R value, whether the image data includes an image of at least one of defecation, urination, and bleeding; and output the determination result.

[0051] Based on this structure, an excrement determination procedure can be provided that achieves the same effect as the excrement determination method described above.

[0052] This disclosure can be implemented as an excrement determination system that operates through such an excrement determination procedure. Furthermore, it goes without saying that such a computer program can be distributed via computer-readable non-transitory recording media such as CD-ROMs or communication networks such as the Internet.

[0053] Furthermore, the embodiments described below are all specific examples of this disclosure. The numerical values, shapes, constituent elements, steps, and order of steps shown in the following embodiments are examples and are not intended to limit this disclosure. In addition, constituent elements among the constituent elements in the following embodiments that are not described in the independent technical solution representing the highest-level concept are described as arbitrary constituent elements. Furthermore, it is possible to combine the various contents in all embodiments.

[0054] (Implementation Method 1)

[0055] Figure 1 This is a diagram showing the structure of the excrement determination system in Embodiment 1 of this disclosure. Figure 2 This is a diagram used to illustrate the configuration positions of the sensor unit 2 and the excrement determination device 1 in Embodiment 1 of this disclosure.

[0056] Figure 1 The excrement detection system shown includes an excrement detection device 1, a sensor unit 2, and a server 3. The excrement detection device 1 is a device that determines the presence or absence of excrement by the user based on image data captured by the camera 24. Figure 2 As shown, the excrement detection device 1 is, for example, installed on the side of the water tank 105. However, this is just an example; the excrement detection device 1 can also be installed on the wall of the bathroom or built into the sensor unit 2, and the installation location is not particularly limited. The excrement detection device 1 is connected to the server 3 via a network. The network is, for example, a wide area communication network such as the Internet. The server 3 manages the user's excrement information generated by the excrement detection device 1.

[0057] like Figure 2 As shown, sensor unit 2 is, for example, attached to the edge 101 of toilet bowl 100. Sensor unit 2 is communicatively connected to excrement detection device 1 via a given communication path. The communication path can be a wireless communication path such as Bluetooth or wireless LAN, or it can be a wired LAN.

[0058] like Figure 2 As shown, the toilet 100 includes a rim 101 and a bowl 102. The rim 101 is disposed at the upper end of the toilet 100, defining the opening of the toilet 100. The bowl 102 is disposed below the rim 101, receiving defecation and urination.

[0059] A water collection section 104 is provided at the bottom of the toilet bowl section 102. A drain outlet (not shown) is provided in the water collection section 104. Excrement and urine discharged into the toilet bowl section 102 are flushed into the sewer pipe through the drain outlet. That is, the toilet 100 is a water-washable toilet. A toilet seat 103 for the user to sit on is provided on the upper part of the toilet 100. The toilet seat 103 rotates up and down. The user sits down with the toilet seat 103 lowered on the upper part of the rim 101. A water tank 105 is provided at the rear of the toilet 100 to collect flushing water for excrement and urine.

[0060] Return to reference Figure 1 Sensor unit 2 includes a seating sensor 21, an illuminance sensor 22, an illumination device 23, and a camera 24. The seating sensor 21 and the illuminance sensor 22 are examples of sensors that detect when a user sits down and leaves the toilet 100.

[0061] The seating sensor 21 is configured in the toilet 100 to measure the distance up to the buttocks of the user sitting on the toilet 100. The seating sensor 21 is, for example, a distance sensor that measures the distance to the buttocks of the user sitting on the toilet 100. An example of a distance sensor is an infrared distance sensor. The seating sensor 21 measures the distance at a given sampling rate and inputs the measured distance to the excrement determination device 1 at the given sampling rate. The seating sensor 21 is an example of a sensor that detects the user's sitting state. The distance value is an example of sensing data representing the user's sitting and leaving the toilet.

[0062] An illuminance sensor 22 is disposed on the toilet 100 to measure the illuminance within the toilet bowl section 102. The illuminance sensor 22 measures the illuminance within the toilet bowl section 102 at a given sampling rate and inputs the measured illuminance value to the waste determination device 1 at the given sampling rate. The illuminance value is an example representing the sensing data of the user sitting down and getting up.

[0063] A lighting device 23 is provided on the toilet 100 to illuminate the toilet bowl section 102. The lighting device 23 is, for example, a white LED, which illuminates the toilet bowl section 102 under the control of the excrement detection device 1.

[0064] Camera 24 is capable of capturing images of the toilet bowl section 102 disposed on the toilet 100. Camera 24 is, for example, a high-sensitivity and wide-angle camera, capable of capturing color images with R (red) components, G (green) components, and B (blue) components. Camera 24 captures images of the interior of the toilet bowl section 102 at a given frame rate and inputs the obtained image data to the excrement determination device 1 at a given sampling rate.

[0065] The excrement detection device 1 includes a processor 11, a memory 12, a communication unit 13, and an entry / exit sensor 14.

[0066] The processor 11 is, for example, a central processing unit (CPU) or an ASIC (application-specific integrated circuit). The processor 11 includes an acquisition unit 111, a calculation unit 112, a determination unit 113, and an output unit 114. The acquisition unit 111 to the output unit 114 can also be implemented by the CPU executing a waste determination program, or they can be constructed using a dedicated integrated circuit.

[0067] The acquisition unit 111 acquires image data captured by the camera 24 at a given sampling rate. Furthermore, the acquisition unit 111 acquires the distance measurement value measured by the seating sensor 21 at a given sampling rate. Further, the acquisition unit 111 acquires the illuminance value measured by the illuminance sensor 22 at a given sampling rate.

[0068] The calculation unit 112 calculates the G / R value and B / R value based on the R value, G value, and B value included in the image data acquired by the acquisition unit 111. Specifically, the calculation unit 112 sets a detection region D1 for the image data acquired by the acquisition unit 111. Figure 3 The G / R value and B / R value are calculated for each pixel data constituting the detection area D1. The G / R value is the value obtained by dividing the G value by the R value, expressed as a percentage (%). The B / R value is the value obtained by dividing the B value by the R value, expressed as a percentage (%). The R value is the grayscale value of the R (red) component of the pixel data, the G value is the grayscale value of the G (green) component of the pixel data, and the B value is the grayscale value of the B (blue) component of the pixel data. The R, G, and B values ​​are, for example, 8-bit values ​​(0-255). However, this is just an example; the R, G, and B values ​​can also be represented using other bit counts.

[0069] Figure 3This diagram shows the detection area D1. The detection area D1 is a rectangular area including the storage section 104 of the toilet 100. The calculation unit 112 reads setting information from the memory 12 and sets the detection area D1 in the image data according to the setting information. The setting information is predetermined coordinate information indicating which coordinates the detection area D1 is set at in the image data. Since the toilet 100 is designed so that excrement is discharged into the storage section 104, by setting the detection area D1 in the storage section 104 and detecting excrement according to the detection area D1, the processing burden is reduced compared to detecting excrement from the entire image data.

[0070] Alternatively, the calculation unit 112 may remove pixel data representing the color (reference toilet color) from the image data of the detection area D1 (hereinafter referred to as the detection area data), and calculate the G / R value and B / R value for each pixel in the remaining detection area data (hereinafter referred to as the determination object image data). Furthermore, the calculation unit 112 may remove pixel data from the detection area data whose R, G, and B values ​​are within a given range relative to the R, G, and B values ​​of the reference toilet color.

[0071] Here, reference toilet color data can be calculated based on image data of a reference area within the toilet bowl 102 extending a given distance from the rim 101 of the toilet bowl 100 towards the accumulation section 104. Specifically, the reference toilet color data has the average values ​​of the R, G, and B values ​​of the reference area. The area directly below the rim 101 is difficult to clean, so if this area is set as the reference area, it is difficult to calculate reference toilet color data that accurately represents the color of the toilet bowl 100. Therefore, the calculation unit 112 calculates the reference toilet color data based on image data of the area extending a given distance from the rim 101.

[0072] The determination unit 113 determines whether the image data includes images of urination, defecation, and bleeding based on the G / R value and B / R value calculated by the calculation unit 112. Specifically, the determination unit 113 determines that the image data includes an image of urination if both the G / R value and B / R value meet a given urination condition. Similarly, the determination unit 113 determines that the image data includes an image of defecation if both the G / R value and B / R value meet a given defecation condition. Furthermore, the determination unit 113 determines that the image data includes an image of bleeding if both the G / R value and B / R value meet a given bleeding condition. Details regarding the defecation, urination, and bleeding conditions will be described later.

[0073] The determination unit 113 determines that the image data includes an image of urination if the image data of the target image includes at least a first number of pixels that meet the urination condition. Similarly, the determination unit 113 determines that the image data includes an image of defecation if the image data of the target image includes at least a second number of pixels that meet the defecation condition. Furthermore, the determination unit 113 determines that the image data includes an image of bleeding if the image data of the target image includes at least a third number of pixels that meet the bleeding condition. The first number of pixels is a preset number indicating that the pixel data meeting the urination condition is not noise but urination data. The second number of pixels is a preset number indicating that the pixel data meeting the defecation condition is not noise but defecation data. The third number of pixels is a preset number indicating that the pixel data meeting the bleeding condition is not noise but bleeding data.

[0074] The output unit 114 generates discharge information including the determination result obtained by the determination unit 113, and outputs the generated discharge information. Here, the output unit 114 may also send the discharge information to the server 3 using the communication unit 13, or it may store the discharge information in the memory 12.

[0075] The memory 12 may be composed of a storage device capable of storing various information, such as RAM (Random Access Memory), SSD (Solid State Drive), or flash memory. For example, the memory 12 stores excretion information, reference toilet color data, and setting information. The memory 12 may also be a portable memory such as a USB (Universal Serial Bus) memory.

[0076] The communication unit 13 is a communication loop that connects the excrement detection device 1 to the server 3 via a network. The communication unit 13 also connects the excrement detection device 1 to the sensor unit 2 via a communication path. Excretion information includes, for example, information indicating that excretion has occurred (defecation, urination, and bleeding) and date and time information indicating the date and time of excretion. The excrement detection device 1 generates excretion information, for example, on a daily basis, and sends the generated excretion information to the server 3.

[0077] The entry / exit sensor 14 is, for example, a distance sensor. The entry / exit sensor 14 detects when a user enters the restroom where the toilet 100 is located. Here, the distance sensor constituting the entry / exit sensor 14 has lower measurement accuracy but a wider detection range compared to the distance sensor constituting the seating sensor 21. The distance sensor is, for example, an infrared distance sensor. Alternatively, the entry / exit sensor 14 can replace the distance sensor and be constituting, for example, a human sensing sensor. The human sensing sensor detects a user within a given distance relative to the toilet 100.

[0078] The above describes the structure of the excrement detection system. Next, a summary of the processing of the excrement detection device 1 will be explained. Figure 4 This is a timing diagram showing an overview of the processing of the excrement determination device 1 in Embodiment 1 of this disclosure.

[0079] exist Figure 4 In the diagram, the first line shows the timing of the entry / exit sensor 14, which is composed of a human sensing sensor; the second line shows the timing of the entry / exit sensor 14, which is composed of a distance measuring sensor; the third line shows the timing of the seating sensor 21; the fourth line shows the timing of the illuminance sensor 22; and the fifth line shows the timing of the lighting device 23. Figure 4 In the example shown, the timing of the entry / exit sensor 14, which is composed of a human sensing sensor, and the entry / exit sensor 14, which is composed of a ranging sensor, are shown, but the excrement determination device 1 may have at least one of the entry / exit sensors 14.

[0080] At time t1, a user enters the restroom. Subsequently, the calculation unit 112 determines that the user has entered the restroom based on sensing data input from the entry / exit sensor 14 (human detection sensor) or the entry / exit sensor 14 (range sensor). Here, if the entry / exit sensor 14 (human detection sensor) detects a user, it sets the sensing data to a high level; if no user is detected, it sets the sensing data to a low level. Therefore, the calculation unit 112 determines that the user has entered the restroom when the sensing data input from the entry / exit sensor 14 (human detection sensor) is high. Furthermore, the calculation unit 112 determines that the user has entered the restroom if the distance measured by the entry / exit sensor 14 (range sensor) is below a threshold A1. The threshold A1 can be an appropriate value such as 50cm, 100cm, or 150cm.

[0081] Furthermore, at time t1, the computing unit 112 begins to store the sensing data input from the entry / exit sensor 14, the seating sensor 21, and the illuminance sensor 22 into the memory 12.

[0082] Furthermore, at time t1, upon detecting a user, the computing unit 112 uses the communication unit 13 to send an entry notification to the server 3 indicating that the user has entered the restroom.

[0083] At time t2, the user sits down on the toilet 100. Subsequently, the distance measured from the sitting sensor 21 falls below the sitting detection threshold A2, and the calculation unit 112 determines that the user has sat down on the toilet 100. The sitting detection threshold A2 is, for example, a predetermined value representing the distance measured from the sitting sensor 21 to the user's buttocks, indicating that the user has sat down on the toilet 100. The sitting detection threshold A2 is less than the threshold A1, and appropriate values ​​such as 10cm, 15cm, or 20cm can be used.

[0084] Furthermore, at time t2, the external light entering the toilet bowl 102 is blocked by the user's buttocks as the user sits down, thus reducing the illuminance value input from the illuminance sensor 22.

[0085] Furthermore, at time t2, upon detection of a seat being placed, the computing unit 112 activates the lighting device 23. Thus, the lighting device 23 illuminates the interior of the toilet bowl 102, ensuring the necessary amount of light for detecting excrement based on image data.

[0086] Furthermore, at time t2, the calculation unit 112 activates the camera 24, which then captures images of the toilet bowl 102. Afterwards, the acquisition unit 111 acquires image data at a given sampling rate.

[0087] Alternatively, an entry notification can also be sent at time t2.

[0088] During the period B1 from time t3 to time t4, the user re-seats on the toilet 100. Subsequently, at time t3, the distance measured by the seat-sitting sensor 21 exceeds the seat-sitting detection threshold A2, and at time t4, the distance measured by the seat-sitting sensor 21 falls below the seat-sitting detection threshold A2. Furthermore, at time t3, the calculation unit 112 turns off the lighting device 23, and at time t4, the calculation unit 112 turns on the lighting device 23. Additionally, the illuminance value of the illuminance sensor 22 also changes in conjunction with the distance measured by the seat-sitting sensor 21.

[0089] At time t5, the user gets off the toilet 100. Subsequently, the distance measured by the seat-down sensor 21 exceeds the seat-down detection threshold A2. Furthermore, at time t5, the computing unit 112 turns off the lighting device 23.

[0090] At time t6, the ranging value measured by the entry / exit sensor 14 exceeds the threshold A1, therefore the calculation unit 112 determines that the user has exited the toilet. Subsequently, the output unit 114 sends an exit notification indicating that the user has exited the toilet to the server 3 using the communication unit 13. Furthermore, at time t6, the output unit 114 sends excretion information generated based on image data to the server 3 using the communication unit 13. In addition, the exit notification and excretion information can also be sent at time t7. Furthermore, image data for detecting excrement can also be sent at time t6.

[0091] At time t7, the state in which the distance measured by the seat sensor 21 exceeds the seat detection threshold A2 at time t5 lasts for a period of B2. Therefore, the calculation unit 112 ends the storage of sensing data in the memory 12 and the camera 24 ends the shooting of the toilet section 102.

[0092] At time t8, since the high-level state of the entry / exit sensor 14 (human sensing sensor) has passed period B4 since time t7, the calculation unit 112 sets the excrement determination device 1 to standby state.

[0093] Next, the processing of the excrement detection device 1 will be explained. Figure 5 This is a flowchart illustrating an example of the process by which the excrement determination device 1 generates image data that will be sent to the target.

[0094] In step S21, the calculation unit 112 determines whether the user has sat down on the toilet 100. Here, if the distance value obtained by the acquisition unit 111 from the sitting sensor 21 is below the sitting detection threshold A2 (Yes in step S21), the calculation unit 112 determines that the user has sat down and proceeds to step S22. On the other hand, if the distance value is greater than the sitting detection threshold A2 (No in step S21), the calculation unit 112 puts the process on standby in step S21.

[0095] In step S22, the calculation unit 112 determines whether the pixel count data PD(X) for urination is less than the pixel count data PD(-20) for urination. The pixel count data PD for urination refers to the number of pixels in the detection area data that meet the urination condition. The pixel count data PD(-20) for urination is the pixel count data for urination included in the detection area data of the sampling points (t-20) 20 sampling points before the latest sampling point (t). The pixel count data PD(X) for urination starts from the beginning. Figure 5The processing starts with the maximum value of the pixel count data PD of the past urination relative to the sampling point (t-20). If the pixel count data PD(X) of urination is less than the pixel count data PD(-20) of urination (Yes in step S22), the processing proceeds to step S23; if the pixel count data PD(X) of urination is greater than or equal to the pixel count data PD(-20) of urination (No in step S22), the processing proceeds to step S25.

[0096] Here, the pixel count data PD(-20) of urination 20 sampling points was used, but this is just an example; any pixel count data PD(t) before sampling points can also be used. The same applies to the pixel count data PD(-20) of defecation, which will be discussed later.

[0097] In step S23, the calculation unit 112 updates the pixel count data PD(X) of urination by substituting the pixel count data PD(-20) of urination into the pixel count data PD(X) of urination.

[0098] In step S24, the calculation unit 112 updates the RGB data of urination. The RGB data of urination refers to dividing the detection area data into multiple blocks R1 (… Figure 3 The average values ​​of R, G, and B of the pixel data of each block R1 that meet the urination conditions.

[0099] like Figure 3 As shown, block R1 is image data obtained by dividing the detection region data corresponding to detection region D1 into, for example, 8 rows × 8 columns, totaling 64 blocks.

[0100] Here, each block R1 is numbered 1 to 64 according to the grid scanning order, from the upper left block R1 to the lower right block R1. The RGB data for urination refers to the data in each block R1 composed of the average R value, average G value, and average B value of the pixel data that meet the urination conditions. In block R1, for example, if there are Q1 pixels that meet the urination conditions, the calculation unit 112 calculates the average R value, average G value, and average B value of these Q1 pixels as the RGB data for urination. Therefore, the RGB data for urination consists of 64 R values, G values, and B values. Here, block R1 is obtained by dividing the detection area data into 8 rows × 8 columns, but this is just an example; block R1 can also be a block after dividing the detection area data into n (n is an integer of 2 or more) rows × m (m is an integer of 2 or more) columns. (This will be discussed later.) Figure 6In step S11, the RGB data of urination with this data structure is included in the excretion information and sent, thereby reducing the amount of excretion information data. Furthermore, the RGB data of urination is transformed into data that appears to have been pixelated, thus achieving privacy protection compared to managing the image data itself.

[0101] Through the processing in steps S22 to S24, the RGB data of urine at the sampling point with the largest pixel count data PD is set as the RGB data of the sending object.

[0102] In step S25, the calculation unit 112 determines whether the defecation pixel count data PD(X) is less than the defecation pixel count data PD(-20). The defecation pixel count data PD refers to the number of pixels in the detection area data that meet the defecation conditions. The defecation pixel count data PD(-20) is the defecation pixel count data included in the detection area data of the sampling point (t-20) 20 sampling points before the latest sampling point (t). The defecation pixel count data PD(X) is the pixel count data starting from... Figure 5 The processing starts with the maximum value of the past defecation pixel count data PD relative to the sampling point (t-20). If the defecation pixel count data PD(X) is less than the defecation pixel count data PD(-20) (Yes in step S25), the processing proceeds to step S26; if the defecation pixel count data PD(X) is greater than or equal to the defecation pixel count data PD(-20) (No in step S25), the processing proceeds to step S28.

[0103] In step S26, the calculation unit 112 updates the defecation pixel count data PD(X) by substituting the defecation pixel count data PD(-20) into the defecation pixel count data PD(X).

[0104] In step S27, the calculation unit 112 updates the RGB data of defecation. The data structure of the RGB data of defecation is the same as that of the RGB data of urination.

[0105] Through the processing in steps S25 to S27, the RGB data of defecation at the sampling point with the largest pixel count data PD is set as the RGB data of the sending object.

[0106] In step S28, the calculation unit 112 determines whether the user has left their seat. Here, the calculation unit 112 determines that the user has left their seat if the distance measured by the seat sensor 21 exceeds the seat detection threshold A2 for a period B2. If the distance measured is less than the seat detection threshold A2 or the period exceeding the seat detection threshold A2 does not last for period B2, the calculation unit 112 determines that the user has not left their seat. If the user is determined not to have left their seat (No in step S28), the process returns to step S22; if the user is determined to have left their seat (Yes in step S28), the process ends.

[0107] Figure 6 This is a flowchart illustrating an example of the processing in the excrement detection device 1 of Embodiment 1 from the time the user sits down until they leave the seat. Additionally, Figure 6 Flowcharts and Figure 5 The flowcharts are executed in parallel.

[0108] In step S1, the calculation unit 112 determines whether the user has sat down on the toilet 100. Here, compared with... Figure 5 Similarly, in step S21, the calculation unit 112 determines whether the user has sat on the toilet 100 by determining whether the distance value obtained by the acquisition unit 111 from the seat sensor 21 is below the seat detection threshold A2. If it is determined that the user has sat on the toilet 100 (yes in step S1), the process proceeds to step S2; if it is determined that the user has not sat on the toilet 100 (no in step S1), the process pauses in step S1.

[0109] In step S2, the determination unit 113 determines whether urination is confirmed. If urination is not confirmed (No in step S2), the process proceeds to step S3; if urination is confirmed (Yes in step S2), the process proceeds to step S6. Confirmation of urination means that it can be determined that the image data includes an image of urination.

[0110] In step S3, the determination unit 113 performs excretion detection processing based on the image data, determining whether the user has performed at least one of urination or defecation. Details of the excretion detection processing are available using... Figure 7 The following description will follow.

[0111] In step S4, if the determination unit 113 determines that urination has occurred during the excretion detection process (Yes in step S4), it confirms that urination has occurred (step S5). On the other hand, if no urination is detected during the excretion detection process (No in step S4), the process proceeds to step S6.

[0112] In step S6, the determination unit 113 determines whether it is determined to be defecation. If it is determined to be defecation (Yes in step S6), the process proceeds to step S10; if it is not determined to be defecation (No in step S6), the process proceeds to step S7. Determining defecation means that it can be determined that the image data includes an image of defecation.

[0113] In step S7, the determination unit 113 performs excretion detection processing.

[0114] In step S8, if the determination unit 113 determines that there has been defecation in the excretion detection process (Yes in step S8), it confirms that there has been defecation (step S9). On the other hand, if the determination unit 113 does not determine that there has been defecation in the excretion detection process (No in step S8), it proceeds to step S10.

[0115] In step S10, the calculation unit 112 determines whether the user has left their seat. Here, with... Figure 5 Similarly, in step S28, the calculation unit 112 determines that the user has left the seat if the distance measured by the seat sensor 21 exceeds the seat detection threshold A2 for a period of B2. If the distance measured is greater than the seat detection threshold A2 (yes in step S10), the process proceeds to step S11; if the distance measured is less than the seat detection threshold A2 (no in step S10), the process returns to step S2.

[0116] In step S11, the output unit 114 uses the communication unit 13 to send an exit notification and discharge information to the server 3. This discharge information includes information from... Figure 5 The flowchart calculates RGB data for urination, RGB data for defecation, pixel count data PD(X) for urination, and pixel count data PD(X) for defecation.

[0117] Next, the excretion detection and treatment process will be explained. Figure 7 This is a flowchart illustrating an example of an excretion detection process.

[0118] In step S110, the calculation unit 112 obtains reference toilet color data from the memory 12.

[0119] In step S120, the calculation unit 112 acquires image data at the processing time from the image data acquired by the acquisition unit 111. The image data at the processing time is, for example, image data up to a given number of sampling points (e.g., 20 sampling points) from the latest sampling point. However, this is just an example; the image data at the processing time could also be image data from the latest sampling point.

[0120] In step S130, the calculation unit 112 extracts the image data (detection region data) of the detection region D1 from the image data at the processing time.

[0121] In step S140, the calculation unit 112 determines whether the detection area data includes pixel data whose color differs from the reference toilet color. If the detection area data includes pixel data whose color differs from the reference toilet color (Yes in step S140), the process proceeds to step S150; if the detection area data does not include pixel data whose color differs from the reference toilet color (No in step S140), the process proceeds to step S4 or S8. Figure 6 ).

[0122] In step S150, the calculation unit 112 removes pixel data whose R, G, and B values ​​are outside a given range relative to the reference toilet color data from the detection area data, thereby generating object image data for determination.

[0123] In step S160, the calculation unit 112 calculates the G / R value and the B / R value for each pixel data of the determination object image data.

[0124] In step S170, the determination unit 113 determines whether the image data of the determination object includes pixel data that meets the urination condition at the first pixel number or above. Figure 8 It is a table summarizing the conditions of defecation, urination, and bleeding. Figure 8 In the middle, "Low" is the lower threshold of the range that meets the conditions, and "High" is the upper threshold of the range that meets the conditions.

[0125] The urination condition is a G / R value of B1% to B2% and a B / R value of B3% to B4%. Specifically, B3% < B1% and B4% < B2%. If the number of pixels meeting the urination condition is greater than or equal to the first pixel (Yes in step S170), the process proceeds to step S180. If the number of pixels meeting the urination condition is less than the first pixel (No in step S170), the process proceeds to step S190.

[0126] In step S180, the determination unit 113 determines that there is urination based on the image data of the object being processed, and proceeds the processing to step S4 or step S8. Figure 6 ).

[0127] In step S190, the determination unit 113 determines whether the image data of the determination object includes pixel data of a second or higher number that meets the defecation condition. (Refer to...) Figure 8The defecation condition is a G / R value of 0% to A1% and a B / R value of 0% to A2%. Where A2% < A1%. If there are at least two pixels meeting the defecation condition (Yes in step S190), the process proceeds to step S200; if there are fewer than two pixels meeting the defecation condition (No in step S190), the process proceeds to step S210.

[0128] In step S200, the determination unit 113 determines that there is defecation based on the image data of the object being processed, and proceeds the processing to step S4 or step S8. Figure 6 ).

[0129] In step S210, the determination unit 113 determines whether the image data of the determination target includes pixel data that meets the bleeding condition at the third or higher pixel count. (Refer to...) Figure 8 The bleed condition is a G / R value of 0% to C1% and a B / R value of 0% to C2%. Where C2% < C1%. If the number of pixel data satisfying the bleed condition is the third or more (Yes in step S210), the process proceeds to step S220; if the number of pixel data satisfying the bleed condition is less than the second (No in step S210), the process proceeds to step S230.

[0130] In step S220, the determination unit 113 determines that there is bleeding in the image data of the object being processed, and proceeds the processing to step S4 or step S8. Figure 6 ).

[0131] In step S230, the determination unit 113 determines that there is a foreign object in the image data of the determination object, and proceeds the processing to step S4 or step S8. Figure 6 Foreign objects include items such as diapers and toilet paper.

[0132] In addition, Figure 8 In this context, the conditions for defecation, urination, and bleeding can also have a relationship of C2% < C1% < A2% < B3% < B1% = A1% < B4% < B2%.

[0133] In detail, A1 is, for example, 80 or more but less than 90, preferably 83 or more but less than 87.

[0134] A2 is, for example, 40 or more but less than 50, preferably 43 or more but less than 47.

[0135] B1 is, for example, 80 or higher and 90 or lower, preferably 83 or higher and 87 or lower.

[0136] B2 is, for example, 100 to 110, preferably 103 to 107.

[0137] B3 is, for example, 45 or more and 55 or less, preferably 48 or more and 52 or less.

[0138] B4 is 92 to 103, preferably 95 to 99.

[0139] C1 is, for example, 32 or more but less than 42, preferably 35 or more but less than 39.

[0140] C2 is, for example, 22 or more and 31 or less, preferably 25 or more and 29 or less.

[0141] Thus, according to Embodiment 1, the determination of whether the image data includes at least one of defecation, urination, and bleeding is based on the G / R value and B / R value. Here, the G / R value and B / R value have the characteristic of maintaining their values ​​even if the color of the excrement on the surface of the water-filled toilet becomes lighter over time. As a result, the excrement in the water-filled toilet can be detected with high precision.

[0142] (Implementation Method 2)

[0143] Implementation method 2 determines whether the image data includes images of black and yellow feces. Figure 9 This is a block diagram illustrating an example of the structure of the excrement determination system in Embodiment 2. Furthermore, in Embodiment 2, the same symbols are used to label the same components as in Embodiment 1, and descriptions are omitted.

[0144] The processor 21A of the excrement determination device 1A includes an acquisition unit 211, a calculation unit 212, a determination unit 213, and an output unit 214. The acquisition unit 211, the calculation unit 212, and the output unit 214 are the same as those of the acquisition unit 111, the calculation unit 112, and the output unit 114.

[0145] The determination unit 213 determines that an image contains black stool if the G / R value and B / R value calculated by the calculation unit 212, and the R value, G value, and B value included in the image data (or the image data of the determination object) each satisfy a given black stool condition. Black stool is stool with a dark gray color. Black stool is stool that may be excreted after taking sodium citrate or the like. If the stool condition shown in Embodiment 1 is used, such black stool cannot be determined with high accuracy. Therefore, in this embodiment, the black stool condition is specified.

[0146] If the R value, G value, and B value included in the image data (the image data to be determined) satisfy the given yellow feces condition, the determination unit 213 determines that the image data contains yellow feces.

[0147] Some users experience yellow stools (yellow feces) due to the effects of medication. Yellow stools may be mistaken for urination. Therefore, in this embodiment, the condition for yellow stools is specified.

[0148] Figure 10 This is a flowchart illustrating an example of the excretion detection process in Embodiment 2. The processing steps S110 to S220 are... Figure 7 same.

[0149] If there are no pixel data that meet the bleed condition above the third pixel number (No in step S210), the process proceeds to step S230.

[0150] In step S230, the determination unit 113 determines whether there are pixel data in the image data of the determination target that satisfy the black feces condition at the fourth pixel number or higher. The fourth pixel number is a preset number of pixels that indicates that the pixel data satisfying the black feces condition is black feces rather than noise.

[0151] Figure 11 This is a table summarizing the conditions for black stool. The conditions for black stool are: a G / R value of D1% to D2%, a B / R value of D3% to D4%, and R, G, and B values ​​each being 0 to E. For example, D3% and D4% can also be D3% < D1% and D4% = D2%. Furthermore, when the image data is 8 bits, the R, G, and B values ​​are each set to values ​​from 0 to 255, therefore E is 0 to 255.

[0152] In detail, D1 is, for example, 85 or more and 95 or less, preferably 88 or more and 92 or less.

[0153] D2 is, for example, 105 or more but less than 115, preferably 108 or more but less than 112.

[0154] D3 is, for example, 55 or more but less than 65, preferably 58 or more but less than 62.

[0155] D4 is, for example, 105 or more but less than 115, preferably 108 or more but less than 112.

[0156] When the image data is 8 bits, E is, for example, 85 to 95, preferably 88 to 92. When the number of bits in the image data is arbitrary, E is, for example, 33% to 37%, preferably 34% to 36%.

[0157] If there are at least 4 pixels that meet the blackout condition (Yes in step S230), the process proceeds to step S240; if the number of pixels that meet the blackout condition is less than the number of 4 pixels (No in step S230), the process proceeds to step S250.

[0158] In step S240, the determination unit 113 determines that there is black residue in the image data of the object to be processed, and proceeds the processing to step S4 or step S8. Figure 6 In this case, in step S6 ( Figure 6 It was determined to be defecation in the sample.

[0159] In step S250, the determination unit 113 determines whether there are any pixel data in the image data of the determination target that satisfy the yellow feces condition at the 5th pixel number or higher. The 5th pixel number is a preset number of pixels that indicates that the pixel data satisfying the yellow feces condition is yellow feces rather than noise.

[0160] Figure 12 This is a table summarizing the conditions for yellow stool. The conditions for yellow stool are that the R value, G value, and B value are respectively above F1 and below F2. When the image data is 8 bits, F1 and F2 use values ​​from 0 to 255.

[0161] In detail, when the image data is 8 bits, F1 is, for example, 95 to 105, preferably 98 to 102. When the number of bits in the image data is arbitrary, F1 is, for example, 37% to 41%, preferably 38% to 40%.

[0162] When the image data is 8 bits, F2 is, for example, 245 to 255, preferably 250 to 255. When the number of bits in the image data is arbitrary, F2 is, for example, 96% to 100%, preferably 98% to 100%.

[0163] If there are more than 5 pixels that meet the yellow poop condition (Yes in step S250), the process proceeds to step S260; if the number of pixels that meet the yellow poop condition is less than the number of 5 pixels (No in step S250), the process proceeds to step S270.

[0164] In step S260, the determination unit 113 determines that the image data of the object to be processed contains yellow stool, and proceeds the processing to step S4 or step S8. Figure 6 In this case, in step S6 ( Figure 6 It was determined to be defecation in the sample.

[0165] In step S270, the determination unit 113 determines that there is a foreign object in the image data of the determination object, and proceeds the processing to step S4 or step S8. Figure 6 Foreign objects include items such as diapers and toilet paper.

[0166] Thus, according to Embodiment 2, it can be determined that the image data includes both black and yellow feces.

[0167] The present disclosure can be adapted to the following variations.

[0168] (1) In Embodiment 2, the yellow stool condition shown in step S250 can also be set after there are pixel data that satisfy the urination condition (in step S270) with a first or more pixel count. In this case, the determination unit 113 determines that there is yellow stool if there are pixel data that satisfy both the urination condition and the yellow stool condition with a fifth or more pixel count.

[0169] (2) In Figure 7 In step S170, the condition is "yes" if there are at least one pixel that meets the urination condition. However, this is just an example; it could also be that if there are pixel data that meets the urination condition, then it is determined to be "yes". In this case, as long as there is even one pixel that meets the urination condition, the image is determined to have urination. This can also be applied in the same way to the conditions of defecation, bleeding, and yellow stool.

[0170] Industrial availability

[0171] According to this disclosure, it is useful in accurately detecting excrement based on image data.

Claims

1. A method for determining excrement, which is a method for determining excrement in an excrement determining device. The processor of the excrement determination device performs the following processing: Acquire continuous, color images of excrement captured by a camera that films the inside of the toilet bowl. Based on the R, G, and B values ​​included in each pixel of the image data, calculate the G / R value and the B / R value, where, R is red, G is green, and B is blue. Set specific conditions for defecation, urination, and bleeding, respectively. For each image captured during the sitting period, the number of pixels that satisfy the ranges of the G / R value and the B / R value, which are preset as the conditions for defecation, urination, and bleeding, respectively, is determined. Based on the number of pixels, determine whether the image data includes an image of at least one of defecation, urination, and bleeding. Output the result of the determination. The determination results include: RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition during the sitting period is the maximum number of pixels, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition during the sitting period is the maximum number of pixels.

2. The method for determining excrement according to claim 1, wherein, In the determination, if the G / R value, the B / R value, the R value, the G value, and the B value each satisfy a given black feces condition, the image data is determined to contain an image with black feces.

3. The method for determining excrement according to claim 1 or 2, wherein, In the determination, if the R value, the G value, and the B value each satisfy a given yellow stool condition, the image is determined to include yellow stool in the image data.

4. The method for determining excrement according to claim 1, wherein, The defecation condition is that the G / R value is less than A1% and the B / R value is less than A2%, where A2% < A1%.

5. The method for determining excrement according to claim 1, wherein, The urination condition is that the G / R value is B1% to B2% and the B / R value is B3% to B4%, wherein B3% < B1% and B4% < B2%.

6. The method for determining excrement according to claim 1, wherein, The bleeding condition is that the G / R value is less than C1% and the B / R value is less than C2%, where C2% < C1%.

7. The method for determining excrement according to claim 2, wherein, The condition for black stool is that the G / R value is D1% to D2%, the B / R value is D3% to D4%, and the R value, G value, and B value are all less than E, wherein D3% < D1% and D4% = D2%.

8. The method for determining excrement according to claim 3, wherein, The yellow stool condition is when the R value, the G value, and the B value are respectively F1 to F2.

9. The method for determining excrement according to claim 1, wherein, In the determination, If the image data includes at least one pixel that satisfies the urination condition, then the image data is determined to include an image of urination. If the image data includes at least two pixels that meet the defecation condition, then the image is determined to include the defecation condition. If the image data includes pixel data that satisfies the bleeding condition at the third or higher pixel count, the image data is determined to include the bleeding.

10. The method for determining excrement according to any one of claims 1-2 and 4-9, wherein, In the calculation, the G / R value and the B / R value are calculated based on the R value, the G value, and the B value of a given detection region within the image data, wherein the given detection region includes the accumulation portion of the toilet.

11. An excrement determination device for determining excrement, comprising: The acquisition unit acquires continuous color image data of excrement captured by a camera that films the inside of the toilet bowl; The computing unit calculates the G / R value and the B / R value based on the R value, G value, and B value included in each pixel of the image data, wherein... R stands for red, G for green, and B for blue; The determination unit sets given defecation, urination, and bleeding conditions for defecation, urination, and bleeding, respectively. For each image during the sitting period, it calculates the number of pixels that satisfy the range of the G / R value and the B / R value preset as the defecation condition, the urination condition, and the bleeding condition, respectively. Based on the number of pixels, it determines whether the image data includes an image of at least one of defecation, urination, and bleeding. and The output unit outputs the result of the determination. The determination results include: RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition during the sitting period is the maximum number of pixels, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition during the sitting period is the maximum number of pixels.

12. A computer program product comprising an excrement determination program, said excrement determination program enabling a computer to function as an excrement determination device. The excrement determination procedure causes the computer to perform the following processes: Acquire continuous color images of excrement captured by a camera that films the inside of the toilet bowl; Based on the R, G, and B values ​​included in each pixel of the image data, calculate the G / R value and the B / R value, where, R is red, G is green, and B is blue. Set specific conditions for defecation, urination, and bleeding, respectively. For each image captured during the sitting period, the number of pixels that satisfy the ranges of the G / R value and the B / R value, which are preset as the conditions for defecation, urination, and bleeding, respectively, is determined. Based on the number of pixels, determine whether the image data includes an image of at least one of defecation, urination, and bleeding. Output the result of the determination. The determination results include: RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition during the sitting period is the maximum number of pixels, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition during the sitting period is the maximum number of pixels.