Fawkes API
Fawkes Development Version
|
#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 37 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 44 of file imagediff.cpp.
firevision::ImageDiff::ImageDiff | ( | ) |
Constructor.
Use this constructor to compare all pixels.
Definition at line 52 of file imagediff.cpp.
firevision::ImageDiff::~ImageDiff | ( | ) |
Destructor.
Definition at line 58 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 96 of file imagediff.cpp.
References fawkes::upoint_t::x.
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 149 of file imagediff.cpp.
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 68 of file imagediff.cpp.
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 81 of file imagediff.cpp.