Engauge Digitizer 2
|
Utility class for pixel manipulation. More...
#include <Pixels.h>
Public Member Functions | |
Pixels () | |
Single constructor. | |
int | countBlackPixelsAroundPoint (const QImage &image, int x, int y, int stopCountAt) |
Fill triangle between these three points. | |
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. | |
void | fillHoles (QImage &image, int thresholdCount) |
Fill in white holes, surrounded by black pixels, smaller than some threshold number of pixels. | |
void | fillIsolatedWhitePixels (QImage &image) |
Fill in white pixels surrounded by more black pixels than white pixels. | |
Static Public Member Functions | |
static bool | pixelIsBlack (const QImage &image, int x, int y) |
Return true if pixel is black in black and white image. | |
Pixels::Pixels | ( | ) |
Fill triangle between these three points.
Definition at line 16 of file Pixels.cpp.
Fill white hole encompassing (row,col) if number of pixels in that hole is below the threshold.
Definition at line 70 of file Pixels.cpp.
Fill in white holes, surrounded by black pixels, smaller than some threshold number of pixels.
Originally this was recursive but the high recursion levels (for big regions) overflowed the stack
Definition at line 108 of file Pixels.cpp.
Fill in white pixels surrounded by more black pixels than white pixels.
This is much faster than fillHoles and effectively as good
Definition at line 155 of file Pixels.cpp.