ivl 679
|
00001 /* This file is part of the ivl C++ library <http://image.ntua.gr/ivl>. 00002 A C++ template library extending syntax towards mathematical notation. 00003 00004 Copyright (C) 2012 Yannis Avrithis <iavr@image.ntua.gr> 00005 Copyright (C) 2012 Kimon Kontosis <kimonas@image.ntua.gr> 00006 00007 ivl is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU Lesser General Public License 00009 version 3 as published by the Free Software Foundation. 00010 00011 Alternatively, you can redistribute it and/or modify it under the terms 00012 of the GNU General Public License version 2 as published by the Free 00013 Software Foundation. 00014 00015 ivl is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 See the GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 and a copy of the GNU Lesser General Public License along 00022 with ivl. If not, see <http://www.gnu.org/licenses/>. */ 00023 00024 #ifndef IVL_IMAGE_DETAILS_IMAGE_HPP 00025 #define IVL_IMAGE_DETAILS_IMAGE_HPP 00026 00027 namespace ivl { 00028 00029 //template <class T, class Derived> class pixel; 00030 00031 // print an image 00032 template<class T, class S> 00033 std::ostream& print(std::ostream& os, const image<T, S>& a); 00034 00035 /* Enum types used for image */ 00036 enum interpolation { 00037 nn = 0, 00038 linear = 1, 00039 area = 2, 00040 cubic = 3 00041 }; 00042 enum warp_method { 00043 fill_outliers = 0, 00044 inverse_map = 1 00045 }; 00046 enum image_channels { 00047 ic_auto = 0, 00048 ic_mono = 1, 00049 ic_color = 2 00050 }; 00051 00052 #include "specialization/opencv_impl_false.hpp" 00053 #include "specialization/image_class.hpp" 00054 00055 // --------------------------------------------------------------------------- 00056 // Implementation 00057 // --------------------------------------------------------------------------- 00058 00059 00060 //#ifndef IVL_NO_OPENCV 00062 // channels: ic_auto, ic_mono or ic_color 00063 template <class T, class S> 00064 image<T, S>::image(const std::string& filename, image_channels channels) 00065 { 00066 // load the image file into a temporary IplImage 00067 load(filename, channels); 00068 } 00069 00071 template <class T, class S> 00072 image<T, S>::image(const iplimage_t* ipl) 00073 { 00074 (*this) = ipl; 00075 } 00076 //#endif //IVL_NO_OPENCV 00077 00078 #if 0 00079 00080 00081 template <class T, class D> 00082 inline pixel<T, D> image<T, D>::col(size_t row, size_t col) 00083 { 00084 return pixel<T, D> (*this, row, col); 00085 } 00086 #endif 00087 00088 00089 } /* namespace ivl */ 00090 00091 #endif // IVL_IMAGE_DETAILS_IMAGE_HPP