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.
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.
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.
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!
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).
There is a very nice tool to remove JPEG artifacts and get DNG file out of pixels. Sure, it can't reconstruct HDR and other details, but still it may be helpful. The application uses machine learning (convolutional neural networks) to process input image (e.g. remove compression artifacts and slightly remove noise) and don't make it blurry as using just gaussian blur with small radius / box blur. Also, the output DNG file is processing well with Lightroom / Rawtherapee.
The application "RAWerse Alpha" (https://rawerse.com). And they provide a demo version.
Converting a jpeg to a raw file is technically possible, but any photo contest is going to notice the missing data. Actually making a raw from a jpeg would be like publishing a book using 120 characters or less. All the EXIF data would be missing so they cant confirm or deny any criteria they may be judging or disallowing.
Corel PhotoPaint will convert JPG files to RAW. Comparing file sizes shows the degree of data loss in JPG. However, if the size of the JPG file is large -- a function of the number of megapixels and the color variation in the photo, and many other factors -- could not the JPG be converted to RAW to 'hold' the original so it does not deteriorate with manipulation? That way, compression of the original will not happen as its JPG version(s) are manipulated.