egami
C++ Image Processing program
|
00001 #include <algorithm> 00002 #include <memory> 00003 #include <string> 00004 00005 #include <gtkmm/image.h> 00006 00007 #include "../display_unit.hpp" 00008 #include "../processing_page.hpp" 00009 #include "../processing_unit.hpp" 00010 #include "../utils.hpp" 00011 #include "convolution.hpp" 00012 00013 namespace{ 00014 Display_unit* impl(const Image_unit *in){ 00015 std::array<std::array<double, 3>, 3> kernel={{{{-2., -1., 0.}},{{-1., 1., 1.}},{{0., 1., 2.}}}}; 00016 return apply<1>(in, kernel, 1); 00017 } 00018 } 00019 00020 namespace Processes{ 00021 void emboss(){ 00022 Gtk::Image icon(cmake_install_prefix+std::string("/share/egami/icons/emboss.png")); 00023 std::shared_ptr<Processing_unit> pu(new Processing_unit(Processing(&impl), "Emboss", icon, false)); 00024 Processing_page::add_unit_to_page("Convolutions", pu); 00025 } 00026 }