ndcd

package module
v0.0.0-...-6acc6c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 15 Imported by: 0

README

ndcd go

画像をドット画風に変換します

アルゴリズム

こちらの論文を参考にしています

install command

go install github.com/ieee0824/ndcd-go/ndcd

command

ndcd -i .github/before.jpg -o .github/after.jpg -oh 64 -bt box -bs 10 -c 1 -g 0.8 -s -oe 512
options
  -b float
        brightness
  -bs float
        blur size
  -bt string
        gaussian or box (default "gaussian")
  -c float
        contrast
  -cq int
        color quantization
  -g float
        gamma
  -i string
        input file name
  -o string
        output file name
  -oe int
        output expand size
  -oh int
        output image height (default 64)

sample

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ndcd

type Ndcd struct {
	// contains filtered or unexported fields
}

func New

func New(r io.Reader, optFunc ...func(opt *NdcdOption)) (*Ndcd, error)

func (*Ndcd) At

func (impl *Ndcd) At(x, y int) color.Color

func (*Ndcd) Bounds

func (impl *Ndcd) Bounds() image.Rectangle

func (*Ndcd) ColorModel

func (impl *Ndcd) ColorModel() color.Model

type NdcdOption

type NdcdOption struct {
	ImageHeight       int
	BlurSize          float64
	BlurType          string
	Contrast          float64
	Ganmma            float64
	Sharpen           bool
	ColorQuantization int
	Brightness        float64
}

Directories

Path Synopsis
$ ndcd input.jpg output.png -pix-size 64
$ ndcd input.jpg output.png -pix-size 64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL