All Projects → anthonynsimon → Bild

anthonynsimon / Bild

Licence: mit
Image processing algorithms in pure Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Bild

Gasyori100knock
image processing codes to understand algorithm
Stars: ✭ 1,988 (-42.06%)
Mutual labels:  algorithm, image-processing
detox
distributed tox (tox plugin to run testenvs in parallel)
Stars: ✭ 48 (-98.6%)
Mutual labels:  concurrency, parallelism
YACLib
Yet Another Concurrency Library
Stars: ✭ 193 (-94.37%)
Mutual labels:  concurrency, parallelism
Connected Components 3d
Connected components on multilabel 3D & 2D images. Handles 26, 18, and 6 connected variants.
Stars: ✭ 90 (-97.38%)
Mutual labels:  algorithm, image-processing
vercors
The VerCors verification toolset for verifying parallel and concurrent software
Stars: ✭ 30 (-99.13%)
Mutual labels:  concurrency, parallelism
Bitmap
C++ Bitmap Library
Stars: ✭ 125 (-96.36%)
Mutual labels:  algorithm, image-processing
Litrato
Android photo editing app with various filters and tools. Included advanced features like masking, histogram, color picker, EXIF viewer...
Stars: ✭ 54 (-98.43%)
Mutual labels:  histogram, image-editing
Pht
A new threading extension for PHP
Stars: ✭ 175 (-94.9%)
Mutual labels:  concurrency, parallelism
piker
#nontina, #paperhands,, #pwnzebotz, #tradezbyguille
Stars: ✭ 63 (-98.16%)
Mutual labels:  signal-processing, concurrency
Async-Channel
Python async multi-task communication library. Used by OctoBot project.
Stars: ✭ 13 (-99.62%)
Mutual labels:  concurrency, parallelism
Thmap
Concurrent trie-hash map library
Stars: ✭ 51 (-98.51%)
Mutual labels:  algorithm, concurrency
Zio
ZIO — A type-safe, composable library for async and concurrent programming in Scala
Stars: ✭ 3,167 (-7.69%)
Mutual labels:  concurrency, effects
Sidecar
Some old C++ code I developed while at MIT. Could be useful if you have an old radar lying around.
Stars: ✭ 20 (-99.42%)
Mutual labels:  algorithm, signal-processing
Scene Text Recognition
Scene text detection and recognition based on Extremal Region(ER)
Stars: ✭ 146 (-95.74%)
Mutual labels:  algorithm, image-processing
Util
A collection of useful utility functions
Stars: ✭ 201 (-94.14%)
Mutual labels:  concurrency, parallelism
java-multithread
Códigos feitos para o curso de Multithreading com Java, no canal RinaldoDev do YouTube.
Stars: ✭ 24 (-99.3%)
Mutual labels:  concurrency, parallelism
Plasma
Plasma Programming Language
Stars: ✭ 133 (-96.12%)
Mutual labels:  concurrency, parallelism
Chymyst Core
Declarative concurrency in Scala - The implementation of the chemical machine
Stars: ✭ 142 (-95.86%)
Mutual labels:  concurrency, parallelism
golang-101
🍺 In-depth internals, my personal notes, example codes and projects. Includes - Thousands of codes, OOP, Concurrency, Parallelism, Goroutines, Mutexes & Wait Groups, Testing in Go, Go tool chain, Backend web development, Some projects including Log file parser using bufio.Scanner, Spam Masker, Retro led clock, Console animations, Dictionary pro…
Stars: ✭ 61 (-98.22%)
Mutual labels:  concurrency, parallelism
HistoGAN
Reference code for the paper HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms (CVPR 2021).
Stars: ✭ 158 (-95.39%)
Mutual labels:  histogram, image-editing

bild

bild logo

MIT License GoDoc Go Report Card

A collection of parallel image processing algorithms in pure Go.

The aim of this project is simplicity in use and development over absolute high performance, but most algorithms are designed to be efficient and make use of parallelism when available.

It uses packages from the standard library whenever possible to reduce dependency use and development abstractions.

All operations return image types from the standard library.

Documentation

The documentation for the various packages is available here.

CLI usage

Download and compile from sources:

go get github.com/anthonynsimon/bild

Or get the pre-compiled binaries for your platform on the releases page

bild

A collection of parallel image processing algorithms in pure Go

Usage:
  bild [command]

Available Commands:
  adjust      adjust basic image features like brightness or contrast
  blend       blend two images together
  blur        blur an image using the specified method
  channel     channel operations on images
  effect      apply effects on images
  help        Help about any command
  histogram   histogram operations on images
  imgio       i/o operations on images
  noise       noise generators
  segment     segment an image using the specified method

Flags:
  -h, --help      help for bild
      --version   version for bild

Use "bild [command] --help" for more information about a command.

For example, to apply a median effect with a radius of 1.5 on the image input.png, writing the result into a new file called output.png:

bild effect median --radius 1.5 input.png output.png

Install package

bild requires Go version 1.11 or greater.

go get github.com/anthonynsimon/bild/...

Basic package usage example:

package main

import (
    "github.com/anthonynsimon/bild/effect"
    "github.com/anthonynsimon/bild/imgio"
    "github.com/anthonynsimon/bild/transform"
)

