Documentation ¶
Index ¶
- func EuclideanDistance(firstVector, secondVector []float64) (float64, error)
- func ImgRework(clusteredData []ClusteredPixel, centroids []Pixel, rows int, cols int) (gocv.Mat, error)
- func Kmeans(data []ClusteredPixel, centroid []Pixel, distanceFunction DistanceFunction, ...) ([]ClusteredPixel, []Pixel, error)
- func ManhattanDistance(firstVector, secondVector []float64) (float64, error)
- type ClusteredPixel
- type DistanceFunction
- type Pixel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EuclideanDistance ¶
func ImgRework ¶
func ImgRework(clusteredData []ClusteredPixel, centroids []Pixel, rows int, cols int) (gocv.Mat, error)
Reconstroi a imagem a partir da clusterização do kmeans
func Kmeans ¶
func Kmeans(data []ClusteredPixel, centroid []Pixel, distanceFunction DistanceFunction, threshold int) ([]ClusteredPixel, []Pixel, error)
Implementa o algoritimo de clusterização K-means
func ManhattanDistance ¶
Types ¶
type ClusteredPixel ¶
ClusteredPixel: Abstração de pixel com número de cluster
func FormatData ¶
func FormatData(img gocv.Mat) []ClusteredPixel
Formata a imagem para ser processada pelo kmeans
type DistanceFunction ¶
Distance Function: Calcula a distância entre pixeis
Click to show internal directories.
Click to hide internal directories.