A soothing face filter where you can appreciate the beauty but not fully identify the person.

  • By null
  • Last update: Oct 26, 2022
  • Comments: 1

  the project to show your appreciation. ↗️


A soothing face filter where you can appreciate the beauty but not fully identify the person. Useful for social applications, blogging etc.


  1. Resizing (Caire, NearestNeighbor, ApproxBiLinear, BiLinear, CatmullRom)
  2. Automatic Face detection
  3. Frosted Showerglass filter (delaunay triangulation) over only face

female face

Image credit: https://unsplash.com/photos/tCJ44OIqceU


go get -u github.com/rocketlaunchr/showerglass/core
import "github.com/rocketlaunchr/showerglass/core"


import	"image/jpeg"
import	"os"
import	"github.com/rocketlaunchr/showerglass/core"

f, _ := os.Open("face.jpg")
defer f.Close()

opts := showerglass.Options{
	NewHeight: 100.0,
	NewWidth:  100.0,
	ResizeAlg: showerglass.CatmullRom,
	TriangleConfig: func(QRank, facearea int, Q float32, h, w int) *showerglass.Processor {
		if QRank < 1 {
			// only modify first detected face
			return &showerglass.Processor{
				MaxPoints:  1500,
				BlurRadius: 4,
		return nil

masked, _, _ := showerglass.FaceMask(f, opts)

out, _ := os.Create("masked.jpg")

jpeg.Encode(out, masked, &jpeg.Options{Quality: 100})


  • A higher MaxPoints means the face looks closer to the original.
  • A lower MaxPoints (with the exception of 0) means a more obfuscated face.

Based on the facearea relative to h×w, you need to calibrate MaxPoints to achieve the desired feel.


  • Endre Simo - One of the masters of Image Processing [worth following]

Other useful packages

  • awesome-svelte - Resources for killing react
  • dataframe-go - Statistics and data manipulation
  • dbq - Zero boilerplate database operations for Go
  • electron-alert - SweetAlert2 for Electron Applications
  • google-search - Scrape google search results
  • igo - A Go transpiler with cool new syntax such as fordefer (defer for for-loops)
  • mysql-go - Properly cancel slow MySQL queries
  • react - Build front end applications using Go
  • remember-go - Cache slow database queries
  • testing-go - Testing framework for unit testing

Legal Information

The license is a modified MIT license. Refer to LICENSE file for more details.

© 2022 PJ Engineering and Business Solutions Pty. Ltd.




  • 1

    upgraded to triangle/v2

    With triangle/v2 you need to include some additional parameters into the Processor struct and it should work. The Processor struct initialization should look something like this:

    return &showerglass.Processor{
    	MaxPoints:  1500,
    	BlurRadius: 4,
    	BlurFactor: 1,
    	EdgeFactor: 6,
    	PointRate:  0.075,

    I have deleted also the go.mod from the core folder, it's not really needed.