19 May 2012 ..:: Forum ::.. Register
Login

You must be registered and logged in to post to this forum.

 Forum Minimize
SearchForum Home
  Discussions  Developers  Extracting JPG ...
 Extracting JPG from stream
 
 30/12/2008 01:13:39
Daviey
4 posts


Extracting JPG from stream

Hi,

I'm working through the protocol, writing a python interface.  I'm now at the stage i need to extract the jpg images from the protocol.

If i could get some help working out the jpeg element it would be appreciated!


LOG:
http://spykee.daviey.com/connect_cam.txt

 

 30/12/2008 10:22:37
kdavid
8 posts


Re: Extracting JPG from stream

Davie, why don't you use Roboreal software that has embedded capability of picture proccessing? And why are you trying to create your own software in Python since 1) JimFX has developed spykee's software in Delphi, 2) Roborealm gives you every capability to create your own .robo scripts for spykee and 3) Meccano will release the fully SDK on January.

So, why to lose your time for programming something which already exists and whose official version will become available on January?

I think that it's time to start creating scripts for roborealm and start sharing them here and on spykeedev.net!

 30/12/2008 17:19:45
Daviey
4 posts


Re: Extracting JPG from stream

Hi kdavid,

The reason i am developing my own application and python library is because the official application, JimFx's and RoboRealm are all compiled for use on the MS Windows platform.  The official application doesn't work at all on Linux, the other two work using a Windows compatibility layer  - however it's still hardly clean.

Having a python library that i can use with a GUI, server daemon or console based interests me a much more, as it can be easier to create adhoc commands, based on external influences.

It is also my intention to fully open source my effort, once i've fully got the the protocol working as a stack.  The library is almost done, if hacky in parts, i just need to sort out the JPEG extraction.

 04/01/2009 16:48:48
bestcalinou
6 posts


Re: Extracting JPG from stream

Hi Daviey,

I propose u to follow this algorithm:

- in a loop, transforms all  "\xHH" (hexa values) from txt file to a binary file => for example : fprintf(binaryfile,"%x",HH);

- search for the the TAG string : "JFIF", your picture begins 6 chars before this tag (we will call this point START).
- now cut the binary from START to end, open with your favorite image viewer !

rgds

  Discussions  Developers  Extracting JPG ...

SearchSearch  Forum HomeForum Home    Print   
Copyright 2007 by spykee.org   Terms Of Use  Privacy Statement