Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Static Public Member Functions | List of all members
Pixels Class Reference

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. More...
 
void fillIsolatedWhitePixels (QImage &image)
 Fill in white pixels surrounded by more black pixels than white pixels. More...
 

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.
 

Detailed Description

Utility class for pixel manipulation.

Definition at line 31 of file Pixels.h.

Member Function Documentation

void Pixels::fillHoles ( QImage &  image,
int  thresholdCount 
)

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.

void Pixels::fillIsolatedWhitePixels ( QImage &  image)

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.


The documentation for this class was generated from the following files: