Image.cpp
Go to the documentation of this file.
00001 #include "EdgeDetection/Image.h"
00002 
00003 namespace EdgeDetection
00004 {
00005         double Image::Combine(Image* image1, Image* image2)
00006         {
00007                 if (image1 == 0) throw "The parameter 'image1' cannot be NULL.";
00008                 if (image2 == 0) throw "The parameter 'image2' cannot be NULL.";
00009                 if (image1->width != image2->width || image1->height != image2->height) throw "The two images are not the same size.";
00010 
00011                 int width = image1->width;
00012                 int height = image1->height;
00013 
00014                 double result = 0;
00015 
00016                 for (int y = 0; y < height; y++)
00017                         for (int x = 0; x < width; x++)
00018                                 result += image1->Get(x, y) * image2->Get(x, y);
00019 
00020                 return result;
00021         }
00022 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


aruco_pose
Author(s): Julian Brunner
autogenerated on Thu May 23 2013 12:15:46