Best workflow to delete unwanted objects from an image - help needed


#1

I would like to delete an unwanted object from an image.
I have few very similar shots where I could get the area missing after removing the object.

With JPEGs normally I would use GIMP and either lasso select the area or paste the images as layers and merge them.

But I am not sure what is the best way to do so with RAW images.
Is there a way to manipulate them just like if they were JPEGs and produce a modified RAW at the end?

Or maybe there is another workflow/software that would allow to get the job done better / with less effort ?


#2

I don’t remember any such thing that does allow you to manipulate the RAW like that. My workflow is exporting to TIFF with the color information being embedded, and then importing to Krita, and I’ll note that the color profile being used is of the one that in my camera. And then, I work with G’MIC inpaint repair tool, or Krita healing tool, or clone with healing enabled, or just plain cloning without healing enabled, or all of the above. Sometimes, in Krita, I will convert a layer color space to LAB in RGB Krita file to gain access to LAB color adjustment for a layer. The whole file will still use RGB, and you can even mix LAB color space layers using RGB blending modes.


(Glenn Butcher) #3

If you want to use the GIMP tools with which you are already familiar, export a 16-bit TIFF from the raw developer and edit in GIMP as you did your JPEGs. Doing this with the 16-bit TIFF lets you retain the advantage of tone resolution that probably factored into your move from JPEG to raw shooting in the first place. Edit: Oh, you need at least the 2.9 version of GIMP; anything earlier will only edit in 8-bit, thus negating the effort to use the 16-bit TIFF.

Saving such editing back to the raw file is problematic from a couple of perspectives. Editing requiring operator visual interaction has to be done in a format the operator can see, that being RGB pixels scaled to the expectations of human perception. Saving that back to the raw file would require reversing that scaling, and “re-mosaicing” the RGB to the Bayer pattern, if applicable to the originating camera.

Since I’ve started shooting raw, I’ve developed straight to JPEG for posting in all but maybe 4 or 5 images, where I produced an intermediate TIFF for just the purpose you describe. That TIFF sitting there beside the NEF tells me there was intermediate editing at some point in the image’s history, an important thing for a person with increasingly bad recollection… :smiley:


(Mike Bing) #4

“produce a modified RAW at the end” is simply not possible. A raw is a raw.


(Mica) #5

Darktable has a spot removal tool, depending on the object, that might work.

Otherwise, make all edits possible, export a tiff and take it into gimp to finish.


#6

Interesting. I have never used Krita for photography. I will give it a shot


#7

There’s some stuff you should know before trying out Krita for photo-manipulation. Krita 4.0.0 has Destination In blending mode. Destination In is like transfering the alpha to the rendered image below, and that’s it.

  • In Krita, you have the benefit of having nondestructive editing using transparency mask, clone layer, filter layer, file layer, transform mask (perspective, liquify, scale and move, and warp are all there), filter mask, group layer, and so on. Filter layer is essentially the same as adjustment layer for many people. GIMP does not have that yet, but with Photoflow plugin, you have nondestructive editing support for GIMP. It’s not near the flexibility of Krita, or Photoshop, or Affinity Photo. The downside of Krita in photo-manipulating is that you don’t have as much filters as GIMP does, but this is a reason why some of us combine Krita with GIMP together. Yes, there are people who combine both programs because of the strengths each program have and to fix each other weakness, and yes some of them are just photographers.

On the other note, Krita might or might not have the Photoflow plugin. If Krita is going to get Photoflow plugin, that is a boon for content creation and photographers. Why? Simply because of the fact that Photoflow plugin in theory solves filter limits in Krita, and allows artists+photographers to have more flexibility with how they work. Krita is lacking in native version of good sharpening filter, good color temperature, white balance, and a maybe a few more here. Photoflow would solve that, and Photoflow plugin would add into the available filters in Krita.

  • The tools are all under brush, and for photo manipulation, the most relevant brushes are deform, clone brush, color smudge, and the good ol regular brush. You need to disable color rate, and keep the option to smearing to emulate GIMP smudging behavior. Brushes can have their own blending mode enabled. You can edit only saturation of a picture or color of a picture if you want. G’MIC also can be used to manipulate pictures. In fact, I use g’mic inpainting all with Krita built-in 3 solutions for fixing picture. You can actually use deform as a secondary smudging tool which is more content aware.

  • Instead of using pen tool, you can use vector layer, and vectors instead to extract out object.

  • To enable nondestructive LAB color adjustment for a layer, go to layer -> convert -> convert layer color space, and then use LAB. After that, you add a filter mask, and go to color adjustment to see Lightness, A, B, and Alpha. To enable LAB for every layers, you simply convert color space used in the document. Krita supports XYZ, RGB, CMYK, Grayscale, and YCbYr (In theory just for this one).

  • And last of all, the gui is admittedly pretty bad on the brush department for Krita 4.0.0, and some painters hate this new GUI. It’s a little worse for photography, but gui is not the end. If you can get pass by that, then you might see how Krita can be complimented with GIMP or even use it as a main toolbox for its nondestructive editing support. I went with Krita over GIMP as the main because of nondestructive editing. After learning Photoshop, for me, it became clear that I cannot simply work with destructive editing.

  • Oh wait, one more thing, Krita selection tools is garbage. Even for content creation, it is garbage at times. Try to avoid this. GIMP is pretty bad in that department (I tried hair extraction, and nope), but not as bad as Krita.


#8

Thanks a lot for posting this.I normally don’t do such heavy processing with my photos and use darktable with its masks almost exclusively but once in a while I want to delete that guy in the background from a picture I really like.Darktable’s spot removal tool isn’t helpful with that. :slight_smile:


#9

@Andrius Have you tried HDRMerge? That is the only piece of software that I know of (or remember) that can output a DNG with alignment and masking capabilities of raw files. I don’t know whether its features are flexible enough to accommodate your needs but a few developers on this forum have been maintaining it, so it is possible that they might consider any feature requests or at least appeals for assistance.


#10

No I have not. Thanks for the tip I will give it a try.


(Morgan Hardwood) #11

Yes, using HDRMerge, though it has no “clone” feature, so you would need at least two raw shots of the same scene, then you can merge one into the other and mask out the unwanted feature. It saves floating-point raw DNGs.


#12

That sounds like exactly what I want.
I will give HDRMerge a try for sure.