Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-21 Thread Scott Janz
Thanks for the thorough explanation, I am now embedding the aircraft 
supplied position parameters in the ImageDescription field. The next 
flight has been postponed 24 hours and is now scheduled to take off at 
0705 UTC Friday.


-scott

Andrey Filippov wrote:

Scott,

There is no easy way to write GPS data to Exif bypassing the program 
in C that does it. The Elphel PHP extension includes parsing Exif data 
into human readable form, but not the other way around.


Internally camera maintains condensed Exif - "condensed" is what 
remains from the Exif header if you remove all the constant fields 
(like camera model) and the Exif pointers and merge the remaining 
fields together. These condensed Exif headers are copied from the 
"current" data buffer for each frame that is stored in the output 
video buffer so the Exif data can be re-assembled with the images when 
applications read them from the circular video buffer.


When application (such as camogm, streamer or imgsrv) reads image 
frame and requests Exif header that dynamic data (individual for each 
acquired frame) is combined with the static template (generated at 
boot time) and provided to an application as complete Exif header.


The php script that runs at startup:

http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/web/imgsrv/exif.php?view=markup

creates template from the XML file

http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/web/imgsrv/Exif_template.xml?view=markup

and builds the directory for the condensed Exif writable by the 
applications. This directory does not include the data format of the 
particular Exif fields - just the offset and length (in bytes) fo that 
field, referenced by the modified Exif tag number (modified to include 
both tag number and tag group in a single long number). It is up to 
the particular application to format data according to Exif 
conventions and matching the Exif_template.xml


Example of the PHP script

 
http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/packages/web/353/camvc/camvc.php?view=markup

 343   if ( $value!==null)  elphel_set_exif_field(0x10e, 
$value.chr(0));


writes string data from $value terminated by zero byte (chr(0) ) to 
Exif field with the tag 0x10e (group 0) , the tag called 
"ImageDescription" in Exif. The Exif_template.xml reserves 40 bytes 
fro the image description, so if you need more you have to modify that 
template file. It is also possible to add more fileds - you need to 
define them in Exif_template.xml, then write with 
elphel_set_exif_field (or directly using the device driver).


It should be possible to write GPS data fileds with PHP script, but 
that would be more tricky than to wrikte to ImageDescription tag - 
you'll need to write data in the Exif format, not just string data. 
Making all such conversions in PHP may add considerable load if the 
data is updated at high rate,  you may need to write a C program, 
modifying it from this one:


http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/garminusb2nmea-0.12a/nmea2exif.c?view=markup

So the quick fix that I would recommend is to format the required data 
into a string of <=40 bytes and use elphel_set_exif_field(0x10e, 
$string_to_write.chr(0));


Andrey




___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-19 Thread Andrey Filippov
Scott,

There is no easy way to write GPS data to Exif bypassing the program in C
that does it. The Elphel PHP extension includes parsing Exif data into human
readable form, but not the other way around.

Internally camera maintains condensed Exif - "condensed" is what remains
from the Exif header if you remove all the constant fields (like camera
model) and the Exif pointers and merge the remaining fields together. These
condensed Exif headers are copied from the "current" data buffer for each
frame that is stored in the output video buffer so the Exif data can be
re-assembled with the images when applications read them from the circular
video buffer.

When application (such as camogm, streamer or imgsrv) reads image frame and
requests Exif header that dynamic data (individual for each acquired frame)
is combined with the static template (generated at boot time) and provided
to an application as complete Exif header.

The php script that runs at startup:

http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/web/imgsrv/exif.php?view=markup

creates template from the XML file

http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/web/imgsrv/Exif_template.xml?view=markup

and builds the directory for the condensed Exif writable by the
applications. This directory does not include the data format of the
particular Exif fields - just the offset and length (in bytes) fo that
field, referenced by the modified Exif tag number (modified to include both
tag number and tag group in a single long number). It is up to the
particular application to format data according to Exif conventions and
matching the Exif_template.xml

Example of the PHP script


http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/packages/web/353/camvc/camvc.php?view=markup

 343   if ( $value!==null)  elphel_set_exif_field(0x10e,
$value.chr(0));

writes string data from $value terminated by zero byte (chr(0) ) to Exif
field with the tag 0x10e (group 0) , the tag called "ImageDescription" in
Exif. The Exif_template.xml reserves 40 bytes fro the image description, so
if you need more you have to modify that template file. It is also possible
to add more fileds - you need to define them in Exif_template.xml, then
write with elphel_set_exif_field (or directly using the device driver).

It should be possible to write GPS data fileds with PHP script, but that
would be more tricky than to wrikte to ImageDescription tag - you'll need to
write data in the Exif format, not just string data. Making all such
conversions in PHP may add considerable load if the data is updated at high
rate,  you may need to write a C program, modifying it from this one:

http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/garminusb2nmea-0.12a/nmea2exif.c?view=markup

So the quick fix that I would recommend is to format the required data into
a string of <=40 bytes and use elphel_set_exif_field(0x10e,
$string_to_write.chr(0));

