GrayscaleFilter

data class GrayscaleFilter(var borderWidthFraction: Double = 0.06, var blackOutliersFraction: Double = 0.0, var whiteOutliersFraction: Double = 0.02) : ParametricFilter, Parcelable

Converts color images to grayscale and applies autocontrast.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(borderWidthFraction: Double = 0.06, blackOutliersFraction: Double = 0.0, whiteOutliersFraction: Double = 0.02)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val _type: String
Link copied to clipboard

Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

Link copied to clipboard

Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15.

Link copied to clipboard

Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

Functions

Link copied to clipboard
open override fun clone(): GrayscaleFilter
Link copied to clipboard
open override fun toJson(config: ToJsonConfiguration): JSONObject