ImageOpPipeline

class ImageOpPipeline(mat: Mat)

An image operation pipeline runs various operations onto an image such as scaling, thresholding, inverting, padding etc. The pipeline can be built with a builder style API Operations are applied in the order they are called in the builder API

Constructors

Link copied to clipboard
fun ImageOpPipeline(mat: Mat)

Functions

Link copied to clipboard

Inverts the colors of an image

Link copied to clipboard
fun pad(top: Int, bottom: Int, left: Int, right: Int, color: Color = Color.BLACK): ImageOpPipeline

Pads an image, basically adding a border of n amount of pixels to each side with the given color

Link copied to clipboard

Scale an image by a factor of factor

Link copied to clipboard
fun threshold(threshold: Double = 0.4): ImageOpPipeline

Thresholding an image will convert the image to a black and white image

Link copied to clipboard

Run the pipeline and return the final image as a BufferedImage

Link copied to clipboard
fun toMat(): Mat

Run the pipeline and return the final image as a Mat