Sign in to follow this  

Computing spherical harmonic coefficients for HDR images

This topic is 1853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there again! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

I am dealing with spherical harmonics once again. The new problem is the following:
[quote]I would like to compute the SH coefficients of HDR images and construct a sphere map of it.[/quote]

I've started my looking at the official [url="http://graphics.stanford.edu/papers/envmap/prefilter.c"]project page[/url], which contains the function [font=courier new,courier,monospace]prefilter.c.[/font]
The code structure is the following:
[CODE]
input(filename, width) ;
prefilter(width) ;
tomatrix() ;
[/CODE]

Unfortunately though, when I tried running the c-file on HDR images, I got an error (incompatible format). The accepted format is .float. I would like to change the [b]input(filename, width) [/b]function to accept the HDR format as well.
The next idea I came up with was to use a library to read HDR images, namely, the [url="http://www.flipcode.com/archives/HDR_Image_Reader.shtml"]following[/url].
Unfortunately though, this one is written in C++. Thus, I am asking myself how to combine the two.

Any ideas on how to get started would be greatly appreciated.

Share this post


Link to post
Share on other sites

This topic is 1853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this