Source

Image Vectorizer#

Image Vectorizer takes images and converts them into a flat vector of raw color channel data.

Note: Note that the GD extension is required to use this transformer.

Interfaces: Transformer

Data Type Compatibility: Resource (Images)

Parameters#

# Param Default Type Description
1 channels 3 int The channel depth i.e the number of rgba channels to encode starting with red.

Additional Methods#

This transformer does not have any additional methods.

Example#

use Rubix\ML\Transformers\ImageVectorizer;

$transformer = new ImageVectorizer(3);