DebugHighlight.cpp
Go to the documentation of this file.
00001 #include <face_contour_detector/filters/DebugHighlight.h>
00002 
00003 #include <opencv/cv.h>
00004 #include <string>
00005 #include <face_contour_detector/Bgr8.h>
00006 
00007 namespace face_contour_detector {
00008         namespace filters {
00009 
00010                 DebugHighlight::DebugHighlight() {
00011                         ResetParameters();
00012                 }
00013 
00014                 std::vector<Parameter> DebugHighlight::GetParameters() {
00015                         std::vector<Parameter> re;
00016                         return re;
00017                 }
00018 
00019                 void DebugHighlight::Apply(const cv::Mat& input, cv::Mat& result) {
00020                         result = cv::Mat(input.rows, input.cols, CV_8UC3);
00021                         for (int y = 0; y < input.rows; y++) {
00022                                 for (int x = 0; x < input.cols; x++) {
00023                                         if (input.at<unsigned char>(y,x) > 160 && input.at<unsigned char>(y,x) < 180) {
00024                                                 result.at<Bgr8>(y,x).b = 0;
00025                                                 result.at<Bgr8>(y,x).g = 255;
00026                                                 result.at<Bgr8>(y,x).r = 0;
00027                                         } else {
00028                                                 result.at<Bgr8>(y,x).b = input.at<unsigned char>(y,x);
00029                                                 result.at<Bgr8>(y,x).g = input.at<unsigned char>(y,x);
00030                                                 result.at<Bgr8>(y,x).r = input.at<unsigned char>(y,x);
00031                                         }
00032                                 }
00033                         }
00034                 }
00035 
00036                 void DebugHighlight::ResetParameters() {
00037 
00038                 }
00039 
00040                 const std::string& DebugHighlight::GetFilterName() {
00041                         return m_filterName;
00042                 }
00043 
00044                 //static
00045                 std::string DebugHighlight::m_filterName = std::string("DebugHighlight");
00046         } // namespace filters
00047 } // namespace face_contour_detector
 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