Jump to content

Recommended Posts

Posted

This thread gave me an idea to create an estimated Depth mask:

I have created a macro to recover some depth information from the Remove Haze filter itself.

Create_depth_mask.afmacro

 

The way you use this is to select your pixel layer, run the macro, and then drag the resulting layer group into a mask position of some adjustment.

The red tint is intentional to help previewing the mask. When the layer group is used as a mask of some other layer, the tint will be ignored, and only the alpha channel will be used.

See example usage with a black fill layer being masked by the depth mask.

 

depth_mask_usage.gif

Create_depth_mask.afmacro

Posted

Hi.

Nice and very informative (with help of little reverse engineering :) ). However, when this macro is executed for image with little to no haze, the resultant mask seems to not show the depth... Result may indicate that the macro (and dehaze filter itself) estimates amount of haze rather than the scene depth. 

Posted
6 minutes ago, BornInPastCentury said:

Hi.

Nice and very informative (with help of little reverse engineering :) ). However, when this macro is executed for image with little to no haze, the resultant mask seems to not show the depth... Result may indicate that the macro (and dehaze filter itself) estimates amount of haze rather than the scene depth. 

Maybe you are looking for defocus estimation? Or some artificial intelligence that understands the objects? :)

I don't think either is possible in Affinty.

 

Posted
23 hours ago, shojtsy said:

Maybe you are looking for defocus estimation? Or some artificial intelligence that understands the objects? :)

I don't think either is possible in Affinty.

 

There are numerous publications on the depth estimation subject. Many uses convolutional neural networks, which is machine learning class algorithm rather than AI. Whatever "engine" uses our Affinity, I think that utilization of KNN is not impossible.

Posted

Both single-image defocus estimation and neural networks are possible solutions for this. I am just saying that Affinity doesn't provide the tools for us to do either, and I think also doesn't implement either of them itself. Remove Haze filter probably uses some simple heuristic of detecting grayish gradients and make them contrasty.

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.