gonude

package
v0.0.1-0...-a0864a0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CensorSkinPixels

func CensorSkinPixels(src image.Image, regions Regions, color color.RGBA) image.Image

CensorSkinPixels Add Pixels to all detected skin regions

Types

type Detector

type Detector struct {
	SkinRegions Regions
	// contains filtered or unexported fields
}

Detector Detect Image Nudity

func NewDetector

func NewDetector(img image.Image) *Detector

NewDetector Returns new Detector

func (*Detector) Parse

func (d *Detector) Parse() (result bool, err error)

Parse Parse Image to calculate if it contains nudity

func (*Detector) String

func (d *Detector) String() string

type Pixel

type Pixel struct {
	X int
	Y int

	V float64 // intesitiy(Value) of HSV
	// contains filtered or unexported fields
}

Pixel Represents a pixel

type Region

type Region []*Pixel

Region A Region of pixels TODO: cache calculated leftMost, rightMost, upperMost, lowerMost.

type Regions

type Regions []Region

Regions Array of Regions

func (Regions) Len

func (r Regions) Len() int

func (Regions) Less

func (r Regions) Less(i, j int) bool

func (Regions) Swap

func (r Regions) Swap(i, j int)

Jump to

Keyboard shortcuts

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