Fawkes API Fawkes Development Version
imagediff.h
1
2/***************************************************************************
3 * imagediff.h - check if two images differ, allow probabilistic scanning
4 * by using scanlines.
5 *
6 * Generated: Tue Jun 06 10:08:36 2006
7 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
8 *
9 ****************************************************************************/
10
11/* This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. A runtime exception applies to
15 * this software (see LICENSE.GPL_WRE file mentioned below for details).
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Library General Public License for more details.
21 *
22 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23 */
24
25#ifndef _FIREVISION_FVUTILS_STATISTICAL_IMAGEDIFF_H_
26#define _FIREVISION_FVUTILS_STATISTICAL_IMAGEDIFF_H_
27
28#include <fvmodels/scanlines/scanlinemodel.h>
29
30namespace firevision {
31
33{
34public:
35 ImageDiff(ScanlineModel *scanline_model);
36 ImageDiff();
37 ~ImageDiff();
38
39 void setBufferA(unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height);
40
41 void setBufferB(unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height);
42
43 bool different();
44 unsigned int numDifferingPixels();
45
46private:
47 ScanlineModel *scanline_model;
48
49 unsigned char *buffer_a;
50 unsigned char *buffer_b;
51
52 unsigned int width_a;
53 unsigned int height_a;
54 unsigned int width_b;
55 unsigned int height_b;
56};
57
58} // end namespace firevision
59
60#endif
Image difference checker.
Definition: imagediff.h:33
void setBufferA(unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height)
Set first buffer.
Definition: imagediff.cpp:64
unsigned int numDifferingPixels()
Number of differing pixels.
Definition: imagediff.cpp:145
void setBufferB(unsigned char *yuv422planar_buffer, unsigned int width, unsigned int height)
Set second buffer.
Definition: imagediff.cpp:77
ImageDiff()
Constructor.
Definition: imagediff.cpp:48
bool different()
Check if images are different.
Definition: imagediff.cpp:92
~ImageDiff()
Destructor.
Definition: imagediff.cpp:54
Scanline model interface.
Definition: scanlinemodel.h:53