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

The method calculates G/R and B/R values from R, G, and B values in toilet bowl image data to accurately detect excrement, addressing the challenge of fading and sinking colors in standing water.

JP7869150B2Active Publication Date: 2026-06-02PANASONIC HOUSING SOLUTIONS CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
PANASONIC HOUSING SOLUTIONS CO LTD
Filing Date
2021-11-05
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing techniques struggle to accurately detect excrement in the standing water of a toilet bowl due to color fading and sinking, making it difficult to reliably determine bowel movements from image data.

Method used

A method and device that calculate G/R and B/R values from R, G, and B values in image data to differentiate between defecation, urination, and bleeding, using specific conditions to determine the presence of excrement, even as it sinks and fades.

Benefits of technology

Accurately detects excrement in toilet bowl water by maintaining value differentiation, enabling precise determination of bowel movements without human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007869150000001
    Figure 0007869150000001
  • Figure 0007869150000002
    Figure 0007869150000002
  • Figure 0007869150000003
    Figure 0007869150000003
Patent Text Reader

Abstract

This excrement determination device obtains image data of excrement captured by a camera for imaging the interior of the bowl of a toilet, calculates a G / R value and a B / R value on the basis of the R (red) value, the G (green) value and the B (blue) value included in the image data, determines whether or not said image data includes an image of a bowel movement, urination and / or bleeding on the basis of the G / R value and the B / R value, and outputs the determination results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technique for determining excrement based on image data.

Background Art

[0002] Patent Document 1 discloses a technique in which a color image is converted into a grayscale image, the magnitude of the gradient of the image is calculated from the grayscale image, the calculated magnitude of the gradient of the image is classified into bins of a histogram with a constant step size, and the histogram classified into the bins is input into a classifier such as a support vector machine to determine the hardness of feces and the like.

[0003] However, the technique of Patent Document 1 needs further improvement to correctly detect excrement in the standing water of the toilet bowl.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

[0005] The present disclosure has been made to solve such problems, and an object thereof is to provide a technique capable of accurately detecting excrement in the standing water of a toilet bowl.

[0006] An excrement determination method according to one aspect of the present disclosure is an excrement determination method in an excrement determination device for determining excrement, wherein a processor of the excrement determination device acquires color image data of excrement photographed by a camera that photographs the inside of the toilet bowl, calculates a G / R value and a B / R value based on an R (red) value, a G (green) value, and a B (blue) value included in the image data, determines whether at least one image of defecation, urination, and bleeding is included in the image data based on the G / R value and the B / R value, and outputs the result of the determination.

[0007] According to this disclosure, it is possible to accurately detect excrement in the water in the toilet bowl. [Brief explanation of the drawing]

[0008] [Figure 1] This figure shows the configuration of the excrement determination system in Embodiment 1 of the present disclosure. [Figure 2] This figure illustrates the arrangement of the sensor unit and the excrement detection device in Embodiment 1 of the present disclosure. [Figure 3] This is a diagram showing the detection area. [Figure 4] This is a sequence diagram showing an overview of the processing of the excrement determination device in Embodiment 1 of this disclosure. [Figure 5] This flowchart shows an example of the process by which a waste detection device generates image data to be transmitted. [Figure 6] This flowchart shows an example of the process in the excrement detection device according to Embodiment 1, from when the user sits down until they leave the seat. [Figure 7] This is a flowchart showing an example of excretion detection processing. [Figure 8] This is a table summarizing the conditions for defecation, urination, and bleeding. [Figure 9] This is a block diagram showing an example of the configuration of the excrement determination system in Embodiment 2. [Figure 10] This is a flowchart showing an example of the excretion detection process in Embodiment 2. [Figure 11] This is a table summarizing the conditions for black stools. [Figure 12] This is a table summarizing the conditions for orange-colored smuggling. [Modes for carrying out the invention]

[0009] (Knowledge forming the basis of this disclosure) In nursing care facilities, information about the frequency and timing of bowel movements is crucial for understanding the health risks of those being cared for. However, assigning caregivers the task of recording this information places a significant burden on them. Furthermore, having caregivers record this information while they are near the person being cared for places a considerable psychological burden on that person. Therefore, there is a need for a system that recognizes excrement from image data captured by a camera installed in the toilet, generates bowel information based on the recognition results, and automatically records the generated information.

[0010] However, since the excrement on the surface of the water collected in the toilet bowl gradually sinks to the bottom and its color fades over time, there is a problem in that simply detecting excrement from the R, G, and B values ​​of the image data does not allow for accurate detection of excrement.

[0011] This disclosure was made to address these issues.

[0012] A method for determining excrement in one aspect of the present disclosure is a method for determining excrement in an excrement determination device, wherein the processor of the excrement determination device acquires color image data of excrement captured by a camera that photographs the inside of a toilet bowl, calculates a G / R value and a B / R value based on the R (red) value, G (green) value, and B (blue) value contained in the image data, determines whether or not the image data contains at least one image of defecation, urination, and bleeding based on the G / R value and the B / R value, and outputs the result of the determination.

[0013] According to this configuration, G / R values and B / R values are calculated based on the R value, B value, and G value included in the image data, and it is determined whether the image data includes at least one of images of defecation, urination, and bleeding based on the calculated G / R values and B / R values. Here, the G / R values and B / R values have the characteristic that the values are maintained even when the color of the excrement on the surface of the standing water gradually sinks to the bottom and the color of the excrement on the surface of the standing water fades over time. As a result, even if the color of the excrement on the surface of the standing water fades over time due to the influence of the standing water in the toilet bowl, the image of the excrement can be accurately detected.

[0014] In the above excrement determination method, in the determination, when the G / R value and the B / R value respectively satisfy a predetermined defecation condition, it is determined that the image data includes an image of defecation, and when the G / R value and the B / R value respectively satisfy a predetermined urination condition, it is determined that the image data includes an image of urination, and when the G / R value and the B / R value respectively satisfy a predetermined bleeding condition, it is also possible to determine that the image data includes an image of bleeding.

