Skip to content

impzero/go-filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

go-filters ๐Ÿ–ผ๏ธ

This is a simple go project that applies different filters like grayscale or B&W to an image.

Usage

There are several filters you can apply to an image. Here is a start.

The grayscale filter using the weighted coefficients

$ go run main.go ./examples/winxp.png grayscale-coeff

The grayscale filter using the average value of the three channels ((R)ed, (G)reen and (B)lue)

$ go run main.go ./examples/winxp.png grayscale-avg

The black&white filter

$ go run main.go ./examples/winxp.png bw

Filters

  • Grayscales

    • averaging the RGB components
    • weighted sum of the RGB components Y = 0.299 * R + 0.587 * G + 0.114 * B
  • Black & White

Examples

Original image

Grayscale using the weighted sum method

Grayscale using the averaging method

Black & White filter

Resources

About

๐Ÿ“š Image filters library written in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages