Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

How do I avoid banding when I'm tone mapping Radiance images using pcond and phisto?

asked 2015-08-20 19:37:09 -0600

updated 2016-01-09 13:55:26 -0600

I'm using phisto to create a luminance histogram to pass to pcond to tonemap several images. The result has a funny banding pattern.

image with banding

My commands are:

phisto *.hdr > Luminance.hst
pcond -h- -I test.hdr < Luminance.hst | ra_tiff -z - test.tif

When I run it without the histogram input I get the following image (which has no banding):

tonemapped Radiance image without banding

Here are the contents of my luminance histogram file:

1.90373 1682
1.96992 2277
2.0361 3134
2.10228 4385
2.16847 3162
2.23465 6292
2.30084 4391
2.36702 6425
2.43321 6051
2.49939 6363
2.56557 13787
... (edit - I truncated this after the issue was resolved for readability in posterity)

Here's the tonemapped image after Greg's solution: image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
7

answered 2015-08-21 00:52:03 -0600

Hi Andy,

This seems like a resolution issue in phisto. Comparing phisto to pcond, I noticed that pcond sets an upper limit of 1e5 for luminance (5.0 in the log luminance histogram file), then uses 100 bins between this maximum and the minimum (which can't be under 1e-7). The current phisto script looks at the minimum but not the maximum, so your sun throws the whole thing off and we end up with less resolution in the statistics gathering.

I don't know why this hasn't come up before, but the easiest fix is to increase the resolution of the histogram produced by phisto. That way, pcond doesn't generate gaps in its internal histogram, which can cause steps (banding) in the resultant tone-mapping curve.

I have checked in a fix to phisto that seems to resolve this issue.

-Greg

edit flag offensive delete link more

Comments

Thanks Greg! That solved it!

Andyrew's avatar Andyrew  ( 2015-08-21 11:58:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2015-08-20 19:37:09 -0600

Seen: 430 times

Last updated: Aug 21 '15