[0015] According to this configuration, images of defecation, urination, and bleeding can be accurately determined from the image data.

[0016] In the above excrement determination method, in the determination, when each of the G / R value, the B / R value, the R value, the G value, and the B value satisfies a predetermined black stool condition, it is also possible to determine that the image data includes an image of black stool.

[0017] According to this configuration, in addition to the G / R value and the B / R value, when each of the R value, the G value, and the B value satisfies a predetermined black stool condition, it is determined that the image data includes an image of black stool, so it is possible to accurately detect that the image data includes an image of black stool.

[0018] In the above excrement determination method, in the determination, when each of the R value, the G value, and the B value satisfies a predetermined orange stool condition, it may be determined that the image data includes an image of orange stool.

[0019] According to this configuration, it is possible to accurately detect that the image data includes an image of orange stool.

[0020] In the above excrement determination method, the defecation condition may be that the G / R value is less than A1% and the B / R value is less than A2% (<A1%).

[0021] According to this configuration, it is possible to accurately detect that the image data includes an image of defecation.

[0022] In the above excrement determination method, the urination condition may be that the G / R value is between B1% and B2% and the B / R value is between B3% (<B1%) and B4% (<B2%).

[0023] According to this configuration, it is possible to accurately detect that the image data includes an image of urination.

[0024] In the above excrement determination method, the bleeding condition may be that the G / R value is less than C1% and the B / R value is less than C2% (<C1%).

[0025] According to this configuration, it is possible to accurately determine that the image data includes an image of bleeding.

[0026] In the above excrement determination method, the black stool condition may be that the G / R value is between D1% and D2%, the B / R value is between D3% (<D1%) and D4% (=D2%), and the R value, the G value, and the B value are each less than E.

[0027] According to this configuration, it is possible to accurately detect that the image data includes an image of black stool.

[0028] In the above method for determining excrement, the orange stool condition may be a condition where the R value, G value, and B value are F1 to F2, respectively.

[0029] This configuration allows for accurate detection of whether the image data contains images of orange-colored smuggling.

[0030] In the above method for determining excrement, if the image data contains at least one pixel that satisfies the urination conditions, then the image data is determined to urination If it is determined that the image contains the above, and the image data contains two or more pixels that satisfy the defecation condition, then the image data contains the above defecation If it is determined that an image of bleeding is included, and the image data contains three or more pixels that satisfy the bleeding condition, it may be determined that the image data contains an image of bleeding.

[0031] This configuration allows for accurate distinction between pixel data that satisfies the defecation condition and simply represents defecation. Similarly, it allows for accurate distinction between pixel data that satisfies the urination condition and simply represents urination. Furthermore, it allows for accurate distinction between pixel data that satisfies the bleeding condition and simply represents bleeding.

[0032] In the above-described method for determining excrement, the calculation may involve calculating the G / R value and the B / R value based on the R value, G value, and B value of a predetermined detection area within the image data that includes the reservoir portion of the toilet bowl.

[0033] This configuration allows for a more focused process to detect excrement, thus reducing the processing load compared to detecting excrement from the entire image data.

[0034] An excrement determination device in another aspect of the present disclosure is an excrement determination device for determining excrement, comprising: an acquisition unit that acquires color image data of excrement captured by a camera that photographs the inside of a toilet bowl; a calculation unit that calculates a G / R value and a B / R value based on the R (red) value, G (green) value, and B (blue) value contained in the image data; a determination unit that determines whether or not the image data contains at least one image of defecation, urination, and bleeding based on the G / R value and the B / R value; and an output unit that outputs the result of the determination.

[0035] This configuration makes it possible to provide a waste determination device that can achieve the same effects as the waste determination method described above.

[0036] A different aspect of the present disclosure is an excrement determination program that causes a computer to function as an excrement determination device, the program causing the computer to acquire color image data of excrement captured by a camera that photographs the inside of a toilet bowl, calculate a G / R value and a B / R value based on the R (red), G (green), and B (blue) values ​​contained in the image data, determine whether the image data contains at least one image of defecation, urination, and bleeding based on the G / R value and the B / R value, and output the result of the determination.

[0037] This configuration makes it possible to provide a waste determination program that can achieve the same effects as the waste determination method described above.

[0038] This disclosure can also be implemented as an excrement determination system operated by such an excrement determination program. Furthermore, it goes without saying that such a computer program can be distributed via a computer-readable non-temporary recording medium such as a CD-ROM or via a communication network such as the Internet.

[0039] The embodiments described below are all specific examples of this disclosure. The numerical values, shapes, components, steps, and order of steps shown in the following embodiments are examples only and are not intended to limit this disclosure. Furthermore, among the components in the following embodiments, those not described in the independent claim representing the highest-level concept will be described as optional components. In addition, the contents of each embodiment can be combined.

[0040] (Embodiment 1) Figure 1 is a diagram showing the configuration of the excrement detection system in Embodiment 1 of the present disclosure. Figure 2 is a diagram illustrating the arrangement of the sensor unit 2 and the excrement detection device 1 in Embodiment 1 of the present disclosure.

[0041] The excrement detection system shown in Figure 1 includes an excrement detection device 1, a sensor unit 2, and a server 3. The excrement detection device 1 is a device that determines whether or not a user has excreted based on image data captured by a camera 24. The excrement detection device 1 is installed, for example, on the side of a water storage tank 105, as shown in Figure 2. However, this is just an example, and the excrement detection device 1 may be installed on the wall of the toilet, or built into the sensor unit 2, and its 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 excretion information generated by the excrement detection device 1.

[0042] As shown in Figure 2, the sensor unit 2 is attached, for example, to the rim 101 of the toilet bowl 100. The sensor unit 2 is connected to the excrement detection device 1 so as to be able to communicate with each other via a predetermined communication path. The communication path may be a wireless communication path such as Bluetooth® or Wi-Fi, or it may be a wired LAN.

[0043] As shown in Figure 2, the toilet bowl 100 includes a rim 101 and a bowl portion 102. The rim 101 is located at the upper end of the toilet bowl 100 and defines the opening of the toilet bowl 100. The bowl portion 102 is located below the rim 101 and receives feces and urine.

[0044] A reservoir 104 for storing water (water) is provided at the bottom of the bowl 102. A drain outlet (not shown) is provided in the reservoir 104. Feces and urine excreted in the bowl 102 are drained through the drain outlet into the sewer pipe. In other words, the toilet 100 is a flush toilet. A toilet seat 103 for the user to sit on is provided on top of the toilet 100. The toilet seat 103 rotates up and down. The user sits with the toilet seat 103 lowered on the rim 101. A water tank 105 for storing flushing water for flushing away feces and urine is provided at the rear of the toilet 100.

[0045] Refer back to Figure 1. Sensor unit 2 includes a seating sensor 21, an illuminance sensor 22, a lighting 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 on and leaves the toilet bowl 100.

[0046] The seating sensor 21 is positioned on the toilet 100 so as to be able to measure the distance to the buttocks of a user seated on the toilet 100. The seating sensor 21 is composed of, for example, a distance measuring sensor and measures a distance value which is the distance to the buttocks of a user seated on the toilet 100. An example of a distance measuring sensor is an infrared distance measuring sensor. The seating sensor 21 measures the distance value at a predetermined sampling rate and inputs the measured distance value to the excrement determination device 1 at a predetermined sampling rate. The seating sensor 21 is an example of a sensor that detects the seating state of a user. The distance value is an example of sensing data that indicates the user's seating and standing states.

[0047] The illuminance sensor 22 is positioned in the toilet bowl 100 to measure the illuminance inside the bowl 102. The illuminance sensor 22 measures the illuminance inside the bowl 102 at a predetermined sampling rate and inputs the measured illuminance value to the excrement detection device 1 at a predetermined sampling rate. The illuminance value is an example of sensing data indicating when a user is seated or standing.

[0048] The lighting device 23 is positioned on the toilet bowl 100 to illuminate the inside of the bowl portion 102. The lighting device 23 is, for example, a white LED and illuminates the inside of the bowl portion 102 under the control of the excrement detection device 1.

[0049] Camera 24 is installed in the toilet bowl 100 so that the bowl portion 102 can be photographed. Camera 24 is, for example, a high-sensitivity, wide-angle camera capable of capturing color images having R (red), G (green), and B (blue) components. Camera 24 images the inside of the bowl portion 102 at a predetermined frame rate and inputs the obtained image data to the excrement detection device 1 at a predetermined sampling rate.

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

[0051] The processor 11 is comprised of, 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 may be implemented by the CPU executing a waste determination program, or they may be comprised of dedicated integrated circuits.

[0052] The acquisition unit 111 acquires image data captured by the camera 24 at a predetermined sampling rate. The acquisition unit 111 also acquires distance values ​​measured by the seating sensor 21 at a predetermined sampling rate. Furthermore, the acquisition unit 111 acquires illuminance values ​​measured by the illuminance sensor 22 at a predetermined sampling rate.

[0053] The calculation unit 112 calculates the G / R value and B / R value based on the R value, G value, and B value contained in the image data acquired by the acquisition unit 111. Specifically, the calculation unit 112 sets a detection area D1 (Figure 3) in the image data acquired by the acquisition unit 111, and calculates the G / R value and B / R value for each of the multiple 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 gradation value of the R (red) component of the pixel data, the G value is the gradation value of the G (green) component of the pixel data, and the B value is the gradation value of the B (blue) component of the pixel data. The R value, G value, and B value can take values ​​of, for example, 8 bits (0 to 255). However, this is just an example, and the R value, G value, and B value may be expressed with other numbers of bits.

[0054] Figure 3 shows the detection area D1. The detection area D1 is a rectangular region that includes the reservoir 104 of the toilet bowl 100. The calculation unit 112 reads the 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 that indicates which coordinates in the image data the detection area D1 should be set at. Since the toilet bowl 100 is designed so that excrement is excreted into the reservoir 104, setting the detection area D1 in the reservoir 104 and detecting the excrement from that detection area D1 reduces the processing burden compared to detecting the excrement from the entire image data.

