nude

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2014 License: MIT Imports: 11 Imported by: 3

README

go-nude

Nudity detection with Go.

(Go porting from https://github.com/pa7/nude.js)

Example

package main

import (
	"fmt"
	"log"
    "github.com/koyachi/go-nude"
)

func main() {
	imagePath := "images/test2.jpg"

	isNude, err := nude.IsNude(imagePath)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("isNude = %v\n", isNude)
}

Other implementations

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

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 IsNude

func IsNude(imageFilePath string) (result bool, err error)

Types

type Detector

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

func NewDetector

func NewDetector(path string) *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
	// contains filtered or unexported fields
}

type Pixels

type Pixels []*Pixel

type Regions

type Regions []Pixels

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