Will Pikrellcam run on the new Pi Zero v1.3 using the older 5MP Pi camera? (I think the new 8MP camera would be too much data) Would love to have such a tiny camera setup like the Zero running Pikrellcam... would be the ideal setup for my dashboard cam project!
A Zero has as much CPU power as a B+ where pikrellcam runs fine, so there should be no
problem. But others with experience may have more comments.
Also... are you aware of these Pi cameras being sold with built-in IR-cut filters and IR LEDs?
http://www.ebay.com/itm/Raspberry-Pi-IR ... 3641.l6368
Does Pikrellcam have GUI support for turning on and off IR LEDs? It looks like the IR-cut filter is on the same circuit as the IR night-lights... so if Pikrellcam supports turning on and off IR lights via GPIO for the Pi NOIR camera, this camera should work as both night and day camera very nicely....
You can add controls to the webpage with a custom php file. For example, I've set up a Pi to
to toggle a gpio pin to turn a water valve on and off for filling a swimming pool. You just have to
write a python or C program to do the actual GPIO controlling. I wrote a "pool" program to control
the GPIO and I added a custom-control.php into the ~/pikrellcam/www directory that puts ON and
OFF buttons on the pikrellcam web page. My custom-control.php file is:
Code: Select all
$CMD = "sudo -u pi /usr/local/bin/pool on > /tmp/pool &";
$CMD = "sudo -u pi /usr/local/bin/pool off > /tmp/pool &";
echo "<div class='text-center top-margin'>";
echo "<form method='post'>";
echo "<span style=\"color: $default_text_color; margin-left:25px;\">Pool:</span>
<button type='submit' name='poolon' class='btn-control'>On</button>
<button type='submit' name='pooloff' class='btn-control'>Off</button>";
My pool program is a C program that toggles GPIOs via sysfs. I could post that if you want?
Also, I have GPIO controlling functions inside of pikrellcam but they aren't exposed yet,. So at some
point I'm thinking of putting in GPIO toggling by writting commands to the FIFO. For now if you want
the IR GPIO toggling to be done automatically, put commands into at-commands.conf to run your
GPIO toggling script.
Which I guess brings up another question... is there any way to automatically schedule when motion detection turns on and off? For instance, I would like to leave the camera running, but turn off motion detection at night so it doesn't just record headlights moving across the frame.
Put into the at-commands.conf file commands like:
Code: Select all
daily sunset+10 "@motion_enable off"
daily sunrise-10 "@motion_enable on"
Also, has there been any progress on making Pikrellcam capable of motion tracking with servos? Just curious, last time I was on here you had said it was something that you were working on. You wouldn't really need something as complicated as full object tracking or facial recognition... Would be nice to have Pikrellcam pass vector direction information to the servo control and just simply tell it to snap to the next servo preset in the direction of the motion, then once no motion is detected snap back to the center preset and wait for the next motion event. This, in my opinion, would make the ultimate security cam software for the Pi... motion tracking would allow people to use just one camera for covering a wider area... and without having to use wide angle lenses which degrade picture and video resolution and detail.
The mechanism to do that is there, just a control program needs to be written. In the short term I
don't have the confidence to cover all installation variations with a single built in motion tracking
algorithm, so for now it will have to be done with an external program, I just haven't done that yet.
It could be complicated based on motion in specific regions or simple based on the overall motion
vector. The simple case could be done by writing an on_motion_begin Python script that reads the
/run/pikrellcam/motion-events file and looks for full frame motion vectors as they occur (these are
'f' lines in the file, eg: f 10 35 0 -23 23 18)
If that vector show motion in the right or left side of the frame with a direction pointing out of the
frame, then a FIFO command could be executed to move the servos to the next right or left preset
position. Or it could move the servos by a set distance amount (as long as motion off of preset is
Beyond that, the control algorithm could get as complicated as you want and it's why for now I'm
leaving it as an external on_motion_begin script add on. I'll write at least a proof of concept of this
at some point, but the mechanism is there for anybody to experiment right now. Look at the
example-motion-send-alarm2 script for an example on_motion_begin script that reads the
/run/pikrellcam/motion-events file. A motion tracking script would have a similar structure, it would
just look at the vectors to decide when to send move to preset or servo movement commands to