Piddle
Piddle is an iPhone app for urine test strip analysis.
Using urine test strips can be hard, even for a professional. It requires focus, good timing, handling many things at the same time, but more importantly, the ability to accurately compare colors. Piddle guides you through the process, takes, and tracks the test results. It explains the meaning of each result and shows how your values fall within normal ranges. The results are stored and can be shared with your doctor.
The first version of Piddle was programmed in 24 hours at Health Hack Day in Stockholm on a weekend in May 2012 and received first prize. The core team developing the app was Ian Jorgensen (code + design), Pau Ramon (app code), Marcin Ignac (image processing code) and received enormous help and support from Sara Krugman, Kat Zorina, Hideaki Matsui in the initial concept and design pase.
!YOUTUBE,F6_qW6TWE10,950,534
Tech
The whole application was build in HTML and JavaScript and deployed on iOS using PhoneGap. Because of this setup the tracker was also implemented in JavaScript using Canvas API. We were concerned about the potential performance problems but HTML5 related technologies proved us wrong again.
Analysis
In order to find the values represented by all colors on the marker we have to make following steps:
Preparation
- Dip the marker strip in the cup of pee
- Wait few seconds for it to dry
- Place the maker strip next to reference board
- Take photo of the reference board with your iPhone
Image processing (as illustrated below)
- Shoot 4 lines, one from each edge of the picture, towards the center and find boundary pixels of the marker and reference board
- Use the estimated bounding box to find positions of reference colors
- Find positions of accompanying color rectangles on the marker
- Sample colors from reference board and the maker strip
- Find the 3 best matches by comparing colors by RGB, Hue and Chroma values
- Choose the best color for each row and send the value it represents to the diagnosis step
The resulting maker detector was working in realtime on iPhone 4 given us results not worse that average human beginner but in much more relaxed process (no competing about time).
Find more information about the project at http://linehq.com.
Hackaton
!IMG2,02_devteam.jpg,02_ian.jpg,Team hacking late at night and Ian with his first cup of pee for testing