Image Vectorizer#
Image Vectorizer takes images of the same size and converts them into flat feature vectors of raw color channel intensities. Intensities range from 0 to 255 and can either be read from 1 channel (grayscale) or 3 channels (RGB color) per pixel.
Note
Note that the GD extension is required to use this transformer.
Interfaces: Transformer, Stateful
Data Type Compatibility: Image
Parameters#
# | Name | Default | Type | Description |
---|---|---|---|---|
1 | grayscale | false | bool | Should we encode the image in grayscale instead of color? |
Example#
use Rubix\ML\Transformers\ImageVectorizer;
$transformer = new ImageVectorizer(true);
Additional Methods#
This transformer does not have any additional methods.