Andrey


On Mon, Apr 19, 2010 at 4:32 PM, Andrey Filippov  wrote:

> Scott,
>
> is it OK to reply you through the mailing list? This topic may be of
> interest to other users.
>
> Andrey
>
>
> On Mon, Apr 19, 2010 at 3:37 PM, Scott Janz  wrote:
>
>> Hello Andrey,
>>
>> I'm sorry I'm not very good with PHP and need a little more info, this is
>> the way I currently read the GPS data from the EXIF header via PHP
>>
>> #!/usr/local/sbin/php -q
>> > $exif=elphel_get_exif_elphel('0');
>> echo
>> "EXIF:",$exif['GPSDateTime'],",",$exif['GPSLatitude'],",",$exif['GPSLongitude'],",",$exif['GPSAltitude'],";
>> ?>
>>
>> How exactly do I write my own values back? What does the 0x10e signify?
>>
>>
>> thanks,
>>
>> -scott
>>
>>
>> Andrey Filippov wrote:
>>
>>> Scott,
>>>
>>> you may try that, the easiest thing would be to write to image
>>> description (it is set with 40 bytes length, similarly to:
>>>
>>>
>>> http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/packages/web/353/camvc/camvc.php?view=markup
>>>  342 case "description":
>>>  343   if ( $value!==null)  elphel_set_exif_field(0x10e,
>>> $value.chr(0));
>>>
>>>  344   break;
>>> You may do the same with the GPS fileds, but that may be slower and eat
>>> up to much of the CPU resources. The data you write to Exif should be
>>> already formatted in the same way as it is stored in Exif).
>>>
>>> When you write to any of these fields, the data will be applied to all
>>> the next frames until overwritten.
>>>
>>> Andrey
>>>
>>>
>>
>
___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-13 Thread Janz, Scott J. (GSFC-6133)
The GPS is not getting a fix right now, we believe there is a cable problem 
between the camera and the aircraft antenna. We hope to have it fixed for the 
next flight.

-scott

From: elp...@gmail.com [elp...@gmail.com] On Behalf Of Andrey Filippov 
[and...@elphel.com]
Sent: Tuesday, April 13, 2010 5:54 PM
To: Janz, Scott J. (GSFC-6133)
Cc: support-list@support.elphel.com
Subject: Re: Elphel camera on the Global Hawk

Scott,

Thank you for the update (I'm sure you are very busy now), we are watching this 
project with great interest - (you may see it here : http://map.elphel.com/ ).

 It seems that GPS data in the Exif of the Images is stuck - is the GPS 
disconnected from the camera or there is a problem in the camera itself?

Andrey

On Tue, Apr 13, 2010 at 4:13 PM, Janz, Scott J. (GSFC-6133) 
mailto:scott.j.j...@nasa.gov>> wrote:
FYI

Currently flying 24 hour mission over the Pacific. Real-time camera views can 
be found here:

http://ghoc.dfrc.nasa.gov/~dvangilst/acam.html
   (nadir view elphel)
http://ghoc.dfrc.nasa.gov/~dvangilst/hdvis.html
   (foward view stardot)


-scott


___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-13 Thread Andrey Filippov
Scott,

Thank you for the update (I'm sure you are very busy now), we are watching
this project with great interest - (you may see it here :
http://map.elphel.com/ ).

 It seems that GPS data in the Exif of the Images is stuck - is the GPS
disconnected from the camera or there is a problem in the camera itself?

Andrey

On Tue, Apr 13, 2010 at 4:13 PM, Janz, Scott J. (GSFC-6133) <
scott.j.j...@nasa.gov> wrote:

> FYI
>
> Currently flying 24 hour mission over the Pacific. Real-time camera views
> can be found here:
>
> http://ghoc.dfrc.nasa.gov/~dvangilst/acam.html
>   (nadir view elphel)
> http://ghoc.dfrc.nasa.gov/~dvangilst/hdvis.html
>   (foward view stardot)
>
>
> -scott
>
___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-13 Thread Janz, Scott J. (GSFC-6133)
FYI

Currently flying 24 hour mission over the Pacific. Real-time camera views can 
be found here:

http://ghoc.dfrc.nasa.gov/~dvangilst/acam.html   (nadir view elphel)
http://ghoc.dfrc.nasa.gov/~dvangilst/hdvis.html   (foward view stardot)


-scott

___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com


Re: [Elphel-support] Elphel camera on the Global Hawk

2010-04-06 Thread Andrey Filippov
Scott,

Thank you for the update, this is a very interesting application!
 Will it benefit from extending the sensitivity towards UV? It may be
possible to remove the glass window from the sensor - at least we know it is
possible with the 3 MPix, my colleague Alexander Malyutin at General Physics
Institute (Moscow, Russia) did that with MT9T001 and MT9M001 sensors.

Andrey
___
Support-list mailing list
Support-list@support.elphel.com
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com