pub unsafe trait CIKMeans: CIAreaReductionFilter {
// Provided methods
unsafe fn inputMeans(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message { ... }
unsafe fn setInputMeans(&self, input_means: Option<&CIImage>)
where Self: Sized + Message { ... }
unsafe fn count(&self) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn setCount(&self, count: NSInteger)
where Self: Sized + Message { ... }
unsafe fn passes(&self) -> c_float
where Self: Sized + Message { ... }
unsafe fn setPasses(&self, passes: c_float)
where Self: Sized + Message { ... }
unsafe fn perceptual(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn setPerceptual(&self, perceptual: bool)
where Self: Sized + Message { ... }
}Available on crate features
CIFilter and CIFilterBuiltins only.Expand description
The protocol for the KMeans filter.
Create a palette of the most common colors found in the image.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn inputMeans(&self) -> Option<Retained<CIImage>>
Available on crate feature CIImage only.
unsafe fn inputMeans(&self) -> Option<Retained<CIImage>>
CIImage only.Specifies the color seeds to use for k-means clustering, either passed as an image or an array of colors.
Sourceunsafe fn setInputMeans(&self, input_means: Option<&CIImage>)
Available on crate feature CIImage only.
unsafe fn setInputMeans(&self, input_means: Option<&CIImage>)
CIImage only.Setter for inputMeans.
Sourceunsafe fn perceptual(&self) -> bool
unsafe fn perceptual(&self) -> bool
Specifies whether the k-means color palette should be computed in a perceptual color space.
Sourceunsafe fn setPerceptual(&self, perceptual: bool)
unsafe fn setPerceptual(&self, perceptual: bool)
Setter for perceptual.