ivl 679
image< T, OPTS > Class Template Reference

A single or multi channel image of type T based on array. More...

#include <image_class.hpp>

Inherits array_common_base< image< T, OPTS > >.

List of all members.

Public Types

typedef ivl::color< T, OPTS::Ch > color_type
 color type
typedef types::t_if
< types::t_expr< N!=1 >, array
< T, data::ref_iterator
< const_iterator_nd,
types::term, N > >, typename
const_iterator::reference >
::type 
const_pixel
 const pixel type

Public Member Functions

color_type black () const
 predefined colors
size_t channels () const
 color channels
const_pixel col (const const_iterator &it) const
 const pixel from iterator
pixel col (size_t row, size_t col)
 pixel access
pixel col (const best_iterator &it)
 pixel from iterator
const_pixel col (size_t row, size_t col) const
 const pixel access
size_t cols () const
 image columns
size_t height () const
 image height. same as rows
iplimage_t * ipl () const
 Conversion to IplImage.
size_t rows () const
 image rows
size_t width () const
 image width. same as columns
Constructors
 image ()
 Default constructor. always assign at least 1 channel to the image.
 image (size_t rows, size_t cols, size_t channels=(!N?3:N))
 Create an empty image.
 image (size_t rows, size_t cols, size_t channels, const T &value)
 Create an image with initial value.
template<class J , class D >
 image (size_t rows, size_t cols, size_t channels, const array< J, D > &a)
 Create an image with size and pointer to data.
template<class S >
 image (const array< size_t, S > &sz)
 Create an image with size array.
template<class S >
 image (const array< size_t, S > &sz, const T &value)
 Create an image with size array and initial value.
template<class S >
 image (const array< size_t, S > &sz, const T *ptr)
 Create an image with size array and pointer to data.
template<class S >
 image (const array< size_t, S > &sz, const data_init_arg &data)
 Create an image with size array and a data_init_arg.
template<class S , class J , class D >
 image (const array< size_t, S > &sz, const array< J, D > &a)
 Create an image with size array and ivl::array or value.
 image (const std::string &filename, image_channels channels=ic_auto)
 Create an image from filename.
 image (const iplimage_t *ipl)
 Create an image from an IplImage.
template<class J , class S >
 image (const array_nd< J, S > &a)
 Construct from array_nd.
template<class J , class S >
 image (array_nd< J, S > &a)
 (special for ref_iterator) Construct from array_nd
 image (const this_type &a)
 Copy constructor.
Assignment operators
template<class K >
derived_type & operator= (const K &k)
this_typeoperator= (const this_type &a)
derived_type & operator= (const iplimage_t *src)
 assign from an OpenCV IplImage
derived_type & operator= (iplimage_t *src)
 assign from an OpenCV IplImage
Basic plotting (not fast implementations)
derived_type & put_pixel (double_point< 2 > a, color_type col=ivl::white< T, rgb >())
 Draws a single pixel.
color_type get_pixel (double_point< 2 > a)
 Retrieves the color of a single pixel.
derived_type & line (double_point< 2 > a, double_point< 2 > b, color_type col=ivl::white< T, rgb >(), double thickness=1.5, double opacity=1.)
 Draws line from a => b, using the given color, thickness and opacity. anti-aliasing is performed.
derived_type & circle (double_point< 2 > a, double radius, color_type col=ivl::white< T, rgb >(), double thickness=1.5, double opacity=1.)
 Draws circle on a with given radius, using the given color, thickness and opacity. anti-aliasing is performed.
derived_type & rect (double_point< 2 > a, double_point< 2 > b, color_type col=ivl::white< T, rgb >(), double thickness=1.5, double opacity=1.)
 Draws a rectangle from corner a to corner b, using the given color, thickness and opacity. anti-aliasing is performed.
derived_type & ellipse (double_point< 2 > a, double_point< 2 > b, double radius, color_type col=ivl::white< T, rgb >(), double thickness=1.5, double opacity=1.)
 Draws an ellipse using centers and and total radius radius, using the given color, thickness and opacity. anti-aliasing is performed.
