Fawkes API  Fawkes Development Version
firevision::ImageDiff Class Reference

#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...
 

Detailed Description

Image difference checker.

Author
Tim Niemueller

Definition at line 37 of file imagediff.h.

Constructor & Destructor Documentation

◆ ImageDiff() [1/2]

firevision::ImageDiff::ImageDiff ( ScanlineModel scanline_model)

Constructor.

Parameters
scanline_modelscanlinemodel to use, if null all pixels are compared.

Definition at line 44 of file imagediff.cpp.

◆ ImageDiff() [2/2]

firevision::ImageDiff::ImageDiff ( )

Constructor.

Use this constructor to compare all pixels.

Definition at line 52 of file imagediff.cpp.

◆ ~ImageDiff()

firevision::ImageDiff::~ImageDiff ( )

Destructor.

Definition at line 58 of file imagediff.cpp.

Member Function Documentation

◆ different()

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.

Returns
true if images are different, false otherwise

Definition at line 96 of file imagediff.cpp.

References fawkes::upoint_t::x.

◆ numDifferingPixels()

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.

Returns
number of different pixels

Definition at line 149 of file imagediff.cpp.

◆ setBufferA()

void firevision::ImageDiff::setBufferA ( unsigned char *  yuv422planar_buffer,
unsigned int  width,
unsigned int  height 
)

Set first buffer.

Parameters
yuv422planar_bufferbuffer
widthimage width in pixels
heightimage height in pixels

Definition at line 68 of file imagediff.cpp.

◆ setBufferB()

void firevision::ImageDiff::setBufferB ( unsigned char *  yuv422planar_buffer,
unsigned int  width,
unsigned int  height 
)

Set second buffer.

Parameters
yuv422planar_bufferbuffer
widthimage width in pixels
heightimage height in pixels

Definition at line 81 of file imagediff.cpp.


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