AbelCam Forum
Download AbelCam buy Pro
 
 
 
Welcome Anonymous User
04/25/2024 - 08:36 AM
Quick Search:
Quick Jump:
 
Announcements
Latest Topics
 
Ability to configure auto or time based pan/tilt scan of the area
By: SyedF
Rank: Frequent User
Topics: 25
From: n/a
Added: 02/18/2010 - 10:31 AM

Message has been edited, click here to see original content

Hello,


I guess the topic says it all.

Instead of manually moving the PAN/Tilt camera , i would like to have a feature where we can configure time or event based pan/tilt movement of the camera to scan the area for a limited or unlimited time, or maybe having a minimum pause time between each successive scan. I guess it would be useful.

Thanks for adding it to any future versions.
By: JohnMa
Rank: Frequent User
Topics: 31
From: n/a
Added: 03/11/2010 - 08:11 PM

This is something I would definitely like to see as well.
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 03/11/2010 - 10:07 PM

For now you could always implement this in a Perl (or probably vbscript/wsh) script. Since the pan/tilt/zoom are controlled by calling URLs, any scripting language that provides the ability to "act like a browser" (open an http connection, do a GET, receive & discard the response, close the connection) should work. I think of Perl first because I tend to go with what I know.

I have, in fact, made simple scripts in the past that do stuff like take all the shots needed to assemble panorama pictures: move cam, grab a still, move cam, grab a stil, etc. It works.

Plenty of documentation on PTZ control URLs can be found here:

http://www.abelcam.com/en/abelwiki/TiltPanZoom

Yeah, this may not be as slick and easy as having it configurable inside AbelCam, but the good part of scripting is that it's totally 100% flexible and customizeable...
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 03/12/2010 - 03:47 AM

Assuming you have a Perl interpreter installed you can use this script to make your cam scan. It works here for me. It is not a finished product - use it as a starting point. It is offered as-is with no guarantees and no support.

Get your free Perl interpreter for Windows at activestate.com/activeperl

### Scan the room by moving the Pan.

use IO::Socket;

### Set to match your AbelCam computer info
$ip_addr = "192.168.2.30";
$abel_port = "8080";

### Set to whatever you prefer.
$cam = 0;      # Cam number
$tilt = 0;     # Tilt position (-100 to 100)
$wait = 3;     # Seconds to wait between moves

### Set these too, but be careful. 10 steps of size 4 (or
### 5 steps of size 8, or whatever) is full range of pan
### travel for an Orbit/Sphere camera.
$steps = 10;   # Number of pan moves before reversing direction
$size = 4;     # Size of one pan step

### This sub handles the HTTP stuff
sub mover {
    my $EOL="\015\012\015\012";
    my $req = lc(shift);
    my $cmd = "GET /$req HTTP/1.0";

    $time=localtime;
    print "$time\t$cmd\n";

    my $remote = IO::Socket::INET->new(
                     Proto    => "tcp",
                     PeerAddr => $ip_addr,
                     PeerPort => $abel_port,
                     Timeout => "2"
                    )
        or die "\nCan't connect to $ip_addr:$abel_port";

    print $remote "$cmd\n";
    print $remote "Accept: text/html\n";
    print $remote "Connection: close" . $EOL;

    while (<$remote>) { }
}

### Main program starts here...
print"\nTalking to $ip_addr on Port $abel_port...\n\n";
mover ("home$cam-0&zoom5=1.0");
sleep(3);
mover ("pos$cam--100,$tilt");
sleep(2);

while(1) {
    for ($i=0; $i<$steps; $i++) {
        sleep($wait);
        mover("right$cam-$size");
    }

    for ($i=0; $i<$steps; $i++) {
        sleep($wait);
        mover("left$cam-$size");
    }
}
By: RaleighMu
Rank: Frequent User
Topics: 24
From: USA
Added: 08/27/2010 - 04:04 PM

I also think that the basic scripting of this feature isn't generally that hard since the AbelCam software already has all sorts of nifty and usable hooks.

However, I'm bumping this up as a suggested future enhancement because I think such a feature if native to AbelCam would be appreciated by all of the non-tech turnkey users of the software (of which there are many, I assume). This could easily expand the market for the software.

Here's how I would design the interface:

First, the user would set "time between cycles" which would be the time between scanning through various locations. E.g., "Run the automatic scan feature every 10 minutes." Then the user would set "time between zones" (a "zone" being a specific x,y coordinate to which the camera would move). E.g., "Stay in a zone for 10 seconds, then move to the next zone."

Coordinates could, of course, be entered manually, but to the extent that the range of motion is known for a camera, some sort of grid system could be set up so that when clicked a coordinate could be automatically generated, and coordinates couldn't be entered that are out of bounds. Also, one coordinate (the first?) must be designated as the "home zone" to which the camera returns after cycling. I don't think it would be that hard to have the AbelCam user refer to their camera's documentation to see what the range of motion is, in degrees, and enter that manually. But for known cameras (Logitech Orbit AF) this could be automatically entered for them (and edited if they wish).

Another parameter would be to link the automatic scan feature to "Local Save" or "FTP" using check boxes. This is so one could say "take a picture at each new zone, and save/ftp as indicated in Local Save and FTP settings already in place.

Finally, I'd have a "test" feature that would allow the user to cycle through the zones they've set and ensure they're getting the coverage they intend.

St. Louis, Missouri, USA