Adding view information to hdr files

Hi,

I want to add view information to radiance rgbe files that were assembled from low dynamic range images.

The only way I can think to do so at the moment is to use pvalue as long as I do not want to directly write the binary files. Is there some other, easier way available to modify the "metadata"?

Thank you, cheers,

Lars.

Hi Lars.

A few months back Greg posted a command line to convert
one picture's perspective into another. I don't remember
which tool from the standard set he used but this might
help you to find it. That tool might help you.

I have to do the same thing for my scripts but I think
I just add the missing "view=" line to the image header.
No binary munging involved. If you can wait till tomorrow
I can post what I do to solve the problem from my scripts.
Just can't find it at the moment.

Thomas

···

On Fri, 2009-06-26 at 17:35 +0800, Lars O. Grobe wrote:

Hi,

I want to add view information to radiance rgbe files that were
assembled from low dynamic range images.

The only way I can think to do so at the moment is to use pvalue as long
as I do not want to directly write the binary files. Is there some
other, easier way available to modify the "metadata"?

The script is called "vinfo" and gets installed automatically with the latest Radiance. The source lives in src/util/.

-Greg

···

From: Thomas Bleicher <[email protected]>
Date: June 26, 2009 3:03:15 AM PDT

On Fri, 2009-06-26 at 17:35 +0800, Lars O. Grobe wrote:

Hi,

I want to add view information to radiance rgbe files that were
assembled from low dynamic range images.

The only way I can think to do so at the moment is to use pvalue as long
as I do not want to directly write the binary files. Is there some
other, easier way available to modify the "metadata"?

Hi Lars.

A few months back Greg posted a command line to convert
one picture's perspective into another. I don't remember
which tool from the standard set he used but this might
help you to find it. That tool might help you.

I have to do the same thing for my scripts but I think
I just add the missing "view=" line to the image header.
No binary munging involved. If you can wait till tomorrow
I can post what I do to solve the problem from my scripts.
Just can't find it at the moment.

Thomas

Greg Ward wrote:

The script is called "vinfo" and gets installed automatically with the latest Radiance. The source lives in src/util/.

-Greg

Hi Greg,

thank you for again surprising us with a new tool. Unfortunately this one is again in the good old tradition of conflicting with vi (well, I am really curious how many commands I type lead me to that little editor)...

The reason I was asking is that I am working on full-frame fisheye hdr images as they are expected e.g. by findglare and evalglare. These images do not have any view information included, and I am trying to add this missing part of information.

Cheers Lars.

Hi Lars,

There isn't really a "vinfo" command, is there? What does it do? I used the name because the editor it applies is in fact "vi," so it seemed appropriate. Feel free to modify the code to edit the header as you like. The getinfo command can be used with "ed" to accomplish this.

-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: June 28, 2009 7:06:03 PM PDT

Greg Ward wrote:

The script is called "vinfo" and gets installed automatically with the latest Radiance. The source lives in src/util/.

-Greg

Hi Greg,

thank you for again surprising us with a new tool. Unfortunately this one is again in the good old tradition of conflicting with vi (well, I am really curious how many commands I type lead me to that little editor)...

The reason I was asking is that I am working on full-frame fisheye hdr images as they are expected e.g. by findglare and evalglare. These images do not have any view information included, and I am trying to add this missing part of information.

Cheers Lars.

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Greg,

thank you for again surprising us with a new tool. Unfortunately this one is
again in the good old tradition of conflicting with vi (well, I am really
curious how many commands I type lead me to that little editor)...

That's not quite correct. 'vinfo' is a true and proper Greg-style csh script
that strips the binary part from the image and shows you only the header
in the editor - which is vi. If you call the tool without image all you get
is an editor window without content. In 'vim' this shows a greeting message
which you probably saw.

In fact if you have 'vim' I think you can edit the image headers directly,
without splitting the binary bits. I think I did that before.

The reason I was asking is that I am working on full-frame fisheye hdr
images as they are expected e.g. by findglare and evalglare. These images do
not have any view information included, and I am trying to add this missing
part of information.

Unfortunately I haven't actually done a script yet (just manual testing) but
what I will need to do is adding view lines to Sketchup images. I found that
in Ruby or Python you can just use something like

view = "VIEW= -vta -vp 3.5 4.5 1.5 ..."
img = file("mypic.hdr").read()
img.sub("\n\n", "%s\n\n" % view)
newfile = file("newpic.hdr", 'w').write(img)
newfile.close()

Basically you just replace the two newline characters at the end of
the header with a "VIEW=" line followed by 2 newlines. (I hope this
is proper Python code - haven't used it in a while).

Thomas

···

On Mon, Jun 29, 2009 at 3:06 AM, Lars O. Grobe<[email protected]> wrote:

Lars,

I wrote a little Perl script some time ago, to help out a student
who wanted to batch-correct the exposure info in HDRs. The script is available here:

http://www.luxal.eu/resources/hdr/hdrexpo/index.shtml

It's called hdrexpo. Feel free to use it as a base for for your own HDR header manipulation, if you're happy to stick to the GPL license. I'd be happy to put in your changes.

Axel