Class that 'heals' the curves after one grid line has been removed. More...
#include <GridHealerAbstractBase.h>
Public Member Functions | |
GridHealerAbstractBase (GridLog &gridLog, const DocumentModelGridRemoval &modelGridRemoval) | |
Single constructor. | |
void | addMutualPair (int x0, int y0, int x1, int y1) |
Add two points on either side of a gap. Later, after removal, the black points will be processed. | |
void | healed (QImage &image) |
Return healed image after grid removal. | |
Static Public Member Functions | |
static int | pixelCountInRegionThreshold (const DocumentModelGridRemoval &modelGridRemoval) |
Threshold number of pixels in a region to be considered too-small or big-enough. | |
Protected Member Functions | |
virtual void | applyMutualPairs (const QImage &image)=0 |
Apply mutual pair points after all grid removal is done. | |
virtual void | doHealingAcrossGaps (QImage &image)=0 |
Guts of the algorithm in which sequences of black pixels across the gap from each other are filled in. More... | |
void | fillTrapezoid (QImage &image, int xBL, int yBL, int xBR, int yBR, int xTR, int yTR, int xTL, int yTL) |
Fill trapezoid with bottom left, bottom right, top right, and top left points. | |
GridLog & | gridLog () |
Logging get method. | |
double | maxPointSeparation () const |
Max point separation get method. | |
DocumentModelGridRemoval & | modelGridRemoval () |
DocumentModelGridRemoval get method. | |
const MutualPairHalves & | mutualPairHalvesAbove () const |
Mutual pair halves for below grid line. | |
const MutualPairHalves & | mutualPairHalvesBelow () const |
Mutual pair halves for above grid line. | |
bool | pointsAreGood (const QImage &image, int x0, int y0, int x1, int y1) const |
Apply blackPixelRegionIsBigEnough to regions around each of two points. | |
void | saveGapSeparation (double gapSeparation) |
Gap separation set method. | |
Class that 'heals' the curves after one grid line has been removed.
Specifically, gaps that span the pixels in the removed grid line are filled in, when a black pixel on one side of the gap is across from a black pixel on the other side of the pixel
A range is defined as a continous set of pixels on the same side of the gap
Definition at line 30 of file GridHealerAbstractBase.h.
|
protectedpure virtual |
Guts of the algorithm in which sequences of black pixels across the gap from each other are filled in.
Specifically, trapezoids with endpoints separated by no more than the closest distance are filled in. A greedy algorithm is used which makes each trapezoid as big as possible
Implemented in GridHealerHorizontal, and GridHealerVertical.