[0055] The calculation unit 112 may remove pixel data having the color indicated by the standard toilet bowl color data (standard toilet bowl 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 of the removed detection area data (hereinafter referred to as the judgment target image data). In addition, the calculation unit 112 only needs to remove pixel data from the detection area data where the R value, G value, and B value are within a predetermined range relative to the R value, G value, and B value of the standard toilet bowl color, respectively.

[0056] Here, the standard toilet bowl color data may be calculated based on image data of a reference area within the bowl portion 102, which is a predetermined distance away from the rim 101 of the toilet bowl 100 towards the reservoir portion 104. Specifically, the standard toilet bowl color data has the average values ​​of the R, G, and B values ​​of the reference area. The area immediately below the rim 101 is an area where it is difficult to remove dirt by cleaning, so if this area is set as the reference area, it becomes difficult to calculate standard toilet bowl color data that accurately represents the color of the toilet bowl 100. Therefore, the calculation unit 112 calculates the standard toilet bowl color data based on image data of an area a predetermined distance away from the rim 101.

[0057] The determination unit 113 determines whether the image data contains 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 contains images of urination if the G / R value and B / R value each satisfy predetermined urination conditions. Similarly, the determination unit 113 determines that the image data contains images of defecation if the G / R value and B / R value each satisfy predetermined defecation conditions. Furthermore, the determination unit 113 determines that the image data contains images of bleeding if the G / R value and B / R value each satisfy predetermined bleeding conditions. Details of the defecation conditions, urination conditions, and bleeding conditions will be described later.

[0058] The determination unit 113 determines that the image data contains an image of urination if the image data to be determined contains at least one pixel number of pixel data that satisfy the urination condition. Furthermore, if the image data to be determined contains at least two pixel numbers of pixel data that satisfy the defecation condition, the determination unit 113 determines that the image data contains an image of urination. defecationIt is sufficient to determine if the image contains the necessary information. Furthermore, the determination unit 113 should determine that the image data contains images of bleeding if the image data to be determined contains three or more pixels that satisfy the bleeding condition. The first pixel count is a preset number of pixels that indicates that the pixel data satisfying the urination condition is not noise but urination pixel data. The second pixel count is a preset number of pixels that indicates that the pixel data satisfying the defecation condition is not noise but defecation pixel data. The third pixel count is a preset number of pixels that indicates that the pixel data satisfying the bleeding condition is not noise but bleeding pixel data.

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

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

[0061] The communication unit 13 is a communication circuit that has the function of connecting the excrement detection device 1 to the server 3 via a network. The communication unit 13 also has the function of connecting the excrement detection device 1 to the sensor unit 2 via a communication path. The excretion information is information that associates, 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 can, for example, generate excretion information on a daily basis and transmit the generated excretion information to the server 3.

[0062] The entry / exit sensor 14 is composed of, for example, a distance measuring sensor. The entry / exit sensor 14 detects when a user enters the toilet where the toilet bowl 100 is installed. Here, the distance measuring sensor that makes up the entry / exit sensor 14 has lower measurement accuracy but a wider detection range than the distance measuring sensor that makes up the seating sensor 21. The distance measuring sensor is, for example, an infrared distance measuring sensor. The entry / exit sensor 14 may also be composed of, for example, a motion sensor instead of a distance measuring sensor. The motion sensor detects a user who is within a predetermined distance from the toilet bowl 100.

[0063] The above describes the configuration of the excrement determination system. Next, an overview of the processing of the excrement determination device 1 will be explained. Figure 4 is a sequence diagram showing an overview of the processing of the excrement determination device 1 in Embodiment 1 of this disclosure.

[0064] In Figure 4, the first row shows the sequence of the entry / exit sensor 14, which is composed of a motion sensor; the second row shows the sequence of the entry / exit sensor 14, which is composed of a distance measuring sensor; the third row shows the sequence of the seating sensor 21; the fourth row shows the sequence of the illuminance sensor 22; and the fifth row shows the sequence of the lighting device 23. In the example in Figure 4, the sequences of both the entry / exit sensor 14 composed of a motion sensor and the entry / exit sensor 14 composed of a distance measuring sensor are shown, but the excrement detection device 1 only needs to be equipped with at least one of the entry / exit sensors 14.

[0065] At timing t1, the user enters the toilet. Accordingly, the calculation unit 112 determines that the user has entered the toilet based on the sensing data input from the entry / exit sensor 14 (human presence sensor) or the entry / exit sensor 14 (distance sensor). Here, the entry / exit sensor 14 (human presence sensor) sets the sensing data to high when it detects a user and sets the sensing data to low when it no longer detects a user. Therefore, the calculation unit 112 determines that the user has entered the toilet when the sensing data input from the entry / exit sensor 14 (human presence sensor) is high. In addition, the calculation unit 112 determines that the user has entered the toilet when the distance value measured by the entry / exit sensor 14 (distance sensor) falls below the threshold A1. The threshold A1 can be any appropriate value, such as 50cm, 100cm, 150cm, etc.

[0066] Furthermore, at timing t1, the calculation unit 112 starts accumulating the sensing data input from the entry / exit sensor 14, the seating sensor 21, and the illuminance sensor 22 into the memory 12.

[0067] Furthermore, at timing t1, upon detecting a user, the calculation unit 112 sends an entry notification to the server 3 using the communication unit 13, indicating that the user has entered the toilet.

[0068] At timing t2, the user is seated on the toilet bowl 100. Accordingly, the distance measurement value input from the seating sensor 21 becomes less than or equal to the seating detection threshold A2, and the calculation unit 112 determines that the user is seated on the toilet bowl 100. The seating detection threshold A2 is a predetermined value that indicates, for example, that the distance measurement value from the seating sensor 21 to the user's buttocks indicates that the user is seated on the toilet bowl 100. The seating detection threshold A2 is smaller than threshold A1, and appropriate values ​​such as 10cm, 15cm, or 20cm can be adopted.

[0069] Furthermore, at timing t2, the ambient light entering the bowl portion 102 is blocked by the user's buttocks due to seating, resulting in a decrease in the illuminance value input from the illuminance sensor 22.

[0070] Furthermore, at timing t2, the calculation unit 112 turns on the lighting device 23 upon detection of seating. This causes the lighting device 23 to illuminate the inside of the bowl section 102, ensuring the necessary amount of light for detecting excrement from the image data.

[0071] Furthermore, at timing t2, the calculation unit 112 activates the camera 24 and has the camera 24 photograph the inside of the bowl section 102. Thereafter, the acquisition unit 111 acquires image data at a predetermined sampling rate.

[0072] The entry notification may also be sent at timing t2.

[0073] During the period B1 between timing t3 and timing t4, the user readjusts their position on the toilet 100. Consequently, at timing t3, the distance value measured by the seat sensor 21 exceeds the seat detection threshold A2, and at timing t4, the distance value measured by the seat sensor 21 falls below the seat detection threshold A2. Also, at timing t3, the calculation unit 112 turns off the lighting device 23, and at timing t4, the calculation unit 112 turns on the lighting device 23. Furthermore, the illuminance value measured by the illuminance sensor 22 also changes in conjunction with the distance value measured by the seat sensor 21.

[0074] At timing t5, the user has left the toilet bowl 100. Consequently, the distance measured by the seat sensor 21 exceeds the seat detection threshold A2. Also at timing t5, the calculation unit 112 turns off the lighting device 23.

[0075] At timing t6, the distance measurement value of the entry / exit sensor 14 exceeds the threshold A1, so the calculation unit 112 determines that the user has left the toilet. Accordingly, the output unit 114 sends an exit notification to the server 3 using the communication unit 13, indicating that the user has left the toilet. Furthermore, at timing t6, the output unit 114 sends excretion information generated based on the image data to the server 3 using the communication unit 13. Note that the exit notification and excretion information may be sent at timing t7. Furthermore, at timing t6, the image data used to detect the excrement may be sent.

[0076] At timing t7, since the distance measurement value of the seat sensor 21 exceeded the seat detection threshold A2 for a period of B2 at timing t5, the calculation unit 112 terminates the accumulation of sensing data in the memory 12 and also terminates the imaging of the inside of the bowl section 102 by the camera 24.

[0077] At timing t8, since the high state of the entry / exit sensor 14 (human presence sensor) has been active for a period of B4 since timing t7, the calculation unit 112 puts the excrement detection device 1 into standby mode.

[0078] Next, we will explain the processing of the excrement detection device 1. Figure 5 is a flowchart showing an example of the process by which the excrement detection device 1 generates image data to be transmitted.

[0079] In step S21, the calculation unit 112 determines whether or not the user has sat on the toilet bowl 100. Here, if the distance value acquired by the acquisition unit 111 from the seating sensor 21 is less than or equal to the seating detection threshold A2 (YES in step S21), the calculation unit 112 determines that the user has sat on the toilet and proceeds to step S22. On the other hand, if the distance value is greater than the seating detection threshold A2 (NO in step S21), the calculation unit 112 proceeds to step S22. S21 Wait there.

[0080] In step S22, the calculation unit 112 determines whether the urination pixel count data PD(X) is less than the urination pixel count data PD(-20). The urination pixel count data PD is the number of pixels in the detection area data that satisfy the urination condition. The urination pixel count data PD(-20) is the urination pixel count data included in the detection area data of the sampling point (t-20) 20 sample points prior to the latest sampling point (t). The urination pixel count data PD(X) is the maximum value of the urination pixel count data PD prior to the sampling point (t-20) since the processing in Figure 5 began. If the urination pixel count data PD(X) is less than the urination pixel count data PD(-20) (YES in step S22), the process proceeds to step S23. If the urination pixel count data PD(X) is greater than or equal to the urination pixel count data PD(-20) (NO in step S22), the process proceeds to step S25.

[0081] Here, the pixel count data PD(-20) for urination 20 sampling points prior was used, but this is just one example, and the pixel count data PD(t) from any sample point prior may be used. The same applies to the pixel count data PD(-20) for defecation, which will be discussed later.

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

[0083] In step S24, the calculation unit 112 updates the RGB data for urination. The RGB data for urination is the average value of the R, G, and B values ​​of the pixel data that satisfies the urination conditions in each block R1 (Figure 3) when the detection area data is divided into multiple blocks R1.

[0084] As shown in Figure 3, block R1 is image data obtained by dividing the detection area data corresponding to detection area D1 into, for example, 64 sections of 8 rows x 8 columns.

[0085] Here, each block R1 is numbered 1 to 64 in the order of raster scanning, from the top left block R1 to the bottom right block R1. The RGB data for urination is data composed of the average R value, average G value, and average B value of the pixel data that satisfy the urination conditions in each block R1. For example, if there are Q1 pixel data that satisfy the urination conditions in block R1, the calculation unit 112 calculates the average R value, average G value, and average B value of these Q1 pixel data as the RGB data for urination. Therefore, the RGB data for urination is composed of 64 R values, G values, and B values. Here, block R1 was a block obtained by partitioning the detection area data into 8 rows x 8 columns, but this is just an example, and block R1 may also be a block in which the detection area data is partitioned into n rows (where n is an integer of 2 or more) x m columns (where m is an integer of 2 or more). In step S11 of Figure 6, which will be described later, the RGB data of urination having this data structure is included in the excretion information and transmitted, thus reducing the amount of data in the excretion information. Furthermore, since the RGB data of urination is data that appears as if it were mosaicked, privacy can be protected compared to managing the image data itself.

[0086] Through the processing in steps S22 to S24, the RGB data of urination at the sampling point with the highest urination pixel count data PD is selected as the RGB data to be transmitted.

[0087] 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 is the number of pixels in the detection area data that satisfy the defecation condition. The defecation pixel count data PD(-20) is included in the detection area data of the sampling point (t-20) 20 samples prior to the latest sampling point (t). defecation This is the pixel count data. The defecation pixel count data PD(X) is the maximum value of the defecation pixel count data PD from the start of processing in Figure 5 to before 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 process 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 process proceeds to step S28.

[0088] 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).

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

[0090] Through the processing in steps S25 to S27, the RGB data of the defecation at the sampling point with the highest pixel count data PD is selected as the RGB data to be transmitted.

[0091] In step S28, the calculation unit 112 determines whether the user has left the seat. Here, the calculation unit 112 determines that the user has left the seat if the distance measurement value of the seating sensor 21 exceeds the seating detection threshold A2 for a period of B2, and determines that the user has not left the seat if the distance measurement value is less than the seating detection threshold A2 or if the period of the distance measurement value exceeding the seating detection threshold A2 does not continue for a period of B2. If you are not sitting away If it is determined that the user is away from their seat (NO in step S28), the process returns to step S22. If it is determined that the user is away from their seat (YES in step S28), the process terminates.

[0092] Figure 6 is a flowchart illustrating an example of the process in the excrement detection device 1 in Embodiment 1, from when the user sits down until they leave the seat. Note that the flowchart in Figure 6 is performed in parallel with the flowchart in Figure 5.

[0093] In step S1, the calculation unit 112 determines whether the user has sat on the toilet bowl 100. Here, similar to step S21 in Figure 5, the calculation unit 112 determines whether the user has sat on the toilet bowl 100 by determining whether the distance value acquired by the acquisition unit 111 from the seating sensor 21 is less than or equal to the seating detection threshold A2. If it is determined that the user has sat on the toilet bowl 100 (YES in step S1), the process proceeds to step S2. If it is determined that the user has not sat on the toilet bowl 100 (NO in step S1), the process waits in step S1.

