AbelCam Forum
Download AbelCam buy Pro
 
 
 
Welcome Anonymous User
05/07/2024 - 01:39 AM
Quick Search:
Quick Jump:
 
Announcements
Latest Topics
 
SDK de ABELCOM para Logitech Sphere
By: CarlosPe
Rank: New Member
Topics: 9
From: n/a
Added: 04/13/2010 - 12:39 PM

Hi,

I need to develop a Java application that is able to control the camera and capture a photograph. Is it available in a JAR or DLL, or AbelCam SDK? Is it possible to send commands to control the movements and capture the image?
Thank you for your help, BIG THANKS

Carlos
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 04/13/2010 - 04:45 PM

Have you looked at this?
http://www.abelcam.com/en/abelwiki/TiltPanZoom

There is no SDK, but with the info at that link you can see how you could make an application that talks to AbelCam through its web server.

Your app creates a TCP socket, opens a connection to AbelCam and then says the right things (HTTP-like stuff) over the connection. For example:

To move to a position: GET /pos0-50,50,1.0
To grab an image: GET /current0.jpg

It's a bit hard to explain but really easy to do. I have written many programs with Perl that work with AbelCam, but not Java. But the concepts will be the same.

By: CarlosPe
Rank: New Member
Topics: 9
From: n/a
Added: 04/13/2010 - 11:42 PM

thank you very much MelvinG
By: sse
Rank: Forum Addict
Topics: 73
From: n/a
Added: 04/14/2010 - 06:08 AM

Carlos,
you sent me an email yesterday at 10:28 am with the exact same question, and I have answered 12:29, ten minutes before you posted your question here. My answer was:


The easiest way to control the camera from java is to use http requests
and let AbelCam do the moves / zooming.

The URLs for cam control are documented here:
http://www.abelcam.com/en/abelwiki/TiltPanZoom

and it has been sent to your admin@calme.... address.
I have not received and answer, instead you were asking by email the same thing again at 12:46.
At 12:57 you sent me something in spanish I can't read.
As I have answered your 10:28 email I did not reply.

Is your email address not working? Why did you post the same question here in the forum?

By: CarlosPe
Rank: New Member
Topics: 9
From: n/a
Added: 04/15/2010 - 08:47 AM

Sorry it's true, I did not see it, but I'm quite desperate, I need to solve this problem as soon as possible. I'm still trying to solve the problem.
thank you very much
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 04/15/2010 - 09:30 AM

It really is not that difficult. I don't do much Java, but here is the general idea in Perl. Just "translate" and you have a place to start.

$EOL="\015\012\015\012";

## Move to 50, -50 & set zoom to 1.0
$cmd = "GET /pos0-50,-50,1.0 HTTP/1.0";

## Open TCP connection to AbelCam's webserver
$remote = IO::Socket::INET->new(
              Proto    => "tcp",
              PeerAddr => "192.168.2.30",
              PeerPort => "8080",
              Timeout => "2"
          ) or die;

## Speak HTTP to it...
print $remote "$cmd\n";
print $remote "Accept: text/html\n";
print $remote "Connection: close" . $EOL;

## Just throw away whatever is returned
while (<$remote>) { }
By: CarlosPe
Rank: New Member
Topics: 9
From: n/a
Added: 04/15/2010 - 11:27 AM

Thank you very much for answering so fast, I've seen in a forum message that there is a page of examples in java. Could you tell me please, where is this page?
Thank you very much.
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 04/16/2010 - 04:38 AM

I think the forum messages are talking about this:

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

That page discusses how to use the Java applets that come with AbelCam, but it does not talk about writing your own Java code. I do not know of any page that does.

With this page:

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

and this page:

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

you have all the details of how to control AbelCam. Remember, it is "just a web server", it acts like any other web server. It does not care if you connect to it with Java or Perl or Basic or whatever. The point is, you use the language you prefer. Write code to make a connection to webserver - whatever way that is done in your chosen language. Once you have the connection open, use the pages I've linked to learn what to "say" into the connection.

To say it a different way, your Java app should "act like a web browser" and treat AbelCam "like any web server".

Somehow I think you are making this too complicated for yourself. Wink
By: CarlosPe
Rank: New Member
Topics: 9
From: n/a
Added: 04/16/2010 - 11:12 AM

MelvinG You're right, I am a novice programmer, java and have not worked at all.

BIG thanks