2

Is there a way to edit a raw image to black out or blur faces in raw images. The purpose would be to post images online for editing advice whithout identifying the people in the shot.

I’m currently using a canon 350d but if some systems can and others don’t knowing which are which would be helpfull so this question is not restricted to my camera.

  • 1
    Unless you really need to discuss skin tones, pets & stuffed toys make good test subjects with no fear of recognition or embarrassment. Or get your subject to hold said pet/toy in front of their face. – Tetsujin Sep 21 '18 at 8:42
  • @Tetsujin my usecase was along the lines of, how can I rescue this Image (In this case I had problems getting exposure rigt for both the sky and the people and sand in the forground) – lijat Sep 21 '18 at 9:06
  • 2
    OK, for a retrospective post, then no soft toy available. In that case you could blur & just upload a jpg, with potentially a link to a full single-layer TIFF. No-one could unscramble from either of those if you solidly blacked out the faces - but see security.stackexchange.com/questions/184099/… for caveats if your information is highly sensitive [though I'd usually assume that in most cases no-one would be bothered to go to such lengths] (I should drop this in as a secondary answer to keep to the spirit of SE) – Tetsujin Sep 21 '18 at 9:27
4

Comments turned into an answer...

As has already been covered, you cannot blur the RAW, because edits to RAW are saved as 'sidecar' files & are entirely optional for any other person, app or computer viewing them to use or ignore as they see fit.
There's another downside to RAW - only you know what your intent was; anyone else opening it in disparate software won't even know your start-point. A TIF or JPG will at least look the same to everyone [within tolerance of their monitor, calibration etc]

Unless you really need to discuss skin tones, pets & stuffed toys make good test subjects with no fear of recognition or embarrassment. Or get your subject to hold said pet/toy in front of their face.

If you need to discuss already-taken work for a retrospective post, with no opportunity to replace subjects with toys...
In that case you could blur or black out for privacy & just upload a jpg, with potentially a link to a full single-layer TIFF. No-one could unscramble from either of those if you solidly blacked out the faces - but see Secure way of masking out sensitive information in screenshots? from our sister site Security SE, for caveats if your information is highly sensitive [though I'd usually assume that in most cases no-one would be bothered to go to such lengths]

It's possible to offer potential fixes/cures even from a JPG or TIF by running them through Photoshop or Camera RAW etc after the fact. The changes will not be as detailed as from the original RAW, but they can guide you towards how to make the changes yourself from your original image.

Here are some questions & answers I've personally participated in where advice was gained by using only JPGs posted here & further work could be done by the OP.
None of these had any element of privacy they were overtly concerned about, but the same 'tutorial' approach could easily be taken with hidden faces etc.

What causes this dark halo around the sun? - my own question, the answer helped me find how to fix it, even though I had to do the fix myself.

How can I create this 'medieval look' using an entry-level camera like the Nikon D3300? - the answer to this was done using soft toys, so the OP could copy the techniques later to real subjects.

How could I edit armpit stains out of a photograph? - quick fix to demonstrate the technique, that the OP could then apply themselves to the original.

How to make the signature/watermark look better?
&
How do I correct the huge blue-shift in these images?
- again, rough re-jigs done on JPGs that could be emulated by the OP.

Late Edit:
This one took me a while to find, but this is dependant on being able to read a RAW file using the same software as it was designed to be viewed on. Why does the histogram of an image depends on the software that opened it?

  • 2
    "edits to RAW are saved as 'sidecar' files" OK but in principle there's nothing to prevent somebody creating software that manipulates the RAW file directly, even if none of the widely available software actually does that. – David Richerby Sep 21 '18 at 13:08
  • One would imagine, as no-one has yet done it [that I'm aware of], that there would be little call for it. You're still left with the insurmountable differences in interpretation of what the photographer's intent was, when opened in anything other than the Camera manufacturer's software [hence my last link, above]. – Tetsujin Sep 21 '18 at 13:13
3

When you "edit" a raw image with pretty much all available raw processing applications, you're not really editing the raw data. You're editing the set of instructions on how that data should be used to produce a viewable image. The actual raw data is not altered.

When you look at a 'raw' image on a screen, you're not really looking at "THE raw image", either. You're looking at one possible interpretation among a (practically infinite) number of equally valid interpretations of that data.

If someone else opens a raw image file that you have "edited" to blur or black out faces, your edit will only be used and the faces blurred or blacked out if the application the other party uses to open the raw file:

  • Understands the instructions you added with your previous edit. This usually means the same application is used to by both you and the other party

and

  • The application on the second user's device is set to use those instructions, rather than some other set - such as another default set - to open the file.

Even then, the user could easily reverse your blurring edit to see the faces without the blur.

If the raw file is opened by a different application than the one you used to blur or black out the faces, it is nearly impossible that the faces will be blurred or blacked out in the image displayed on the screen.

I was wondering if there was a way to actually obscure or delete the information in some pixels in the raw data.

If the original raw data is unaltered by every commercially available raw processing application and by every popular open source raw editing/viewing application, and you are using any such commercially available or open source application, the answer should be fairly obvious: "No."

I suppose one could create an application that could decompress the raw image data to a raster format, convert the monochrome luminance values of each pixel in the raw file to color, apply gamma correction (so that you can see what you are doing instead of trying to work on a black blob of nothingness), mask out the faces, and then convert the gamma corrected values back to linear values and re-encode that into whatever particular raw file format your images use (NEF, CR2, etc.).

Or, as others have pointed out, one could designate locations to be altered based on the preview jpeg image usually provided in the raw file.

One would still need to decompress the raw image data into a raster image, apply the changes to the specified locations, and then compress the raster image back into the original raw file format using whatever specific compression scheme the original raw format uses. One would also need to delete the original jpeg preview (and any other preview/thumbnail jpeg or tiff images appended to the original raw file) and replace it (them) with an altered one, either generated from the altered raw data or by saving the changes made to the original jpeg preview.

But to the best of my knowledge, no such product is commercially available. I'm also not aware of any open source product that can do that.

  • 3
    This does not answer my question, I was wondering if there was a way to actually obscure or delete the information in some pixels in the raw data. – lijat Sep 21 '18 at 7:41
  • 1
    @lijat If the raw data is unaltered by every commercially available raw editing/viewing application, the answer is obviously "No." Please see the addition to the answer. – Michael C Sep 21 '18 at 7:51
  • thanks, with the addition the question is answered thou not in the direction I hoped – lijat Sep 21 '18 at 7:58
  • 2
    The software wouldn't necessarily need to re-encode or reverse gamma — it'd just apply its obfuscation to the selected area in the data. – mattdm Sep 21 '18 at 12:08
  • 1
    @mattdm It probably wouldn't really even need to do the first round of processing; most RAW formats I'm aware of include preview files that could be used. Even assuming a certain amount of lens correction or other spatial processing, the mapping would probably be close enough to let a user select a region with reasonable accuracy. Given that this comes up once in a while, maybe it's time for somebody to start this project... :D – junkyardsparkle Sep 27 '18 at 7:19
1

For a completely different stance (but a similar final answer):

In theory, you could write software to black/white out areas in a RAW file, and leave the rest of the picture unchanged.

In practice that would be useless, because people are what we look at (when they aren't the main subject). And we notice the slightest changes(*). So you can't edit a picture without checking that your editing isn't having unwelcome side effects on the people, and this requires to keep these people visible.

(*) in the linked question, nobody worries if the brick wall is the right kind of red...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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