19 typedef QMap<QString, bool> HashLookup;
21 typedef QQueue<QPoint> QueuedPoints;
25 PIXEL_FILL_STATE_UNPROCESSED,
26 PIXEL_FILL_STATE_IN_PROCESS,
27 PIXEL_FILL_STATE_PROCESSED
47 int thresholdCount)
const;
71 int fillPass (QImage &image,
72 QVector<PixelFillState> &states,
75 PixelFillState stateFrom,
76 PixelFillState stateTo,
78 QString hashForCoordinates (
int x,
80 int indexCollapse (
int row,
void fillHole(QImage &image, int row, int col, int thresholdCount) const
Fill white hole encompassing (row,col) if number of pixels in that hole is below the threshold...
Utility class for pixel manipulation.
void fillIsolatedWhitePixels(QImage &image)
Fill in white pixels surrounded by more black pixels than white pixels.
int countBlackPixelsAroundPoint(const QImage &image, int x, int y, int stopCountAt)
Fill triangle between these three points.
void fillHoles(QImage &image, int thresholdCount)
Fill in white holes, surrounded by black pixels, smaller than some threshold number of pixels...
static bool pixelIsBlack(const QImage &image, int x, int y)
Return true if pixel is black in black and white image.
Pixels()
Single constructor.