PseudoHDR from single JPEGs

Discussion in 'HDR Discussions' started by MartinSykes, Mar 1, 2010.

  1. MartinSykes

    MartinSykes TPF Noob!

    Joined:
    Mar 1, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Cheshire, UK
    Can others edit my Photos:
    Photos OK to edit
    Hi all,

    Quick introduction - recently got interested in HDR but don't have the camera equipment to do it properly yet (just a compact digital that only saves jpegs). I also had a lot of old jpegs which I wanted to improve but couldn't find anything to do what I wanted (for free anyway) so I wrote my own program. Would be interested in feedback and it's free if anyone else finds it useful - you can download it from http://www.martinandanna.talktalk.net/autohdr.html

    It only works on single jpegs but produces 'natural' looking HDR-style effects. It's not fast (about 30s per megapixel) and uses a lot of memory so you might want to resize images down below 10MP if they're bigger than that but I think the results are pretty nice and worth the wait. You can do the more garish stuff afterwards in your favourite photo/paint package. Quick example:

    [​IMG]
     
  2. Provo

    Provo TPF Noob!

    Joined:
    Oct 27, 2009
    Messages:
    934
    Likes Received:
    20
    Location:
    Ex Member
    Can others edit my Photos:
    Photos OK to edit
    I am not knocking down your attempt here, but HDR is comprised of bracketed images at different exposure settings this can be done with 3 different options 3 raw exposure images in increments of either +2,0,-2 (or 6 multi exposed raw bracketed images of +/-1 EV steps) another method is to have multi bracketed exposed images in jpg format ( Ex: +/-1 EV or +/-2EV steps) and finally the last one can be achieved from a single RAW image that you manually set the Ev(Exposure) setting using a RAW image processor such as camera raw in Photoshop. (Although if on youtube you will find some people using a single jpg and claiming as a HDR which goes against most HDR guides & by definition is not a true HDR)
    There is no way you can take a single jpg image and claim it as an HDR image all you will be doing is color enhancing the image aka tone mapping the details which is not a true HDR some image sources might give you a close to HDR image but it’s not the same. Given the example you have used all I notice is the image has been color enhanced that’s about it, and you can see in the shades in the water some over burn color areas as a result of the technique being used. The color on the child is noticeably better enhanced thats about it.

    Wiki: HDR
    HDR Guide
    HDR Guide 2
     
    Last edited: Mar 2, 2010
  3. MartinSykes

    MartinSykes TPF Noob!

    Joined:
    Mar 1, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Cheshire, UK
    Can others edit my Photos:
    Photos OK to edit
    I'm not claiming this is HDR - that's why I titled the thread PseudoHDR - It's a poor relation to the full technique but nevertheless a useful approach which can give nice results where all you have is a single jpeg to work from. I unfortunately only have a compact digital at the moment which doesn't even support RAW.

    I think the multiple exposures is a bit of a red-herring. They are only needed because current camera technology can't capture the full range in one go. As soon as someone builds a better camera then you could capture as much range as you need in a single exposure and all of the problems with aligning multiple exposures would disappear. A better definition of HDR should be based on the absolute range the scene contains, regardless of how many exposures it took to capture that and the method of transformation from that to the more limited available display range.

    Incidentally, my program only adjusts the brightness channel and leaves the hue/saturation untouched. Here's another example where I pushed it a bit harder:

    [​IMG]
     
  4. Overread

    Overread has a hat around here somewhere Staff Member Supporting Member

    Joined:
    May 1, 2008
    Messages:
    23,099
    Likes Received:
    3,765
    Location:
    UK - England
    Can others edit my Photos:
    Photos OK to edit
    Ahh but if the camera could capture the whole light range in a single exposure you wouldn't have HDR processing anymore ;) At least when you can capture the whole range of lightings with the settings needed at the time. Also remember that when a camera records perfect under or overexposure all it records is black or white data and no details. This is a problem with single shot HDR in that you can thus only push those areas so far before they are lost completly - RAW gives a bit more flexability of course - but totally lost details won't come back. So you do need a fairly flat lighting range to get false HDR from a single exposure to work properly.


    Interestingly I don't like what the program has done to your second shot - it made the depth of field look a lot deeper by messing around but the shot jus has something off about it. I guess its me comparing the nice green mossy moss on the left with the more harsh display of moss on the right. Also using programs can bring out the halo effect - and if you look on the underside of the tree you can see a clear kind of bright zone hugging the tree.

    The shot itself is not too bad lighting wise and to be honest if you have something even as cheap as photoshop elements playing around with adjusting the shadow and highlight brightness as well as the contrast tool and levels you can probably get a goood result without the HDR program.

    That said I have used this program and method here:
    http://www.motleypixel.com/forum/index.php/topic,79.msg143.html#msg143
    to good effect in the past - but you need a very good shot for it to work well to start with.
     
  5. MartinSykes

    MartinSykes TPF Noob!

    Joined:
    Mar 1, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Cheshire, UK
    Can others edit my Photos:
    Photos OK to edit
    I think it would be safer to say that when the display medium could display the entire range we wouldn't need HDR processing. Whether you capture 32+ bits of information per pixel from a single shot or many, your display can't display that much so you need some clever processing - HDR or something else to make sure you don't just lose the extra. But yes, I agree that a single jpeg doesn't contain the lsame evel of information that a single RAW, or multiple exposures gives. But that doesn't mean you can still make more of what little it does have.

    I'd also agree the second shot doesn't look 'nice' - I did push it too far just to see if I could. The halo isn't created by the HDR here though - it's there in the original but the processing makes it more noticeable. The approach I came up with uses clever edge-detection to work out what needs lightening/darkening rather than the less sophisticated 'area within a radius' method that can cause halos in some other solutions.
     
  6. williambarry

    williambarry TPF Noob!

    Joined:
    Jan 26, 2010
    Messages:
    119
    Likes Received:
    0
    Location:
    Texas
    I am curious as to why someone attempting hdr would work with jpegs anyway? Jpegs are horrible.
     
  7. MartinSykes

    MartinSykes TPF Noob!

    Joined:
    Mar 1, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Cheshire, UK
    Can others edit my Photos:
    Photos OK to edit
    Simply necessity for the amateur who can only produce single-shot jpegs or happens to have an old jpeg they want to revive. I think anyone would rather use RAW and/or multiple exposures to get better quality results given the choice but it's a luxury a lot of people don't have.

    [EDIT} incidentally, I quite like the definition at the top of the page. It doesn't impose any requirements on the use of multiple exposures or even the depth of a single image, just that the end result addresses the problem of light/dark areas in an original image:
     
    Last edited: Mar 3, 2010
  8. Provo

    Provo TPF Noob!

    Joined:
    Oct 27, 2009
    Messages:
    934
    Likes Received:
    20
    Location:
    Ex Member
    Can others edit my Photos:
    Photos OK to edit
    A good source of why multiple shots are prefered over a single raw image for HDR
    can all be explained here. But short summary contrast ratio and the dynamic range of the file format in place has it limitations. The Dynamic Range for jpg is 256:1 at 8Ev opposed let's say a 16bit tiff file which is dynamic range is 65,536:1 at 16Ev

    This is why we shoot AEB Auto Bracketing Ex: +2,0,-2 etc.. 3 exposed images
    or use the single image RAW and change the exposure being that the RAW image has a great amount of Dynamic Range then the single Jpg.

    Understanding Dynamic Range in Digital Photography

    Vanilla Days : HDR Tutorial Guide Thing for Photomatix
     
  9. TiaS

    TiaS TPF Noob!

    Joined:
    Jan 23, 2010
    Messages:
    116
    Likes Received:
    0
    Location:
    Newfoundland
    Can others edit my Photos:
    Photos OK to edit
    I think you are being given abit of a hard time on here. You are not the first person to have this idea. Dynamic Pro HDR does both this witoh one image and HRD with multiple exposed images. I think it is a good idea to have such a program if you think you will use it
     
  10. MartinSykes

    MartinSykes TPF Noob!

    Joined:
    Mar 1, 2010
    Messages:
    6
    Likes Received:
    0
    Location:
    Cheshire, UK
    Can others edit my Photos:
    Photos OK to edit
    :) Thanks. I have a thick hide so I can take the flak. I'll definitely use it personally - as I said, I only have single jpegs so it's really the only approach open to me at the moment. I figured others in the same situation might find it just as useful. Next step will be to extend it to RAW and multiple images but I wanted to get the basic algorithm right first. It's a bit different to how I understand some of the other programs work so might be worth taking further. I should be able to process a RAW in one go instead of mucking about splitting it into three 'exposures'. I'm pleased with the results anyway even if this is as far as it goes - here's another one which turned out pretty well I think:

    [​IMG]
     
  11. MrRamonG

    MrRamonG TPF Noob!

    Joined:
    Nov 10, 2009
    Messages:
    380
    Likes Received:
    2
    Location:
    Anaheim California
    Can others edit my Photos:
    Photos OK to edit
    Stop beating a dead horse. I don't think the guy is contesting your point that 3 or more bracketed RAW images are ideal for HDR. He is simply trying to work with what he has, one jpg.
     
  12. MrRamonG

    MrRamonG TPF Noob!

    Joined:
    Nov 10, 2009
    Messages:
    380
    Likes Received:
    2
    Location:
    Anaheim California
    Can others edit my Photos:
    Photos OK to edit
    Seeing what you had to start with, 1 jpg, and that you wrote the program yourself, i think the results are good looking. Looks like your limitations also prevent you form getting that over-HDR-processed look.
     
    Last edited: Mar 4, 2010

Share This Page

Search tags for this page

dynamic pro hdr review

,

pseudo hdr from jpeg in elements