imagediff.h

00001 
00002 /***************************************************************************
00003  *  imagediff.h - check if two images differ, allow probabilistic scanning
00004  *                by using scanlines.
00005  *
00006  *  Generated: Tue Jun 06 10:08:36 2006
00007  *  Copyright  2005-2007  Tim Niemueller [www.niemueller.de]
00008  *
00009  ****************************************************************************/
00010 
00011 /*  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version. A runtime exception applies to
00015  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU Library General Public License for more details.
00021  *
00022  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00023  */
00024 
00025 #ifndef __FIREVISION_FVUTILS_STATISTICAL_IMAGEDIFF_H_
00026 #define __FIREVISION_FVUTILS_STATISTICAL_IMAGEDIFF_H_
00027 
00028 #include <models/scanlines/scanlinemodel.h>
00029 
00030 namespace firevision {
00031 #if 0 /* just to make Emacs auto-indent happy */
00032 }
00033 #endif
00034 
00035 class ImageDiff {
00036  public:
00037   ImageDiff(ScanlineModel *scanline_model);
00038   ImageDiff();
00039   ~ImageDiff();
00040 
00041   void setBufferA(unsigned char *yuv422planar_buffer,
00042                   unsigned int width, unsigned int height);
00043 
00044   void setBufferB(unsigned char *yuv422planar_buffer,
00045                   unsigned int width, unsigned int height);
00046 
00047   bool different();
00048   unsigned int numDifferingPixels();
00049 
00050  private:
00051   ScanlineModel *scanline_model;
00052 
00053   unsigned char *buffer_a;
00054   unsigned char *buffer_b;
00055 
00056   unsigned int width_a;
00057   unsigned int height_a;
00058   unsigned int width_b;
00059   unsigned int height_b;
00060 
00061 };
00062 
00063 } // end namespace firevision
00064 
00065 #endif

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1