derived_type & ellipse (double_point< 2 > c, double radius1, double radius2, double angle, color_type col=ivl::white< T, rgb >(), double thickness=1.5, double opacity=1.)
derived_type & fill_circle (double_point< 2 > a, double radius, color_type col=ivl::white< T, rgb >(), double opacity=1.)
derived_type & fill_rect (double_point< 2 > a, double_point< 2 > b, color_type col=ivl::white(ivl::color_type< T, rgb >()), double opacity=1.)
 Fills circle on a with given radius, using the given color and opacity. anti-aliasing is performed.
derived_type & fill_ellipse (double_point< 2 > a, double_point< 2 > b, double radius, color_type col=ivl::white(ivl::color_type< T, rgb >()), double opacity=1.)
 Fills an ellipse using centers and and total radius radius, using the given color and opacity. anti-aliasing is performed.
derived_type & fill_ellipse (double_point< 2 > c, double radius1, double radius2, double angle, color_type col=ivl::white(ivl::color_type< T, rgb >()), double opacity=1.)
derived_type & fill_triangle (double_point< 2 > a, double_point< 2 > b, double_point< 2 > c, color_type col=ivl::white(ivl::color_type< T, rgb >()), double opacity=1.)
 Fills a triangle (a, b, c) using the given color and opacity. anti-aliasing is performed.
derived_type & fill_quad (double_point< 2 > a, double_point< 2 > b, double_point< 2 > c, double_point< 2 > d, color_type col=ivl::white(ivl::color_type< T, rgb >()), double opacity=1.)
 Fills a quad (a, b, c, d) using the given color and opacity. anti-aliasing is performed.

Related Functions

(Note that these are not member functions.)

Image non-member functions
template<class T , class D >
void show (const image< T, D > &im1, const char *title1, const image< T, D > &im2=image< T, D >(), const char *title2=NULL, const image< T, D > &im3=image< T, D >(), const char *title3=NULL, const image< T, D > &im4=image< T, D >(), const char *title4=NULL, const image< T, D > &im5=image< T, D >(), const char *title5=NULL)
 quickview, View ivl::image(s) into titled window(s)
template<class T1 , class D1 , class T2 , class D2 , class T3 , class D3 , class T4 , class D4 , class T5 , class D5 >
void imshow_impl (const image< T1, D1 > &im1, const char *title1, const image< T2, D2 > &im2, const char *title2, const image< T3, D3 > &im3, const char *title3, const image< T4, D4 > &im4, const char *title4, const image< T5, D5 > &im5, const char *title5)
template<class T , class D >
void imshow (const image< T, D > &im1, const char *title1="")
template<class T , class D , class T2 , class D2 >
void imshow (const image< T, D > &im1, const char *title1, const image< T2, D2 > &im2, const char *title2="")
template<class T , class D , class T2 , class D2 >
void imshow (const image< T, D > &im1, const image< T2, D2 > &im2)
template<class T , class D , class T2 , class D2 , class T3 , class D3 >
void imshow (const image< T, D > &im1, const char *title1, const image< T2, D2 > &im2, const char *title2, const image< T3, D3 > &im3, const char *title3="")
template<class T , class D , class T2 , class D2 , class T3 , class D3 >
void imshow (const image< T, D > &im1, const image< T2, D2 > &im2, const image< T3, D3 > &im3)
template<class T , class D >
void view (const image< T, D > &img, const char *title)
 quickview, View ivl::image(s) into titled window(s)
template<class T , class D >
image< T, D >::create_similar flipud (const image< T, D > &a)
 Horizontal and vertical flipping.
template<class T , class D >
image< T, D >::create_similar fliplr (const image< T, D > &a)
template<class T , class D >
image< T, D >::create_similar grayscale (const image< T, D > &a)
 Grayscale.
template<class T , class D >
image< T, D >::create_new sobel (const image< T, D > &a, int y_order, int x_order, int aperture_size=3)
 Sobel operator.
template<class T , class D >
image< T, D >::create_new laplace (const image< T, D > &a, int aperture_size=3)
 Laplace.
template<class T , class D >
image< T, D >::create_new edges (const image< T, D > &a, double threshold1, double threshold2, int aperture_size=3)
 Canny edge detection.
template<class T , class D >
image< T, D >::create_new pre_corner_detect (const image< T, D > &a, int aperture_size=3)
 Corner detection, various algorithms.
