rawtherapee.com Forum Index rawtherapee.com
Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HDR in rawtherapee
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    rawtherapee.com Forum Index -> Ideas, Feature Requests
View previous topic :: View next topic  
Author Message
Hombre



Joined: 14 Jul 2007
Posts: 185
Location: Vandoeuvre-les-Nancy - FRANCE

PostPosted: 16th Oct 2009, Fri, 00:51    Post subject: Reply with quote

ben_pcc wrote:
Dynamic range compression fits perfectly in RT, because it works with 16 bit data. Today's RAW images are borderline HDR. If you want to use a separate tool, either your separate tool must load the RAW (as in qtpfsgui) and you miss RT's awesome functionality or you use RT to produce LDRs at different exposures, build an HDR, and then run it through your tone mapping tool. Crap either way.


RT can generate 16 bits images (well when the 16 bits Tiff bug will be corrected), so it can still make sense, but i'd love to see that integrated in RT, for sure.

But... your technique try to enhance an image with the only 16 bits of data of some cameras (12 bits "only" for my Pentax K20D), but you still face 2 problems :
- totally burned areas cannot be recoverd or partially burned area (i.e. 1 or 2 of the RGB channels are burned) will introduce false colors
- clarifying dark areas will raise the noise too !?

What we were asking for was a tool to merge the data of several image, like enfuse for example. Your technique still looks interesting for single image. Too bad that you cannot produce an example image Sad
_________________
Pentax K20D, Pentax 18-250mm, Pentax 70mm Limited, Sigma 70-300mm
Back to top
View user's profile Send private message Visit poster's website
ben_pcc



Joined: 15 Oct 2009
Posts: 45

PostPosted: 16th Oct 2009, Fri, 03:59    Post subject: Reply with quote

RT can make 16 bit images? Cool, I'd no idea! This will be useful to me.

Burned areas obviously don't get fixed, you can't make something out of nothing. But it doesn't make it worse, generally this method seems to only help where it can.

Similarly, I tried it on shadows with some pixels having zero luminance and it doesn't do much for those either.


Concerning clarifying dark areas: yes, it will by all means raise noise. So will a tone curve which begins steep. Once again you can't make something out of nothing so this isn't very surprising, when I say "it's immune to noise" what I mean is that noise doesn't ruin its function (many tone mapping functions can fail from noise).

But note that if you wisely approximate the gradient (eg, Scharr operator) you will avoid raising the noise. I haven't even tried Scharr yet, I'm using central difference and it looks great.
Back to top
View user's profile Send private message
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 16th Oct 2009, Fri, 10:03    Post subject: Reply with quote

ben_pcc thank you for the suggestion, Gabor seems to be away/busy at the moment but that seems to be the way he functions - away, then bang, a whole new version :] I'll email him a link to this thread, so stay tuned for feedback.
Back to top
View user's profile Send private message Visit poster's website
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 16th Oct 2009, Fri, 11:53    Post subject: Reply with quote

OK, he got the message, prepare for big changes and great news!
Back to top
View user's profile Send private message Visit poster's website
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 16th Oct 2009, Fri, 11:53    Post subject: Reply with quote

OK, he got the message, prepare for big changes and great news!
Back to top
View user's profile Send private message Visit poster's website
RichardRegal



Joined: 27 Aug 2008
Posts: 49

PostPosted: 16th Oct 2009, Fri, 14:25    Post subject: Reply with quote

ben_pcc wrote:
I'll put it this way. . . . Apply a tone (or luminance) curve that starts steep but becomes linear, the steep portion will raise illumination in the shadows. . . What I'm suggesting is that we apply a curve such as this to the gradient of the luminance of the image, gradient means changes.


What on earth does the last sentence mean? Are you saying that we use a luminance tone curve that starts steeply and then at some arbitrary point changes to a less steep diagonal, or just a curve start the the oint at which it goes diagonal. If so then we can do that now.

However your reference to doing this to the gadient of the luminance seems to imply that it is the rate of change of the steepness that you are adjusting, not the steepness itself.
Back to top
View user's profile Send private message
dark2star



Joined: 07 Aug 2009
Posts: 35

PostPosted: 16th Oct 2009, Fri, 14:26    Post subject: Reply with quote

Hi,
The algorithm suggested by ben_pcc sounds like a cool idea when used to convert the 12-, 14- or 16bit raw images to 8bit - either as an alternative to the existing curve tool or as an enhancement.

With many of my pictures I find myself using a conversion curve that boosts the darker areas (shadows) while compressing the brighter areas or at least keeping the latter as they are. This is, in fact, a kind of compression, which could be considered a simple form of HDR->LDR conversion, anyway Wink So, if another algorithm existed which would yield good results, I'd be tempted to use it often, though probably not always Wink

Anyway, I spent some thought on the topic "HDR", at least as far as it concerns raw photography. In my eyes, using more than 8 bits (raw files) and mapping (converting) it to 8 bits is a challenge, and would profit from the knowledge created by the HDR community. Insofar this discussion is "good", although I wouldn't want to burden RawTherapee with the functionality of a full HDR toolkit - I'd rather stick to the Unix' way of life: have a separate tool for each thing and achieve much more with the combination of the tools than by a large integrated tool.

Hav
Back to top
View user's profile Send private message
ben_pcc



Joined: 15 Oct 2009
Posts: 45

PostPosted: 16th Oct 2009, Fri, 18:19    Post subject: Reply with quote

DrSlony wrote:
OK, he got the message, prepare for big changes and great news!


Neat, merci!



