AbstractCropAlgorithm |
Ancestor to cropping algorithms.
|
BinaryCrop |
Turns image into binary (ie black and white) image and determines the largest rectangle encompassing a (white) object in the middle to crop to.
When looking for a black object, check the 'invert' option.
|
CropBackground |
Picks the background at the specified anchor position and crops to the smallest possible rectangle.
|
NoCrop |
Dummy crop algorithm, performs no cropping at all.
|
RectangleCrop |
Turns the image into one with only two indexed colors and then determines from all four sides the locations where the color changes from the one on the edge.
|
RelativeCrop |
Crops the image to specified width and height.
|
SimpleCrop |
Simple cropping algorithm that uses a fixed window.
|
ThresholdedCrop |
Simple cropping algorithm that assumes a good contrast between background and foreground.
Algorithm:
- create histogram of grayscale image
- remove counts from histogram that fall below noise-level
- determine left-most (L) and right-most (R) non-zero count
- divide region between L and R into two and determine highest peak in each (LP and RP)
- 8-bit threshold is halfway between LP and RP
- determine first pixel that is above threshold from top, bottom, left and right, which is used for the crop
|