Gabor Filter - Fine Hair Extraction v2.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Theo Grez
Keying fine hair has never been easier ! This gizmo uses convolution through a 'Gabor filter', used in imaging for isolating elongated features.
Requirements:
14.0, 13.2, 13.1, 13.0 or later
Linux, Mac, Windows
02 Feb 2024
1187

Fine hair keying using Gabor filtering

 

Node results

 

This gizmo uses the magic of Gabor filtering to provide a way for detecting elongated features (like fine hair strands).

 

The node outputs the filtered image in the 3 rgb channels. A strong contrast on the source image will give stronger, better results. If you're using it on green screen for hair extraction, you generally will use the green channel only as it is the one with the strongest contrast between the strands and the background. 

Try to play with the settings ! The best result I personally obtained were always by playing with the sliders, trying different combinations.

Then, you can use a merge node with operation 'plus' (or 'screen') to add the hair details to your existing alpha (IBK or anything else)

Using a denoiser before the process is strongly recommended !

 

Node usage

 

I've added a small help text for every control knob. Don't hesitate to hover the cursor on those if you want information on what they do.

Please note : the node can be a bit complex to use, and results heavily differ between different inputs. As a result, I prefer mentionning that this gizmo is still a work in progress, that I will continue developping in the future with the hope of understanding the process better and enhancing the results and the ease of use !

 

This gizmo comes from an idea presented in Chloe Legendre's SIGGRAPH paper from 2017 'Improved Chromakey of Hair Strands via Orientation Filter Convolution

 

Enjoy !

 

----

v2.1 update : 

I realized that the 2.0 gizmo was limited in cetain cases

  • Re-added the 'hair lighter than BG' check box
  • Added some more controls

 

v2.0 update : 

  • Overall upgrade for better results
  • Changed user interface for more clarity, with less confusing sliders

 

Please login in order to download these files.

Comments   

 
+3 # Karma FX 2022-05-16 16:48
Great job!
I think that the BG Offset is not linked to the CCs. Not sure if it's supposed to control that knob inside.
 
 
+2 # Theo Grez 2022-05-17 01:03
Thank you ! That was indeed a problem and got fixed in v1.5 just now !
 
 
+1 # Lucas Pfaff 2023-01-18 15:05
Hey man, I really appreciate this tool. Helped me a lot with shots that were not green- or bluescreen and still needed some serious roto. Thanks for sharing! :)
 
 
0 # Theo Grez 2023-02-10 11:23
Nice ! I'm glad I could help ! :D
 

You have no rights to post comments

We have 4729 guests and 135 members online