[0094] In step S2, the determination unit 113 determines whether or not urination has been confirmed. If urination has not been confirmed (NO in step S2), the process proceeds to step S3; if urination has been confirmed (YES in step S2), the process proceeds to step S6. Confirmation of urination means that it has been determined that the image data contains an image of urination.

[0095] In step S3, the determination unit 113 performs an excretion detection process that determines, based on the image data, that the user has performed at least one of urination and defecation. Details of the excretion detection process will be described later with reference to Figure 7.

[0096] In step S4, if the determination unit 113 determines that urination has occurred in the excretion detection process (YES in step S4), it confirms urination (step S5). On the other hand, if urination is not detected in the excretion detection process (NO in step S4), the process proceeds to step S6.

[0097] In step S6, the determination unit 113 determines whether or not defecation has been confirmed. If defecation has been confirmed (YES in step S6), the process proceeds to step S10; if defecation has not been confirmed (NO in step S6), the process proceeds to step S7. Confirmation of defecation means that it has been determined that the image data contains an image of defecation.

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

[0099] In step S8, if the determination unit 113 determines that defecation has occurred in the defecation detection process (YES in step S8), it confirms the defecation (step S9). On the other hand, if the determination unit 113 does not determine that defecation has occurred in the defecation detection process (NO in step S8), it proceeds to step S10.

[0100] In step S10, the calculation unit 112 determines whether the user has left the seat. Here, the calculation unit 112 determines that the user has left the seat if the distance value measured by the seat sensor 21 exceeds the seat detection threshold A2 for a period of B2. If the distance value is greater than the seat detection threshold A2 (YES in step S10), the process proceeds to step S11. If the distance value is less than or equal to the seat detection threshold A2 (NO in step S10), the process returns to step S2.

[0101] In step S11, the output unit 114 transmits the exit notification and excretion information to the server 3 using the communication unit 13. This excretion information includes the RGB data for urination, the RGB data for defecation, the pixel count data PD(X) for urination, and the pixel count data PD(X) for defecation, etc., calculated in the flowchart of Figure 5.

[0102] Next, we will explain the excretion detection process. Figure 7 is a flowchart showing an example of the excretion detection process.

[0103] In step S110, the calculation unit 112 obtains standard toilet bowl color data from the memory 12.

[0104] In step S120, the calculation unit 112 acquires the image data for the processing timing from the image data acquired by the acquisition unit 111. The image data for the processing timing is, for example, the image data from a predetermined sampling point (e.g., 20 sampling points) prior to the latest sampling point. However, this is just an example, and the image data for the processing timing may be the image data from the latest sampling point.

[0105] In step S130, the calculation unit 112 extracts image data of the detection area D1 (detection area data) from the image data at the processing timing.

[0106] In step S140, the calculation unit 112 determines whether the detection area data contains pixel data of a different color from the standard toilet color. If the detection area data contains pixel data of a different color from the standard toilet color (YES in step S140), the process proceeds to step S150. If the detection area data does not contain pixel data of a different color from the standard toilet color (NO in step S140), the process proceeds to step S4 or S8 (Figure 6).

[0107] In step S150, the calculation unit 112 generates determination target image data by removing pixel data having R value, G value, and B value outside a predetermined range from the detection area data with respect to the R value, G value, and B value of the reference toilet color data.

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

[0109] In step S170, the determination unit 113 determines whether the pixel data satisfying the urination condition is included in the determination target image data and is equal to or more than the first pixel number. FIG. 8 is a table summarizing the defecation condition, urination condition, and bleeding condition. In FIG. 8, Low is the lower limit threshold of the range satisfying the condition, and High is the upper limit threshold of the range satisfying the condition.

[0110] The urination condition is the condition that the G / R value is not less than B1% and not more than B2%, and the B / R value is not less than B3% and not more than B4%. However, B3% < B1% and B4% < B2%. When the pixel data satisfying the urination condition is equal to or more than the first pixel number (YES in step S170), the process proceeds to step S180. When the pixel data satisfying the urination condition is less than the first pixel number (NO in step S170), the process proceeds to step S190.

[0111] In step S180, the determination unit 113 determines that there is urination for the image data to be processed, and advances the process to step S4 or step S8 (FIG. 6 )

[0112] In step S190, the determination unit 113 determines whether pixel data satisfying the defecation condition in the determination target image data includes a second pixel number or more. Referring to FIG. 8, the defecation condition is the condition that the G / R value is 0% or more and A1% or less, and the B / R value is 0% or more and A2% or less. However, A2% < A1%. When there are a second pixel number or more of pixel data satisfying the defecation condition (YES in step S190), the process proceeds to step S200. When there are less than the second pixel number of pixel data satisfying the defecation condition (NO in step S190), the process proceeds to step S210.

[0113] In step S200, the determination unit 113 determines that there is defecation in the image data to be processed, and advances the process to step S4 or step S8 (FIG. 6 )。

[0114] In step S210, the determination unit 113 determines whether pixel data satisfying the bleeding condition in the determination target image data includes a third pixel number or more. Referring to FIG. 8, the bleeding condition is the condition that the G / R value is 0% or more and C1% or less, and the B / R value is 0% or more and C2% or less. However, C2% < C1%. When there are a third pixel number or more of pixel data satisfying the bleeding condition (YES in step S210), the process proceeds to step S220. When there are less than the second pixel number of pixel data satisfying the bleeding condition (NO in step S210), the process proceeds to step S230.

[0115] In step S220, the determination unit 113 determines that there is bleeding in the image data to be processed, and advances the process to step S4 or step S8 (FIG. 6 )。

