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

How to exclude areas for the Inpaint Algorithm?


Recommended Posts

Hi,

sometimes the Inpainting Brush Tool or Fill Inpaint works quiet good for some scenarios,

but unfortunately in some cases absolutely not, especially if greater areas should be replaced with inpainting.

In this cases the algorithem takes parts of the image which makes no sence.

So my idea was to select a greater part of the image excluding the parts which shouldn't be used for the Inpainting alogrithem, in the hope for better results,

but the algorithem still takes parts of the non selected area, or simply said the same result as before without selection.

Any suggestions how to improve the Inpainting, respectively exclude areas for the algorithem?

Thx!

Link to comment
Share on other sites

I've often achieved good results by simply repeating the inpainting process multiple times, i.e. painting over the incorrectly filled areas again. If you want more control over the sampled parts of the image, use the Patch tool instead. From my experience, convincing results often require the combined use of multiple tools. For example, I'd often do inpainting as a first step and then use the clone brush tool to do the fine tuning.

Link to comment
Share on other sites

Inpainting algorithms typically look for a mix of structural & textural patterns in variable sized areas surrounding the selection to determine what to fill the selected area with & how to blend in the edges of the filled in area. Because of this, excluding a part of those surrounding areas usually would not work very well since it would likely cause the algorithm to miss patterns needed to produce a good fill & blend.

 

For much the same reason starting with a small selection often produce the best results because nearby areas are more likely to include patterns better suited for the fill. Repeating the process with a larger selection area enclosing the already inpainted one or more often just around its edges can sometimes improve the results. It all depends on the patterns the algorithm has to work with, which is why using a combination of inpainting & the other retouching tools often produces the best results.

 

It is somewhat like the process used by art restorers on physical artwork -- human judgement is a necessary part of it because algorithms can't (yet) "see" things like humans do. But unlike the restorers, working in the digital realm gives us the ability to undo results we don't like very easily. :)

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

On 28 October 2017 at 9:24 AM, IndigoMoon said:

So my idea was to select a greater part of the image excluding the parts which shouldn't be used for the Inpainting alogrithem, in the hope for better results,

but the algorithem still takes parts of the non selected area, or simply said the same result as before without selection.

Once you make your selection create a new layer from the selection ( CTRL + J ) then Inpainting on the new layer will not be able to take parts of the non selected area

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

12 minutes ago, carl123 said:

Once you make your selection create a new layer from the selection ( CTRL + J ) then Inpainting on the new layer will not be able to take parts of the non selected area

For that to work as intended, make sure "Current Layer" is chosen in the Context toolbar & not "Current Layer & Below."

 

However, as mentioned above inpainting alone may not get the desired results, & excluding part of the image may make things worse. Experimentation (& when needed, liberal use of undo) is the key to getting the best possible results.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

On 29.10.2017 at 10:46 AM, carl123 said:

Once you make your selection create a new layer from the selection ( CTRL + J ) then Inpainting on the new layer will not be able to take parts of the non selected area

How easy it could be ;) Thanks Carl! This is an acceptable workaround. In my case much faster, then apply the inpainting a few times and make corrections using the clone tool...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • 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.