imgcmp

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package imgcmp is a package for common code related to image comparisons.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountBrighterPixels

func CountBrighterPixels(baseImage, countImage image.Image) (int, error)

CountBrighterPixels takes two same size image, return how many pixels in countImage brighter than baseImage.

func CountDiffPixels

func CountDiffPixels(imageA, imageB image.Image, threshold uint8) (int, error)

CountDiffPixels takes two images of the same size, and returns how many pixels are different.

func CountPixels

func CountPixels(image image.Image, clr color.Color) int

CountPixels returns how many pixels in the specified color are contained in image.

func CountPixelsWithDiff

func CountPixelsWithDiff(image image.Image, clr color.Color, colorMaxDiff uint8) int

CountPixelsWithDiff returns how many pixels in the specified color are contained in image with max diff.

func DumpImageToPNG

func DumpImageToPNG(ctx context.Context, image *image.Image, path string) error

DumpImageToPNG saves the image to path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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