[0116] In step S230, the determination unit 113 determines that there is an image of a foreign object in the determination target image data, and advances the process to step S4 or step S8 (FIG. 6 )。The foreign object is, for example, a diaper, toilet paper, or the like.

[0117] In FIG. 8, the defecation condition, urination condition, and bleeding condition may have the relationship of C2% < C1% < A2% < B3% < B1% = A1% < B4% < B2%.

[0118] Specifically, A1 is, for example, 80 or more and 90 or less, preferably 83 or more and 87 or less.

[0119] A2 is, for example, 40 or more and 50 or less, preferably 43 or more and 47 or less.

[0120] B1 is, for example, 80 or more and 90 or less, preferably 83 or more and 87 or less.

[0121] B2 is, for example, 100 or more and 110 or less, preferably 103 or more and 107 or less.

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

[0123] B4 is 92 or more and 103 or less, preferably 95 or more and 99 or less.

[0124] C1 is, for example, 32 or more and 42 or less, preferably 35 or more and 39 or less.

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

[0126] Thus, according to Embodiment 1, it is determined whether at least one of the images of defecation, urination, and bleeding is included in the image data based on the G / R value and the B / R value. Here, the G / R value and the B / R value have the characteristic that the value is maintained even when the color of the excrement on the surface of the stagnant water fades over time. As a result, the excrement in the stagnant water of the toilet bowl can be accurately detected.

[0127] (Embodiment 2) Embodiment 2 determines whether or not the image data contains images of black stool and orange stool. Figure 9 is a block diagram showing an example of the configuration of the excrement determination system in Embodiment 2. In Embodiment 2, the same reference numerals are used for components that are the same as in Embodiment 1, and their descriptions are omitted.

[0128] 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 the acquisition unit 111, the calculation unit 112, and the output unit 114.

[0129] The determination unit 213 determines that the image data contains an image of 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 contained in the image data (or image data to be determined), respectively, satisfy predetermined conditions for black stool. Black stool is a stool that has a dark gray color. Black stool is a stool that may be excreted when medication such as sodium monoxide citrate is taken. Such black stool cannot be accurately determined by the stool conditions shown in Embodiment 1. Therefore, in this embodiment, conditions for black stool are defined.

[0130] The determination unit 213 determines that the image data contains images of orange stool if the R value, G value, and B value contained in the image data (image data to be determined) each satisfy predetermined orange stool conditions.

[0131] Some users experience orange-colored stool (orange stool) due to the effects of medication. Orange stool can be mistakenly detected as urine. Therefore, this embodiment defines the conditions for orange stool.

[0132] Figure 10 is a flowchart showing an example of the excretion detection process in Embodiment 2. The processing from step S110 to step S220 is the same as in Figure 7.

[0133] When there are not more than a third number of pixel data satisfying the bleeding condition (NO in step S210), the process proceeds to step S230.

[0134] In step S230, the determination unit 113 determines whether there are not less than a fourth number of pixel data satisfying the black stool condition in the determination target image data. The fourth number of pixels is a preset number of pixels indicating that the pixel data satisfying the black stool condition is pixel data of black stool rather than noise.

[0135] FIG. 11 is a table summarizing the black stool conditions. The black stool conditions are that the G / R value is not less than D1% and not more than D2%, the B / R value is not less than D3% and not more than D4%, and each of the R value, G value, and B value is not less than 0 and not more than E. For example, D3% and D4% may be such that D3% < D1% and D4% = D2%. When the image data is 8 bits, the R value, G value, and B value each take values from 0 to 255, so E is not less than 0 and not more than 255.

[0136] Specifically, D1 is, for example, not less than 85 and not more than 95, preferably not less than 88 and not more than 92.

[0137] D2 is, for example, not less than 105 and not more than 115, preferably not less than 108 and not more than 112.

[0138] D3 is, for example, not less than 55 and not more than 65, preferably not less than 58 and not more than 62.

[0139] D4 is, for example, not less than 105 and not more than 115, preferably not less than 108 and not more than 112.

[0140] When the image data is 8 bits, E is, for example, not less than 85 and not more than 95, preferably not less than 88 and not more than 92. When the number of bits of the image data is arbitrary, E is, for example, not less than 33% and not more than 37%, preferably not less than 34% and not more than 36%.

[0141] If there are four or more pixel data that satisfy the black stool condition (YES in step S230), the process proceeds to step S240. If there are fewer than four pixel data that satisfy the black stool condition (NO in step S230), the process proceeds to step S250.

