ImageDiff Class Reference
Image difference checker. More...
#include <fvutils/statistical/imagediff.h>
Public Member Functions | |
| ImageDiff (ScanlineModel *scanline_model) | |
| Constructor. | |
| ImageDiff () | |
| Constructor. | |
| ~ImageDiff () | |
| Destructor. | |
| void | setBufferA (unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height) |
| Set first buffer. | |
| void | setBufferB (unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height) |
| Set second buffer. | |
| bool | different () |
| Check if images are different. | |
| unsigned int | numDifferingPixels () |
| Number of differing pixels. | |
Detailed Description
Image difference checker.
Definition at line 30 of file imagediff.h.
Constructor & Destructor Documentation
| ImageDiff::ImageDiff | ( | ScanlineModel * | scanline_model | ) |
Constructor.
- Parameters:
-
scanline_model scanlinemodel to use, if null all pixels are compared.
Definition at line 38 of file imagediff.cpp.
| ImageDiff::ImageDiff | ( | ) |
Constructor.
Use this constructor to compare all pixels.
Definition at line 47 of file imagediff.cpp.
| ImageDiff::~ImageDiff | ( | ) |
Member Function Documentation
| bool 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 97 of file imagediff.cpp.
References ScanlineModel::finished(), and ScanlineModel::reset().
Referenced by FilterGeodesicErosion::apply(), and FilterGeodesicDilation::apply().
| unsigned int 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 147 of file imagediff.cpp.
References ScanlineModel::finished(), and ScanlineModel::reset().
| void ImageDiff::setBufferA | ( | unsigned char * | yuv422planar_buffer, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) |
Set first buffer.
- Parameters:
-
yuv422planar_buffer buffer width image width in pixels height image height in pixels
Definition at line 65 of file imagediff.cpp.
Referenced by FilterGeodesicErosion::apply(), and FilterGeodesicDilation::apply().
| void ImageDiff::setBufferB | ( | unsigned char * | yuv422planar_buffer, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) |
Set second buffer.
- Parameters:
-
yuv422planar_buffer buffer width image width in pixels height image height in pixels
Definition at line 80 of file imagediff.cpp.
Referenced by FilterGeodesicErosion::apply(), and FilterGeodesicDilation::apply().
The documentation for this class was generated from the following files:
- src/firevision/fvutils/statistical/imagediff.h
- src/firevision/fvutils/statistical/imagediff.cpp

