Fawkes API Fawkes Development Version
|
Image difference checker. More...
#include <>>
Public Member Functions | |
ImageDiff (ScanlineModel *scanline_model) | |
Constructor. More... | |
ImageDiff () | |
Constructor. More... | |
~ImageDiff () | |
Destructor. More... | |
void | setBufferA (unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height) |
Set first buffer. More... | |
void | setBufferB (unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height) |
Set second buffer. More... | |
bool | different () |
Check if images are different. More... | |
unsigned int | numDifferingPixels () |
Number of differing pixels. More... | |
Image difference checker.
Definition at line 32 of file imagediff.h.
firevision::ImageDiff::ImageDiff | ( | ScanlineModel * | scanline_model | ) |
Constructor.
scanline_model | scanlinemodel to use, if null all pixels are compared. |
Definition at line 40 of file imagediff.cpp.
firevision::ImageDiff::ImageDiff | ( | ) |
Constructor.
Use this constructor to compare all pixels.
Definition at line 48 of file imagediff.cpp.
firevision::ImageDiff::~ImageDiff | ( | ) |
Destructor.
Definition at line 54 of file imagediff.cpp.
bool firevision::ImageDiff::different | ( | ) |
Check if images are different.
This method will compare the two images. If any pixel marked by the scanline or any pixel at all if no scanline model is given differ the images are considered to be different. The same applies if any buffer is unset or the widths or heights are not the same.
Definition at line 92 of file imagediff.cpp.
References fawkes::upoint_t::x.
Referenced by firevision::FilterGeodesicDilation::apply(), and firevision::FilterGeodesicErosion::apply().
unsigned int firevision::ImageDiff::numDifferingPixels | ( | ) |
Number of differing pixels.
Executes the same routine as different(). But instead of just saying that the images are different will tell how many pixels differ.
Definition at line 145 of file imagediff.cpp.
References fawkes::upoint_t::x.
void firevision::ImageDiff::setBufferA | ( | unsigned char * | yuv422planar_buffer, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Set first buffer.
yuv422planar_buffer | buffer |
width | image width in pixels |
height | image height in pixels |
Definition at line 64 of file imagediff.cpp.
Referenced by firevision::FilterGeodesicDilation::apply(), and firevision::FilterGeodesicErosion::apply().
void firevision::ImageDiff::setBufferB | ( | unsigned char * | yuv422planar_buffer, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Set second buffer.
yuv422planar_buffer | buffer |
width | image width in pixels |
height | image height in pixels |
Definition at line 77 of file imagediff.cpp.
Referenced by firevision::FilterGeodesicDilation::apply(), and firevision::FilterGeodesicErosion::apply().