Spring 2012

Spring 2012
by ani

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a competition in which I have to submit images in RAW format. But I have already clicked some images with Nikon D3200 in JPEG.

Is there any way to convert JPEG to RAW format in Photoshop or any other similar software.

share|improve this question
2  
In any case that you can "save" the file to any raw format, you do not have aditional info, so it is pointless. :o) – Rafael Feb 5 at 18:11
up vote 27 down vote accepted

RAW is not (or minimally) processed image data from camera sensor. JPEG is processed image data. Typically, raw-files from modern cameras have 12-14-bit per pixel which means up to 16384 values (for more details see Michael Clark's comment). JPEG can have only 256 luminance values per RGB channel. This means that jpeg contains much less data than a corresponding raw-file. So no, there is no way to convert a jpeg to raw.

Technically, it's possible of course to convert jpeg data format to raw data format (like it's possible to convert a jpg to png or gif) but this will not make a raw-file and the organizers of competition will surely see that it's not a true raw file. However i have never seen such a tool and doubt that any exists.

share|improve this answer
    
Alex S, thank you for in depth answer. I'll have to shoot those pictures again. – zackygaurav Feb 5 at 9:41
12  
Raw files don't have 12-14-bits per color channel. They have a 12-14-bit monochromatic luminance value per pixel. Each pixel is filtered for either red, or green, or blue. When the raw file is demosaiced colors for each pixel are interpolated based on the monochromatic luminance values of adjacent pixels filtered for the other two colors as well as the luminance values of nearby pixels filtered for the same color as the pixel in question. – Michael Clark Feb 5 at 10:58
    
@MichaelClark Yes, thank you. I forgot about it. – Alex.S Feb 5 at 12:36
    
JPEG can have only 256 luminance values per color. This is also technically wrong. I think what you meant to say is "values per RGB channel", and even that depends on the standard/compression used. – Michael Mauderer Feb 5 at 15:00
    
@MichaelMauderer Before edit I already had used "channel" couple of times so I chose "color" to avoid repeating :) Updated now. – Alex.S Feb 5 at 15:04

In addition to the points Alex S made, you need to consider why they want RAW. There are several possible reasons:

  • Bit depth as Alex S said.
  • JPG suffers from compression artefacts which RAW doesn't. Blown up to exhibtion size these can jump out and ruin a print.
  • Having the RAW file is often used as a proxy for having taken the photo, as RAWs aren't generally published. This is to avoid cheating by submitting someone else's image. TIFF and other formats support high bit depth without lossy compression and are used for distribution of high-res images, so the only reason to have the RAW is that you shot the photo.
  • It's possible they want the as-shot image, though that's unlikely to be for display. Post-processing is part of the digital workflow, and the question is more one of how much is acceptable. Having the RAW file gives them the ability to check how much you've modified the image. I've seen RAW+TIFF submission requirements explicitly for this reason.

So you're probably out of luck this time. I (as an amateur) almost always shoot RAW+JPEG, as many of my shots are just printed with at most a little cropping, but some need proper work. This (if it's an option on your camera) may be an option in the future.

It is possible, if this is a local competition, that they've just copied the rule from somewhere else, so it might be worth getting in touch with them.

share|improve this answer
2  
This is nearly perfect answer from a competition point of view. Thank you Chris H – zackygaurav Feb 5 at 9:41
6  
Actually, as someone who has run competitions like this, a good chunk of that is good evidence of how little those in the 'competition'/club scene actually know about what they're doing... Raw on the D3200 certainly does suffer compression artefacts. The main reason for the raw request is (a) to prevent cheating and (b) to ensure only global modifications have occurred in photojournalism events. I suspect if you contact the organisers and say you shot in JPEG they wouldn't have a problem with the entry, certainly won't hurt to ask. – James Snell Feb 5 at 9:49
3  
For more on the third bullet point, consider Why is giving clients RAW files such a sensitive matter among photographers? – Michael Kjörling Feb 5 at 16:03
2  
@ChrisH well, you've got rounding errors, which might pass as "mathematically lossless", but also you've got the quality settings. JPEG is only mathematically lossless if you use the highest settings, but then the file size blows up by several orders of magnitude as the only regularity usable for compression are rounding errors. – Jan Dvorak Feb 5 at 17:44
3  
@JanDvorak the normal jpeg algorithm can't be guaranteed lossless. The lossless algorithm isn't the normal algorithm. Rounding errors are a separate issue and more related to the image processing than the file/data format. – Chris H Feb 5 at 21:37

You cannot (should not) produce a raw from a jpeg. Theoretically it would be possible as compressed NEF is based on a TIFF container and a "wide" JPEG/JFIF variant IIRC.

And all is not lost as, having run these kinds of competitions, I can say that you may still be able to enter depending on what type of competition it is and why they want raw files...

The requirement may be there because the competition is for unmodified images - this is common with photojournalism competitions where only blanket or minor changes are permitted.

More likely the requirement is there to discourage cheating, which has been rife in the amateur/competitive world. Assuming that everyone shoots raw (and some people don't - and no, I've never understood doing that) organisers will often allow you to supply the original unmodified jpeg you based the entry on as actual entries are usually requested at a specific pixel dimension.

Some organisations post requirements like that under the guise of 'quality', though that's mainly bogus as (even now) few devices are capable of going beyond 8-bits per channel. From my observation it's mainly to keep "newbies" out. From experience I've seen plenty of events ask for 24/48-bit lossless RGB TIFF to then display it on some awful DLP projector which doesn't have the tonal response to make a calibration worth attempting (if they had attempted one, which is far less likely than you might expect).

In any case even though the rules are listed, they are usually about maintaining fairness and will have some caveat that the organisers have discretion over submissions. You should contact the organisers and explain that your original was shot in JPEG as they may still allow you to enter.

And good luck in the competition!

share|improve this answer

There exist methods to do this, but as Alex. S also points out in his answer, there are no standard tools that I'm aware of that will do it for you. In principle, it's a straightforward problem. While there are a vast number of mathematically possible raw files that are consistent with the given JPEG file, the vast majority of those are not likely to be the original raw file. This means that you can try to approximately reconstruct the original raw file using maximum likelihood methods. This requires one to specify a prior probability distribution over the set of raw files.

Similar methods are used in some noise reduction algorithms, here one calculates the most likely noise free picture, given a noisy picture. It turns out that even with simplistic models for the prior probability distribution, one can obtain reasonable results. In the exactly solvable case of a Gaussian prior where one assumes that the prior probability is product of Gaussians of the differences of the gray values of neighboring pixels, the solution is an oscillating Gaussian filter. Noise reduction is then achieved by averaging, but there is then no net blurring due to this averaging, as blurring is counteracted by sharpening due to the alternating positive and negative weights of the filter (which has the analogous effect of an unsharp mask).

share|improve this answer

Raw files are basically digital negative of an image. At the same time jpeg is optimized output created by camera. jpeg cannot contain so much data that a raw file can, so its impossible to convert a jpeg image to raw.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.