Note also the specular highlights from the infrared source that is built into the sensor. The sensor produces its own source of light, so that it operates irrespective of ambient light (if any, e.g. it will also work in a completely dark room).
Here is the output of the infrared sensor with bather present:
Here is the difference image:
Here is the thresholded difference image:
If any of a bather's flesh is in the spray zone, the faucet should get turned on.
Here is the faucet turned on, with bather present:
which we can detect by way of difference image:
thresholding, we get:
Note that there is feedback in the above thresholding (e.g. the running faucet gets considered to be motion).
A better approach is to learn the statistics of the bather-absent basin with the faucet running, and subtract from a known image (or average of known images) of the empty basin with water running:
As a simple example, consider this signal of the faucet turned on with
Here is a difference image:
which can be thresholded to reveal just the bather (e.g. to exlude feedback signal from the water):
Here's a summary of the data files in this directory:
a???.jpg = bather no water; 0-57 no bather; 178-end(224) no bather b???.jpg = water no bather c???.jpg = water always on and bather: 47 bather in; 51 hits det. zone; 125 out zone (no lathering with soap) d???.jpg = bather no water e???.jpg = ordinary usage but slow response (wash, then lather then rinse) f???.jpg = fast (existech's QoS provisioning for public bathrooms) notice it doesn't come on until hands right under where would be sprayed. (e.g. off during lathering in sink) (wash, then lather then rinse)
Data Copyleftright_and_center, by EXISTech Corp., released under GNU GPL V.2.
The infrared sensor arrays return 240 rows and 320 columns as
byte arrays, which are stored in pgm files. The infrared sensor
plumbing systems manufactured by EXISTech Corp., are based on active
sensors that provide their own source of infrared light. The sensors
also incorporate AGC (Automatic Gain Control), and are modeled
comparametric equations as described in http://wearcam.org/comparam.htm,
as well as in the ECE1766 course textbook:
Intelligent Imaging Processing (published by John Wiley and Sons, November 2, 2001)