template<class T , class D >
image< T, D >::create_new corner_eigenvals (const image< T, D > &a, int block_size, int aperture_size=3)
template<class T , class D >
image< T, D >::create_new corner_min_eigenval (const image< T, D > &a, int block_size, int aperture_size=3)
template<class T , class D >
image< T, D >::create_new corner_harris (const image< T, D > &a, int block_size, int aperture_size=3, double k=0.04)
template<class T , class D >
image< T, D >::create_new pyramid_up (const image< T, D > &a)
 Pyramid algorithm.
template<class T , class D >
image< T, D >::create_new pyramid_down (const image< T, D > &a)
template<class T , class D >
image< T, D >::create_new resample (const image< T, D > &a, size_t rows, size_t cols, interpolation interp=linear)
 Resize.
template<class T , class D >
image< T, D >::create_new blur_no_scale (const image< T, D > &a, int neighbourhood_rows=0, int neighbourhood_cols=3)
 Blur algorithms.
template<class T , class D >
image< T, D >::create_new blur (const image< T, D > &a, int neighbourhood_rows=0, int neighbourhood_cols=3)
template<class T , class D >
image< T, D >::create_new gaussian_blur (const image< T, D > &a, int neighbourhood_rows=0, int neighbourhood_cols=3, int vertical_sigma=0, int horizontal_sigma=0)
template<class T , class D >
image< T, D >::create_new median_blur (const image< T, D > &a, int neighbourhood=3)
template<class T , class D >
image< T, D >::create_new bilateral_blur (const image< T, D > &a, int color_sigma=3, int space_sigma=3)
template<class T , class D >
image< T, D >::create_new rotate (const image< T, D > &a, double angle, const float_point< 2 > &center, double scale=1.0, interpolation interp=linear, warp_method warp_m=fill_outliers, color< T, D::Ch > fill_color=ivl::black(color_type< T, rgb >()))
 Image Rotation.
template<class T , class D >
image< T, D >::create_new get_quadrange_sub_pix (const image< T, D > &a, const array_2d< double > &map_matrix, const size_array &dst_size=idx(0, 0))
 get_quadrange_sub_pix OpenCV wrapper.

Detailed Description

template<class T, class OPTS = data::normal_image<0>>
class image< T, OPTS >

A single or multi channel image of type T based on array.

This class defines an image based on an array.


Constructor & Destructor Documentation

template<class T, class OPTS = data::normal_image<0>>
template<class J , class D >
image< T, OPTS >::image ( size_t  rows,
size_t  cols,
size_t  channels,
const array< J, D > &  a 
) [inline]

Create an image with size and pointer to data.

Create an empty image with similar initial value or array


Member Function Documentation

template<class T, class OPTS = data::normal_image<0>>
derived_type& image< T, OPTS >::ellipse ( double_point< 2 >  c,
double  radius1,
double  radius2,
double  angle,
color_type  col = ivl::white<T, rgb>(),
double  thickness = 1.5,
double  opacity = 1. 
) [inline]

Draws an ellipse using center , a given and radius1, radius2 of the two axis, horizontal and vertical. using the given color, thickness and opacity. anti-aliasing is performed

template<class T, class OPTS = data::normal_image<0>>
derived_type& image< T, OPTS >::fill_ellipse ( double_point< 2 >  c,
double  radius1,
double  radius2,
double  angle,
color_type  col = ivl::white(ivl::color_type<T, rgb>()),
double  opacity = 1. 
) [inline]

Fills an ellipse using center , a given and radius1, radius2 of the two axis, horizontal and vertical. using the given color and opacity. anti-aliasing is performed


Friends And Related Function Documentation

template<class T , class D >
void show ( const image< T, D > &  im1,
const char *  title1,
const image< T, D > &  im2 = image< T, D >(),
const char *  title2 = NULL,
const image< T, D > &  im3 = image< T, D >(),
const char *  title3 = NULL,
const image< T, D > &  im4 = image< T, D >(),
const char *  title4 = NULL,
const image< T, D > &  im5 = image< T, D >(),
const char *  title5 = NULL 
) [related]

quickview, View ivl::image(s) into titled window(s)

quickview


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations