LMDistanceImage.h

00001 /*
00002 Copyright 2010, Ming-Yu Liu
00003 
00004 All Rights Reserved 
00005 
00006 Permission to use, copy, modify, and distribute this software and 
00007 its documentation for any non-commercial purpose is hereby granted 
00008 without fee, provided that the above copyright notice appear in 
00009 all copies and that both that copyright notice and this permission 
00010 notice appear in supporting documentation, and that the name of 
00011 the author not be used in advertising or publicity pertaining to 
00012 distribution of the software without specific, written prior 
00013 permission. 
00014 
00015 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
00016 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
00017 ANY PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
00018 ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
00019 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 
00020 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
00021 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
00022 */
00023 
00024 
00025 
00026 #pragma once
00027 #include <opencv/cv.h>
00028 #include <opencv/cxcore.h>
00029 
00030 
00031 #include "plugins/SceneUnderstanding/EIEdgeImage/EIEdgeImage.h"
00032 #include "LMDirectionalIntegralDistanceImage.h"
00033 
00034 
00035 class LMDistanceImage {
00036 public:
00037 
00038         LMDistanceImage();
00039         ~LMDistanceImage();
00040         void Configure(float directionCost,double maxCost) {directionCost_ = directionCost; maxCost_ = maxCost; };
00041 
00042         void SetImage(EIEdgeImage& ei);
00043 
00044         
00045 
00046 private:
00047 
00048         void SafeRelease();
00049         void ConstructDTs(EIEdgeImage& ei);
00050         void UpdateCosts();
00051         void ConstructDIntegrals();
00052         
00053         
00054 private:
00055         LMDirectionalIntegralDistanceImage* idtImages_;
00056         int nDirections_;
00057         int width_;
00058         int height_;
00059         IplImage** dtImages_;
00060         float directionCost_;
00061         double maxCost_;
00062 
00063 
00064         friend class LMLineMatcher;
00065 };
Generated on Sun May 8 08:05:31 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3