func main() {
    img, err := imgio.Open("input.jpg")
    if err != nil {
        fmt.Println(err)
        return
    }

    inverted := effect.Invert(img)
    resized := transform.Resize(inverted, 800, 800, transform.Linear)
    rotated := transform.Rotate(resized, 45, nil)

    if err := imgio.Save("output.png", rotated, imgio.PNGEncoder()); err != nil {
        fmt.Println(err)
        return
    }
}

Output examples

Adjustment

import "github.com/anthonynsimon/bild/adjust"

Brightness

result := adjust.Brightness(img, 0.25)

example

Contrast

result := adjust.Contrast(img, -0.5)

example

Gamma

result := adjust.Gamma(img, 2.2)

example

Hue

result := adjust.Hue(img, -42)

example

Saturation

result := adjust.Saturation(img, 0.5)

example

Blend modes

import "github.com/anthonynsimon/bild/blend"

result := blend.Multiply(bg, fg)
Add Color Burn Color Dodge
Darken Difference Divide
Exclusion Lighten Linear Burn
Linear Light Multiply Normal
Opacity Overlay Screen
Soft Light Subtract

Blur

import "github.com/anthonynsimon/bild/blur"

Box Blur

result := blur.Box(img, 3.0)

example

Gaussian Blur

result := blur.Gaussian(img, 3.0)

example

Channel

import "github.com/anthonynsimon/bild/channel"

Extract Channels

result := channel.Extract(img, channel.Alpha)

example

Extract Multiple Channels

result := channel.ExtractMultiple(img, channel.Red, channel.Alpha)

Effect

import "github.com/anthonynsimon/bild/effect"

Dilate

result := effect.Dilate(img, 3)

example

Edge Detection

result := effect.EdgeDetection(img, 1.0)

example

Emboss

result := effect.Emboss(img)

example

Erode

result := effect.Erode(img, 3)

example

Grayscale

result := effect.Grayscale(img)

example

Invert

result := effect.Invert(img)

example

Median

result := effect.Median(img, 10.0)

example

Sepia

result := effect.Sepia(img)

example

Sharpen

result := effect.Sharpen(img)

example

Sobel

result := effect.Sobel(img)

example

Unsharp Mask

result := effect.UnsharpMask(img, 0.6, 1.2)

example

Histogram

import "github.com/anthonynsimon/bild/histogram"

RGBA Histogram

hist := histogram.NewRGBAHistogram(img)
result := hist.Image()

example

Noise

import "github.com/anthonynsimon/bild/noise"

Uniform colored

result := noise.Generate(280, 280, &noise.Options{Monochrome: false, NoiseFn: noise.Uniform})

example

Binary monochrome

result := noise.Generate(280, 280, &noise.Options{Monochrome: true, NoiseFn: noise.Binary})

example

Gaussian monochrome

result := noise.Generate(280, 280, &noise.Options{Monochrome: true, NoiseFn: noise.Gaussian})

example

Perlin Noise

result := noise.GeneratePerlin(280, 280, 0.25)

example

Paint

import "github.com/anthonynsimon/bild/paint"

Flood Fill

// Fuzz is the percentage of maximum color distance that is tolerated
result := paint.FloodFill(img, image.Point{240, 0}, color.RGBA{255, 0, 0, 255}, 15)

example

Segmentation

import "github.com/anthonynsimon/bild/segment"

Threshold

result := segment.Threshold(img, 128)

example

Transform

import "github.com/anthonynsimon/bild/transform"

Crop

// Source image is 280x280
result := transform.Crop(img, image.Rect(70,70,210,210))

example

FlipH

result := transform.FlipH(img)

example

FlipV

result := transform.FlipV(img)

example

Resize Resampling Filters

result := transform.Resize(img, 280, 280, transform.Linear)
Nearest Neighbor Linear Gaussian
Mitchell Netravali Catmull Rom Lanczos

Rotate

// Options set to nil will use defaults (ResizeBounds set to false, Pivot at center)
result := transform.Rotate(img, -45.0, nil)

example

// If ResizeBounds is set to true, the full rotation bounding area is used
result := transform.Rotate(img, -45.0, &transform.RotationOptions{ResizeBounds: true})

example

// Pivot coordinates are set from the top-left corner
// Notice ResizeBounds being set to default (false)
result := transform.Rotate(img, -45.0, &transform.RotationOptions{Pivot: &image.Point{0, 0}})

example

Shear Horizontal

result := transform.ShearH(img, 30)

example

Shear Vertical

result := transform.ShearV(img, 30)

example

Translate

result := transform.Translate(img, 80, 0)

example

Contribute

Want to hack on the project? Any kind of contribution is welcome!
Simply follow the next steps:

  • Fork the project.
  • Create a new branch.
  • Make your changes and write tests when practical.
  • Commit your changes to the new branch.
  • Send a pull request, it will be reviewed shortly.

In case you want to add a feature, please create a new issue and briefly explain what the feature would consist of. For bugs or requests, before creating an issue please check if one has already been created for it.

Changelog

Please see the changelog for more details.

License

This project is licensed under the MIT license. Please read the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].