I recently finished up the OpenCV code for my Raspi 3, if you want to take a look, or copy it completely,
here it is. I'll be updating it with a tuning window tomorrow, so keep an eye out for that. I'll admit, its definitely not the best code, but it works very well with little latency.
There are instructions in the README.md on the process I went through to install everything. I cannot recommend running this on anything but the Pi 3. I tried it on the Pi 2 and it took too long, and left me with a very low framerate. I can't imagine how the Pi 1 would handle it, if at all.
If you have any questions, please PM me. Even better, if you have any improvements, pull request me!