<p>As you may know from 3d packages <strong>depth information</strong> can be represented by a 2d <a href="https://en.wikipedia.org/wiki/Depth_map" rel="nofollow noreferrer">Depth Map</a>:</p>

<p><a href="https://i.sstatic.net/ApVl1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ApVl1.png" alt="enter image description here"></a></p>

<p>In therory it's possible to <strong>detect the defocused area</strong> of an image via <strong>depth estimation methods</strong> and <strong>generating a depth map</strong> using this information. The algorithm splits up the image by finding all relevant edges, analizes the gradient values and compare these areas with each other. <em>I doubt that this is accurate enough for every shot, but could work in some cases.</em> One of the latest papers, you can find here:  <a href="http://www.sjzhuo.net/defocusEstimation/" rel="nofollow noreferrer">http://www.sjzhuo.net/defocusEstimation/</a></p>

<p>AFAIK there is only one available plugin for After Effects at the moment: <a href="http://www.yuvsoft.com/stereo-3d-technologies/automatic-depth-estimation/" rel="nofollow noreferrer">http://www.yuvsoft.com/stereo-3d-technologies/automatic-depth-estimation/</a>, but since this process is becoming increasingly important for <strong>stereoscopic workflows</strong>, it's a matter of time when more tools will become available.</p>

CC BY-SA 3.0
2015-10-10T17:57:01.077Z
thanks a lot man! Really interesting topic. I will give the plugin a shot and let you know if it worked for me:) thanks @poor
Marten Zander
CC BY-SA 3.0
2015-10-11T06:07:10.853Z
@SlimMarten You're welcome! Ok, great - keep me posted!
p2or
CC BY-SA 3.0
2015-10-10T17:15:46.140Z
2015-10-10T17:15:46.140Z
p2or
<p>Is there any existing filter/effect, that will <strong>automatically</strong> mask out the unsharp area of my footage?</p>

<p>Let's say I have an object in focus and a lot of depth of field. How do I show only my sharp object?</p>

<after-effects><post-production><alpha>
Is it possible to mask out unsharp areas of footage with After Effects?
Marten Zander
# Is it possible to mask out unsharp areas of footage with After Effects?

(Asked by: username_0 on 2015-10-07)

Is there any existing filter/effect, that will **automatically** mask out the unsharp area of my footage?

Let's say I have an object in focus and a lot of depth of field. How do I show only my sharp object?

**Tags:** after-effects, post-production, alpha


---

## 1 answers

### Answer by username_1 on 2015-10-10. Score: 1 | Accepted answer

As you may know from 3d packages **depth information** can be represented by a 2d [Depth Map](https://en.wikipedia.org/wiki/Depth_map):

[![enter image description here](https://i.sstatic.net/ApVl1.png)](https://i.sstatic.net/ApVl1.png)

In therory it's possible to **detect the defocused area** of an image via **depth estimation methods** and **generating a depth map** using this information. The algorithm splits up the image by finding all relevant edges, analizes the gradient values and compare these areas with each other. *I doubt that this is accurate enough for every shot, but could work in some cases.* One of the latest papers, you can find here: <http://www.sjzhuo.net/defocusEstimation/>

AFAIK there is only one available plugin for After Effects at the moment: <http://www.yuvsoft.com/stereo-3d-technologies/automatic-depth-estimation/>, but since this process is becoming increasingly important for **stereoscopic workflows**, it's a matter of time when more tools will become available.

> **Comments:**
> **username_0**: thanks a lot man! Really interesting topic. I will give the plugin a shot and let you know if it worked for me:) thanks @poor  
> **username_1**: @SlimMarten You're welcome! Ok, great - keep me posted!  

---