[0142] In step S240, the determination unit 113 determines that there is black stool in the image data to be processed, and proceeds to step S4 or step S8 (Figure 6 In this case, defecation is confirmed in step S6 (Figure 6).

[0143] In step S250, the determination unit 113 determines whether there are five or more pixel data that satisfy the orange delivery condition in the image data to be determined. The fifth pixel number is a preset number of pixels that indicates that the pixel data that satisfies the orange delivery condition is orange delivery pixel data and not noise.

[0144] Figure 12 is a table summarizing the conditions for orange delivery. The conditions for orange delivery are that the R value, G value, and B value are each between F1 and F2. When the image data is 8 bits, F1 and F2 take values ​​from 0 to 255.

[0145] In detail, if the image data is 8 bits, F1 is, for example, between 95 and 105, preferably between 98 and 102. If the number of bits in the image data is arbitrary, F1 is, for example, between 37% and 41%, preferably between 38% and 40%.

[0146] If the image data is 8 bits, F2 is, for example, 245 or more and 255 or less, preferably 250 or more and 255 or less. If the number of bits in the image data is arbitrary, F2 is, for example, 96% or more and 100% or less, preferably 98% or more and 100% or less.

[0147] If there are five or more pixel data that satisfy the orange delivery condition (YES in step S250), the process proceeds to step S260. If there are fewer than five pixel data that satisfy the orange delivery condition (NO in step S250), the process proceeds to step S270.

[0148] In step S260, the determination unit 113 determines that there is an orange delivery for the image data to be processed, and proceeds to step S4 or step S8 (Figure 6 In this case, defecation is confirmed in step S6 (Figure 6).

[0149] In step S270, the determination unit 113 determines that there is an image of a foreign object in the image data to be determined, and proceeds to step S4 or step S8 (Figure 6 Foreign objects include, for example, diapers and toilet paper.

[0150] Thus, according to Embodiment 2, it is possible to determine whether the image data contains black stool and orange stool.

[0151] The following modifications may be adopted for this disclosure.

[0152] (1) In Embodiment 2, the orange stool condition shown in step S250 may be set after the case where there are 1 or more pixels of pixel data that satisfy the urination condition (YES in step S270). In this case, the determination unit 113 only needs to determine that there is orange stool if there are 5 or more pixels of pixel data that satisfy both the urination condition and the orange stool condition.

[0153] (2) In step S170 of Figure 7, the condition for YES was that there were at least 1 pixel data that met the urination condition. However, this is just one example, and it may be determined to be YES if there is any pixel data that meets the urination condition. In this case, if there is at least one pixel data that meets the urination condition, it will be determined that there is an image of urination. This can be similarly applied to the defecation condition, bleeding condition, and orange stool condition. [Industrial applicability]

[0154] According to this disclosure, it is useful for accurately detecting excrement from image data.

Claims

1. A method for determining excrement in an excrement determination device for determining excrement, The processor of the excrement determination device, A camera that photographs the inside of a toilet bowl captures a series of color image data of the excrement. Based on the R (red), G (green), and B (blue) values ​​contained in each pixel of the aforementioned image data, the G / R value and B / R value are calculated. For each of defecation, urination, and bleeding, predetermined conditions for defecation, urination, and bleeding are set. For each image during the sitting period, the number of pixels that satisfy the predetermined ranges of the G / R value and B / R value for the defecation condition, urination condition, and bleeding condition, respectively, is determined. Based on the number of pixels, it is determined whether the image data contains at least one image of defecation, urination, and bleeding. Output the result of the above determination, The result of the determination includes RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition is the maximum during the seating period, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition is the maximum during the seating period. Excretion determination method.

2. In the determination described above, if each of the G / R value, B / R value, R value, G value, and B value satisfies the predetermined conditions for black stool, it is determined that the image data contains an image of black stool. The method for determining the type of excrement according to claim 1.

3. In the above determination, if each of the R value, G value, and B value satisfies the predetermined orange stool conditions, it is determined that the image data contains an image of an orange stool. The method for determining the type of excrement according to claim 1 or 2.

4. The aforementioned defecation conditions are that the G / R value is less than A1%, and the B / R value is less than A2% (< A1%). The method for determining the type of excrement according to claim 1.

5. The aforementioned urination conditions are that the G / R value is between B1% and B2%, and the B / R value is between B3% (<B1%) and B4% (<B2%). The method for determining the type of excrement according to claim 1.

6. The aforementioned bleeding conditions are that the G / R value is less than C1%, and the B / R value is less than C2% (<C1%). The method for determining the type of excrement according to claim 1.

7. The aforementioned black stool condition is that the G / R value is between D1% and D2%, the B / R value is between D3% (< D1%) and D4% (= D2%), and the R value, G value, and B value are all smaller than E. The method for determining the type of excrement according to claim 2.

8. The aforementioned orange stool condition is that the R value, G value, and B value are F1 to F2, respectively. The method for determining the type of excrement according to claim 3.

9. In the above determination, If the image data contains at least one pixel number of pixel data that satisfy the urination condition, it is determined that the image data contains an image of urination. If the image data contains two or more pixels that satisfy the defecation condition, it is determined that the image data contains an image of defecation. If the image data contains three or more pixels that satisfy the bleeding condition, it is determined that the image data contains an image of bleeding. The method for determining the type of excrement according to claim 1.

10. In the calculation described above, the G / R value and the B / R value are calculated based on the R value, G value, and B value of a predetermined detection area including the toilet bowl's reservoir within the image data. A method for determining the type of excrement according to any one of claims 1 to 9.

11. A waste determination device for determining the type of waste, An acquisition unit that acquires continuous color image data of excrement captured by a camera that photographs the inside of a toilet bowl, A calculation unit that calculates G / R values ​​and B / R values ​​based on the R (red) value, G (green) value, and B (blue) value contained in each pixel of the aforementioned image data, A determination unit sets predetermined defecation conditions, urination conditions, and bleeding conditions for each of defecation, urination conditions, and bleeding conditions, and determines the number of pixels that satisfy the predetermined ranges of the G / R value and B / R value for each of the defecation conditions, urination conditions, and bleeding conditions for each image during the sitting period, and determines whether or not the image data contains at least one image of defecation, urination, and bleeding based on the number of pixels, The system includes an output unit that outputs the result of the determination, The result of the determination includes RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition is the maximum during the seating period, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition is the maximum during the seating period. Excretion determination device.

12. A waste determination program that makes a computer function as a waste determination device, To the aforementioned computer, A camera that photographs the inside of a toilet bowl captures a series of color image data of the excrement. Based on the R (red), G (green), and B (blue) values ​​contained in each pixel of the aforementioned image data, the G / R value and B / R value are calculated. For each of defecation, urination, and bleeding, predetermined conditions for defecation, urination, and bleeding are set. For each image during the sitting period, the number of pixels that satisfy the predetermined ranges of the G / R value and B / R value for the defecation condition, urination condition, and bleeding condition, respectively, is determined. Based on the number of pixels, it is determined whether the image data contains at least one image of defecation, urination, and bleeding. The process is executed to output the result of the aforementioned determination. The result of the determination includes RGB data of defecation generated from image data in which the number of pixels satisfying the defecation condition is the maximum during the seating period, or RGB data of urination generated from image data in which the number of pixels satisfying the urination condition is the maximum during the seating period. Excrement identification program.