|
|
Overview
The purpose of this lab assignment was to compare some tone mapping operators. In particular, we were supposed to implement Reinhard, et al.'s 2002 algorithm and Ferwerda, et al.'s 1996 algorithm to compare them.
Below, I've included some comparisons of a few datasets I tested my results on. I've links to where I found the datasets included in each as well as some brief comments. For output, I outputed the images to ppm and then converted them to a smaller jpg format for this website, so they may have a few artifacts from that conversion process here. Clicking on the jpg images though will give you a full size jpg.
Lamp Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
 |
Horrible! (of course)
|
With the above, it's pretty easy to see how Reinhard's nonlinear algorithm brings out the detail of the lightbulb, even at high a values there's a distinction between it and the wall. Ferwerda's algorithm does a nice job of fitting the range of values into the image, but it doesn't give good distinction; everything in the high range is muddled together, while to see the detail in the low light regions, the Lda has to be increased to a value which makes the brights too bright. Linear scaling only shows us that the brightest spot on the image is the lightbulb itself.
Tahoe Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
 |
Compare with Lda = 0.1
|
I had some trouble with this dataset, which is one of the reasons in my code I changed Ywhite to be the 100*Ymax as opposed to just Ymax. Otherwise, I'd still have a large effect from the light in Reinhard's method. With Ferwerda's I still had some trouble getting to see the snow on the ground, even at higher Lda's than shown. It would appear that Ferwerda's doesn't handle a wide range of luminances where two portions of the image are more or less disjoint; it gives an affect which is almost linear at low Lda's.
Cornell Box Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
 |
Just the bulb
|
With this dataset Reinhard's performed quite well. Ferwerda's did decent too in fact, capturing the color correctly and almost allowing a distinction between the bulb and the surface it lights. I believe this is indicative of a lower range of luminances in the image.
Cathedral Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
 |
Stained glass is not terrible here
|
This dataset is maybe the first I would argue that Ferwerda's does equal if not better in some ways. While you can't see the bricks at all, it does a good job of distinctly representing the colors. Especially on the right side of the inlet which is lit by the colored glass. The only comparable one in this regard is Reinard's for a = 0.18. At higher a's, Reinhard's makes the entire scene become a bit too purple with a glow from the glass; I don't believe this is a true to life rendering. One thing to note is the light above the scene though; which Reinhard's does a much better job of capturing correctly.
Text Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
I had chosen this dataset aiming to make the text washed out, but both successfully gave a representation of it. I think here Reinhard's gives the colors a little too vivid at the high a values, and probably the best choice for a is around 0.5 here. Ferwerda's at Lda = 0.8 gives a good representation, but i think washes out the orange a bit too much.
Tree Dataset
This dataset can be found here. With Reinhard's algorithm, I had the following results:

a = 0.18 |

a = 0.36 |

a = 0.72 |

a = 1.54 |
Whereas with Ferwerda's algorithm, I had the following results:

Lda = 0.1 |

Lda = 0.2 |

Lda = 0.4 |

Lda = 0.8 |
For comparison, the linearly scaled image looks like this:
 |
Note the sky here
|
In this dataset both algorithms had some problems. For Reinhard's, increasing a to a value that makes the tree trunk visible makes the background ground and sky way too bright. Whereas Ferwerda's never captures the tree, or the colors of the sky correctly with the Lda values chosen. As the linear image shows, part of the problem here is the high luminance of the blue sky and yellow ground, compared with the tree trunks.
Flubbs
Here are some mistakes that I made when using Reinhard's algorithm on the lamp dataset. They seemed fun, so I put them here too:

Something wrong with the clamping, I think |

I think I messed up initial matrix converion from RGB -> YIQ |

This was just all wrong |

Converted Ynew,I,Q to RGB using the inverse matrix instead of scaling RGB by Ynew/Yold |
For that last bug, I wanted to see what happened on other datasets, because I wasn't sure the correct way to convert back to RGB at the time. You can see the colors get washed, except for the very high luminance. A dramatic example of this is tinterna, run at a=1.54. You can see how the colors get washed out with the "wrong" conversion to RGB. However, in the supposed correct one, there's a magenta and green line running through the image (around the arch and across the top, resp.).
|