nude

package module
v0.0.0-...-233ac83 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 9 Imported by: 0

README

go-nude, the nudity detector used in thuja

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeImage

func DecodeImage(filePath string) (img image.Image, err error)

experimental

func IsFileNude

func IsFileNude(imageFilePath string) (bool, error)

func IsImageNude

func IsImageNude(img image.Image) (bool, error)

func IsNude

func IsNude(img image.Image) (bool, error)

Types

type Detector

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

func NewDetector

func NewDetector(img image.Image) *Detector

func (*Detector) Parse

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

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
}

type Region

type Region []*Pixel

TODO: cache caluculated leftMost, rightMost, upperMost, lowerMost.

type Regions

type Regions []Region

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)

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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