Jump to content
You must now use your email address to sign in [click for more info] ×

Inpainting help


Recommended Posts

Ok, I am baffled as to how exactly the in painting works.  I am trying to remove the blue in the bottom rightpost-80-0-90107300-1442860245_thumb.jpg corner of this photo (which is distracting, but I think the crop is better this way)  If I highlight all of the blue tarp, it still leaves some in the corner.  If I then re-highlight the remaining blue, then it grows.  What is the principle behind how this works?

 

Thanks in advance.

Link to comment
Share on other sites

That is a really nice photo.

 

I downloaded it and did some InPainting in the bottom right corner. Here is what I got.

 

https://www.dropbox.com/s/bffbbm0drnrdjnw/InPaintingFromAP.jpg?dl=0

 

I guess I don't understand the problem you are having since my InPainting seems to have removed all of the blue and replaced it very well with more grass. Perhaps you can be a bit clearer about exactly what the problem is? Or perhaps you can post the InPainted photo to show where the blue re-appeared? Or perhaps I am mistaken in my understanding?

 

Where in Kansas, if I might ask? I used to live in Kansas myself, years ago.

 

UPDATE:

 

For some odd reason APB has been exporting images that are cut off at the bottom. The previous link contained that and I had to go back to AP to fix the problem. The above image seems OK to me.

Link to comment
Share on other sites

Ok, I tried again and it worked fine.    I will save the next one that gives me issues.  Sometimes it works INCREDIBLY and the next time I have issues, and I figured I am missing part of the equation.   Wish I could redo the whole background,   :) but the photo was just a quick iPhone shot.

 

Are the cutoff images a bug?  I've just noticed it on some pics recently.

 

BTW we're NE of Wichita, on a farm.

Link to comment
Share on other sites

  • Staff

Hi Busenitz,

The results can vary between one Inpainting operation and another depending on the data you brushed over. If you don't get the result you want at first try, try to paint over the same area again or just undo and try again.

 

Yes, the cutout images are a bug. It's already logged and should be fixed for the next Beta.

Link to comment
Share on other sites

Hi Busenitz,

The results can vary between one Inpainting operation and another depending on the data you brushed over.

I was wondering if the InPainting algorithm is determinative or not. That is, if someone paints the exact same area twice, will he/she get the exact same results? Or is the replacement randomized so even the same selection twice will yield different results?

Link to comment
Share on other sites

Is there more to this than just "trial and error?"  For example, if I have an electric line I'm trying to remove, just painting over the line works well.  Is the goal to paint over JUST what is to be removed, and not get any of what we would like to be the sample for the replacement?

 

What was strange was when I was first working with it, I would be able to remove most of the blue, but then when I came back the second time, it added more blue in so that I was about back where I had started from.

 

But not being able to reproduce the problem makes it hard to solve!  :-)

Link to comment
Share on other sites

Hi Busenitz

 

 

I downloaded your picture and tried out a few edits with the following results:

 

Zoomed in on the corner, 64px brush, 100% Opacity and Flow, 80% Hardness:  Cleaned up the blue tarp consistently.

 

However, if I used these settings to clean out the brown object above the tarp (?large leaf) either sequentially or at the same time as the blue tarp, the same cloned in grass area was replicated in the place of the 2 removed objects.  Removing the tarp first, then reducing the Flow to 40% and Inpainting the leaf worked fine.

 

Yes - nice photo well worth the effort.

Retina iMac (4K display, 1TB SSD, 16GB RAM) OS X 10.11.6  Capture One 10.

 

Link to comment
Share on other sites

I would guess that the larger the inpainted area the wider a selection is made to determine what will replace it. I know we have all seen that smaller areas yield consistently better results and if the area to be replaced is large I always try to use multiple small sections, inpainting each one until the whole area is fixed.

 

