Canny.cpp
Go to the documentation of this file.
00001 #include <face_contour_detector/filters/Canny.h>
00002 #include <string>
00003 
00004 
00005 namespace face_contour_detector {
00006         namespace filters {
00007 
00008                 Canny::Canny() {
00009                         ResetParameters();
00010                 }
00011 
00012                 std::vector<Parameter> Canny::GetParameters() {
00013                         std::vector<Parameter> re;
00014                         std::string name("threshold1");
00015                         re.push_back(Parameter(name, &m_threshold1, 100.0, 40000.0));
00016                         name = std::string("threshold2");
00017                         re.push_back(Parameter(name, &m_threshold2, 100.0, 40000.0));
00018                         name = std::string("l2gradientent");
00019                         re.push_back(Parameter(name, &m_l2gradients));
00020                         return re;
00021                 }
00022 
00023                 void Canny::Apply(const cv::Mat& input, cv::Mat& result) {
00024                         cv::Canny(input, result, m_threshold1, m_threshold2, m_apertureSize, m_l2gradients);
00025                 }
00026 
00027                 void Canny::ResetParameters() {
00028                         m_threshold1 = 500.0;
00029                         m_threshold2 = 1000.0;
00030                         m_apertureSize = 7;
00031                         m_l2gradients = true;
00032                 }
00033 
00034                 const std::string& Canny::GetFilterName() {
00035                         return m_filterName;
00036                 }
00037 
00038                 //static
00039                 std::string Canny::m_filterName = std::string("Canny");
00040         }
00041 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


face_contour_detector
Author(s): Fabian Wenzelmann and Julian Schmid
autogenerated on Wed Dec 26 2012 16:18:17