ImageQualityFilter

Models & Types · AiDotNet.Data.Quality

Filters images based on resolution, aspect ratio, and pixel statistics.

How It Works

Checks image metadata and pixel-level statistics to detect low-quality images: blank/solid-color images, extreme aspect ratios, tiny resolutions, and corrupt files. Works on raw pixel data represented as flattened arrays.

Constructors

Constructor Summary
ImageQualityFilter(ImageQualityFilterOptions options)

Methods

Method Summary
HashSet<int> FilterByDimensions(IReadOnlyList<int> widths, IReadOnlyList<int> heights) Filters images by dimension, returning indices of images that should be removed.
bool PassesDimensionCheck(int width, int height) Checks whether an image passes quality filters based on dimensions.
bool PassesFileSizeCheck(long fileSize) Checks whether a file size meets minimum requirements.
bool PassesPixelCheck(double[] pixels) Checks whether pixel values indicate a quality image (not blank, not solid).