A sea of tomatoes

A few pics of all the tomatoes to come. Roughly 100 tomato plants, at 10lbs of tomatoes per plants, this means we’ll be doing some serious canning this year.

More cheapo frames – the tomato super-highway.

Flowers means we’ll be getting some yum-yum soon.

The plants that were planted the earliest of the season were given left-over scraps of wool in order to better retain heat & moisture. They are by far the most sturdy of all tomato plants. Lesson learned.

Look at ’em fancy plants, even I don’t wear such nice fiber.

The impairing lack of light pollution

When we lived in the city, ambient light pollution was such that I could set my CCTV cams to a certain brightness/contrast and the limited auto adjustments they did were enough to cope with day & night. In the middle of the forest, the night gets full on #000000 dark. The poor cams can’t adjust and I need to pick whether I want to record at night and get white frames during the day, or at daytime and get black frames during the night.

I wrote the following script which computes the average brightness of a cam’s current frame and issues more drastic adjustments if needed. It is obviously tailored for my FI8918Ws but the same idea can be used for others.

#!/usr/bin/php
<?php

$img = @imagecreatefromjpeg( 'http://192.168.1.203:8003/snapshot.cgi?user=<username>&pwd=<password>' ) ;
if( $img===false ) {
    die( "Unable to open image" ) ;
}

$w = imagesx( $img ) ;
$h = imagesy( $img ) ;

$total_r = 0 ;
$total_g = 0 ;
$total_b = 0 ;
for( $i=0 ; $i<$w ; $i++ ) {
    for( $j=0 ; $j<$h ; $j++ ) {
        $rgb = imagecolorat( $img, $i, $j ) ;
        $total_r += ($rgb >> 16) & 0xFF;
        $total_g += ($rgb >> 8) & 0xFF;
        $total_b += $rgb & 0xFF;
    }
}

$average_brightness = round( ( $total_r / ($w*$h) + $total_g / ($w*$h) + $total_b / ($w*$h) ) / 3 ) ;
echo $average_brightness, "n" ;

if( $average_brightness<30 ) {
    echo "night time!n" ;
    echo "moden" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=3&value=0&user=<username>&pwd=<password>' ) ;
    sleep( 10 ) ;
    echo "contrastn" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=2&value=6&user=<username>&pwd=<password>' ) ;
    sleep( 10 ) ;
    echo "brightnessn" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=1&value=240&user=<username>&pwd=<password>' ) ;
} else if( $average_brightness>170 ) {
    echo "day time!n" ;
    echo "moden" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=3&value=2&user=<username>&pwd=<password>' ) ;
    sleep( 10 ) ;
    echo "contrastn" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=2&value=4&user=<username>&pwd=<password>' ) ;
    sleep( 10 ) ;
    echo "brightnessn" ;
    $result = file_get_contents( 'http://192.168.1.203:8003/camera_control.cgi?param=1&value=64&user=<username>&pwd=password>' ) ;
}

?>[/code]

Woodchuck

The neighbor’s vegetable garden has been ravaged recently by what he thought was a woodchuck. Now our garden is doing just fine but just in case I started reviving the old CCTV system. Bare in mind I have never had an encounter with one and only know what they look like based on the label of some mighty delicious cider.

Pictured bellow, said mighty delicious cider in action.

A casual look out the window and I see a fat cat inside my fenced garden. Thanks the the neighbor’s heads up & the power of delicious cider I know exactly what is going on: woodchuck, inside my fenced garden, having an all you can eat buffet…

I run upstairs to get a pellet rifle thinking it’s not worth alarming the neighbors with gunfire and that it will probably be enough to give it the scare of its life. Turns out the rifle it much more powerful than I had imagined and just drops the poor thing dead.

Sorry woodchuck…

Devastation