One of the other processes I use is to clone the area to be removed using something like what I want to replace it. After that is done I then use the Inpainting tool to fix the cloned area. That often works very well and I have successfully removed entire large cars and people from an image in one of the US National Parks using a process like that - clone and then Inpaint.

Link to comment
Share on other sites

Ok, here's another question I have, and not sure if there is an exact answer.  When you draw horizontal for in painting, does it sample from above and below?  And if vertical then on both sides?  Sometimes I will want the sampling to be on one side, but not the other, is that possible?  I seem to be getting random results, and I can usually (eventually) get what I'm after, but is there something more precise to this?

 

MikeFromMesa - I did try the cloning before in painting and that did often give more pleasing results.  Thanks

Link to comment
Share on other sites

When you draw horizontal for in painting, does it sample from above and below?

 

​That is an interesting question and I do not know the answer. However what I have found is that when I "slice" an object out using the InPainting tool (that is, I start removing a large object by removing "slices" one at a time, usually from the top, instead of trying to remove the entire object) AP seems to understand what I want to do and take from above. When I try to remove "slices" from the left or right it also seems to understand and use the correct background to remove the item. I do not know what algorithm is being used and how it determines what to use, but it generally seems to be smart enough to know what I want.

 

MikeFromMesa - I did try the cloning before in painting and that did often give more pleasing results.  Thanks

 

When things go awry with InPainting that is the process I use. It generally takes a bit more time (and more InPainting passes) but usually does what I need. Glad if it helped.

Link to comment
Share on other sites

you can try to make a selection first and then start impainting, everything outside the selection will stay untouched.

 

or you could copy the selection onto a new layer using cmd + j and then impaint on that layer so the imapinting can only sample from that layer (though you can change the brush behavior to also use layers beneath - but you wouldn´t want this in that case)

 

 

Link to comment
Share on other sites

That is probably what I need to try - In removing an object, I would get most of it removed, and then trying to remove the final pieces, it would pull back some of the original that had been deleted - so it's still sampling from below what had been inpainted over.

I worked on another photo this morning and was more successful at removing some items, but still had it pulling up some from what had been removed.  The cloning first definitely helps in some complicated situations.  (And it would have been a lot easier in some of these situations to simply remove the items that didn't fit in the photo.)

Link to comment
Share on other sites

That is probably what I need to try - In removing an object, I would get most of it removed, and then trying to remove the final pieces, it would pull back some of the original that had been deleted - so it's still sampling from below what had been inpainted over.

I worked on another photo this morning and was more successful at removing some items, but still had it pulling up some from what had been removed.  The cloning first definitely helps in some complicated situations.  (And it would have been a lot easier in some of these situations to simply remove the items that didn't fit in the photo.)

There was an issue that I raised several months ago that if you crop an image (to remove something distracting) and then do InPainting next to where the cropped part was removed you still get the effect of the supposedly removed part of the image. The AP folks did not "fix" that problem (they said there were good reasons for keeping that supposedly removed material around) but gave me a workaround. They told me that after the crop I might want to explicitly rasterize (Layer -> Rasterize) the image forcing removal of the cropped away part of the image. 

 

That worked very well and it might also be a solution to your problem. After removing as much of your image as you can without having the stuff you want creep back into the image you might rasterize it and that might solve your problem. I have not tried that as I have not had your problem, but it might be worth a try ... And, of course, you can always back up to where the InPainting goes bad by using the history panel.

Link to comment
Share on other sites

Is it possible to make a selection of the area to be inpainted? Will this protect the area outside the selection from being included. I saw a tutorial for PS the other day when a selection was made to correct an out of alignment horizon caused by a panorama sync, then the clone tool was used to paint in the straightedge horizon. Just a thought.

Another issue with non destructive inpainting that I have had trouble with is when it is followed by an adjustment to increase exposure in the area of inpainting. This creates ghosting of the removed area. I find that I must inpaint on the image prior to any adjustments and therefore can't be non destructive. Any ideas?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.