I'm sorry I've made some confusion. I forget that gradient means a few different things in the working with images. To clarify:

"Gradient" in this context means "magnitude of discrete approximation of the vector containing partial derivatives of the image" which in human terms means "how much pixels are varying/changing at a point".

So, if you measure the gradient in a flat part of the image, like blue sky, it's pretty much zero.

If you measure the gradient at something not flat, such as an edge or texture or something, it's greater then zero. At a transition from full luminance to zero luminance the gradient is very big.


If you think about this, applying a curve to the gradient makes sense. If you think about it harder you'll see that getting an image back from adjusted gradient is not simple because every pixel in the output image will depend implicitly on every other pixel... everything is unknown and interdependent. Interestingly, the problem you have to solve is equivalent to fluid flow in a rectangular pipe which is why this is easy for me, I have a fluid mechanics background :->


One exception: I mentioned using a method called "conjugate gradient" to solve for the image. The word gradient there is talking about something else, but it's irrelevant.


So, again in summary, using this technique you don't mess with the pixels, instead you mess with differences between pixels. Specifically, raise small gradients and leave large gradients the same.

Another different possible application: overexposed regions have zero gradient. What if you smoothly patch such regions with nonzero gradient? There's so much you can do with this stuff (soon in my work I'll use it for blending), google "Poisson image editing".

I don't think RT should assemble HDR from multiple images unless Gabor really has nothing better to do. I don't know much about HDR synthesis but from what I've heard it's not simple, so there should be separate software for that. However RAW and HDR are becoming more and more similar nowadays, so RT should definitely be very capable of dynamic range compression (as mentioned, it already is capable of excellent global adjustments) and maybe in the future it should open HDRI created with other software.

HDR Therapee!

(no, kidding, that sounds terrible. I love RAW TheraPEE!!!)
Back to top
View user's profile Send private message
paul.matthijsse



Joined: 07 Oct 2008
Posts: 653
Location: Dieulefit, France

PostPosted: 16th Oct 2009, Fri, 20:51    Post subject: Reply with quote

Hello, there's an expression going on, in several languages -- a picture tells more than a thousand words.

So give us a picture, an example, to show what you are talking about. For the moment your argument ("the problem you have to solve is equivalent to fluid flow in a rectangular pipe") is quite abstract to say the least, at least for an amateur photographer like me. This does not mean your idea is bad, just try to communicate it better. Not in words but with photos.

Cheers, Paul.
Back to top
View user's profile Send private message
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 16th Oct 2009, Fri, 21:35    Post subject: Reply with quote

ben_pcc: very interesting stuff! I agree with Paul that posting some images here would be more easily understandable, more convincing and more entertaining for us laymen :] Although those links, and googling for the general idea, does already present some very interesting images I'd love to be able to create.
Back to top
View user's profile Send private message Visit poster's website
ben_pcc



Joined: 15 Oct 2009
Posts: 45

PostPosted: 17th Oct 2009, Sat, 00:34    Post subject: Reply with quote

Well, like I said I can't do anything now since all I have is code I wrote at work. I'm pretty sure I can get in trouble for putting that to use here.

I should write it in C from scratch and use that to produce samples but you guys would have to convince me that if it's good it'd be used so that my time (I work two jobs and take a class) won't be wasted.

DrSlony, are you like Gabor's spokesman or something?
Back to top
View user's profile Send private message
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 17th Oct 2009, Sat, 01:02    Post subject: Reply with quote

No, I'm just on the dev team.
Back to top
View user's profile Send private message Visit poster's website
ben_pcc



Joined: 15 Oct 2009
Posts: 45

PostPosted: 17th Oct 2009, Sat, 01:34    Post subject: Reply with quote

Oh cool, I thought was just Gabor. How many of you are there?

Actually now that I think of it I might wait until December for my class to end, because I'm rather busy. But still, if you guys think it's worth me coding this up say so. If it turns out to be honestly unwanted I'll understand.

I've used RT a lot in both work and play so it'd be nice if I could contribute something.
Back to top
View user's profile Send private message
RichardRegal



Joined: 27 Aug 2008
Posts: 49

PostPosted: 17th Oct 2009, Sat, 02:06    Post subject: Reply with quote

ben_pcc wrote:
"Gradient" in this context means "magnitude of discrete approximation of the vector containing partial derivatives of the image" which in human terms means "how much pixels are varying/changing at a point".

So, if you measure the gradient in a flat part of the image, like blue sky, it's pretty much zero.

If you measure the gradient at something not flat, such as an edge or texture or something, it's greater then zero. At a transition from full luminance to zero luminance the gradient is very big.

So, again in summary, using this technique you don't mess with the pixels, instead you mess with differences between pixels. Specifically, raise small gradients and leave large gradients the same.


So if I understand you, what you are doing, in concept, is taking the L channel, runnig it through a low pass filter, and using that as a mask for the tone curve. A bit more complex because, in essence, you use a series of curves with layer masks based on different spatial frequencies, but that is the general idea. Do I have it right?
Back to top
View user's profile Send private message
DrSlony



Joined: 02 Dec 2007
Posts: 934
Location: London, Rainy Kingdom

PostPosted: 17th Oct 2009, Sat, 11:52    Post subject: Reply with quote

ben_pcc: I'm all for it, and Gabor was very enthusiastic about your idea too! It's entirely up to you, since RT will get GPL'd and you'll be free to add what you wish. I can't speak for others but I don't see how anyone would not want that functionality :]
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    rawtherapee.com Forum Index -> Ideas, Feature Requests All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group