C++ Bitmap Library
release
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iterator>
#include <limits>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | bitmap_image |
struct | rgb_t |
class | image_drawer |
class | cartesian_canvas |
class | response_image< T > |
Macros | |
#define | round(d) std::floor(d + 0.5) |
Functions | |
bool | operator== (const rgb_t &c0, const rgb_t &c1) |
bool | operator!= (const rgb_t &c0, const rgb_t &c1) |
std::size_t | hamming_distance (const rgb_t &c0, const rgb_t &c1) |
rgb_t | make_colour (const unsigned int &red, const unsigned int &green, const unsigned int &blue) |
template<typename OutputIterator > | |
void | generate_colours (const std::size_t &steps, const rgb_t c0, const rgb_t &c1, OutputIterator out) |
template<typename ResponseImage , typename Palette > | |
std::size_t | convert_rsp_to_image (const ResponseImage &resp_image, const Palette &palette, bitmap_image &image) |
void | rgb_to_ycbcr (const unsigned int &length, double *red, double *green, double *blue, double *y, double *cb, double *cr) |
void | ycbcr_to_rgb (const unsigned int &length, double *y, double *cb, double *cr, double *red, double *green, double *blue) |
void | subsample (const unsigned int &width, const unsigned int &height, const double *source, unsigned int &w, unsigned int &h, double *&dest) |
void | upsample (const unsigned int &width, const unsigned int &height, const double *source, unsigned int &w, unsigned int &h, double *&dest) |
void | checkered_pattern (const unsigned int x_width, const unsigned int y_width, const unsigned char value, const bitmap_image::color_plane color, bitmap_image &image) |
void | checkered_pattern (const unsigned int x_width, const unsigned int y_width, const unsigned char red, const unsigned char green, const unsigned char blue, bitmap_image &image) |
void | plasma (bitmap_image &image, const double &x, const double &y, const double &width, const double &height, const double &c1, const double &c2, const double &c3, const double &c4, const double &roughness=3.0, const rgb_t colormap[]=0) |
void | plasma (bitmap_image &image, const double &c1, const double &c2, const double &c3, const double &c4, const double &roughness=3.0, const rgb_t colormap[]=0) |
double | psnr_region (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height, const bitmap_image &image1, const bitmap_image &image2) |
void | hierarchical_psnr_r (const double &x, const double &y, const double &width, const double &height, const bitmap_image &image1, bitmap_image &image2, const double &threshold, const rgb_t colormap[]) |
void | hierarchical_psnr (bitmap_image &image1, bitmap_image &image2, const double threshold, const rgb_t colormap[]) |
rgb_t | convert_wave_length_nm_to_rgb (const double wave_length_nm) |
double | weighted_distance (const unsigned char r0, const unsigned char g0, const unsigned char b0, const unsigned char r1, const unsigned char g1, const unsigned char b1) |
double | weighted_distance (const rgb_t c0, const rgb_t c1) |
template<typename Iterator > | |
rgb_t | find_nearest_color (const rgb_t &c, const Iterator begin, const Iterator end) |
template<template< typename, typename > class Sequence, typename Allocator > | |
rgb_t | find_nearest_color (const rgb_t &c, const Sequence< rgb_t, Allocator > &seq) |
template<std::size_t N> | |
rgb_t | find_nearest_color (const rgb_t &c, const rgb_t(&colors)[N]) |
double | find_nearest_wave_length (const rgb_t &c, const double increment=0.001) |
void | sobel_operator (const bitmap_image &src_image, bitmap_image &dst_image, const double threshold=0.0) |
Variables | |
const rgb_t | palette_colormap [] |
const rgb_t | autumn_colormap [1000] |
const rgb_t | copper_colormap [1000] |
const rgb_t | gray_colormap [1000] |
const rgb_t | hot_colormap [1000] |
const rgb_t | hsv_colormap [1000] |
const rgb_t | jet_colormap [1000] |
const rgb_t | prism_colormap [1000] |
const rgb_t | vga_colormap [1000] |
const rgb_t | yarg_colormap [1000] |
#define round | ( | d | ) | std::floor(d + 0.5) |
Referenced by convert_wave_length_nm_to_rgb().
enum palette_name |
Definition at line 3115 of file bitmap_image.hpp.
|
inline |
Definition at line 1847 of file bitmap_image.hpp.
References bitmap_image::bytes_per_pixel(), bitmap_image::height(), bitmap_image::offset(), bitmap_image::row(), and bitmap_image::width().
Referenced by test14().
|
inline |
Definition at line 1892 of file bitmap_image.hpp.
References bitmap_image::bytes_per_pixel(), bitmap_image::height(), bitmap_image::row(), and bitmap_image::width().
|
inline |
Definition at line 1673 of file bitmap_image.hpp.
References bitmap_image::height(), bitmap_image::set_pixel(), and bitmap_image::width().
|
inline |
Definition at line 2831 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, rgb_t::red, and round.
Referenced by find_nearest_wave_length().
|
inline |
Definition at line 2919 of file bitmap_image.hpp.
References weighted_distance().
Referenced by find_nearest_color().
|
inline |
Definition at line 2948 of file bitmap_image.hpp.
References find_nearest_color().
|
inline |
Definition at line 2954 of file bitmap_image.hpp.
References find_nearest_color().
|
inline |
Definition at line 2959 of file bitmap_image.hpp.
References convert_wave_length_nm_to_rgb(), and weighted_distance().
|
inline |
Definition at line 1654 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, and rgb_t::red.
Definition at line 1631 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, and rgb_t::red.
|
inline |
Definition at line 2076 of file bitmap_image.hpp.
References bitmap_image::height(), hierarchical_psnr_r(), bitmap_image::psnr(), psnr_region(), and bitmap_image::width().
|
inline |
Definition at line 2034 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, bitmap_image::psnr(), psnr_region(), rgb_t::red, and bitmap_image::set_region().
Referenced by hierarchical_psnr().
|
inline |
Definition at line 1642 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, and rgb_t::red.
Definition at line 1624 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, and rgb_t::red.
Definition at line 1617 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, and rgb_t::red.
|
inline |
Definition at line 1939 of file bitmap_image.hpp.
References bitmap_image::height(), bitmap_image::set_pixel(), and bitmap_image::width().
Referenced by plasma(), test15(), test16(), and test17().
|
inline |
Definition at line 1977 of file bitmap_image.hpp.
References bitmap_image::height(), plasma(), and bitmap_image::width().
|
inline |
Definition at line 1991 of file bitmap_image.hpp.
References bitmap_image::bytes_per_pixel(), bitmap_image::height(), bitmap_image::row(), and bitmap_image::width().
Referenced by hierarchical_psnr(), and hierarchical_psnr_r().
|
inline |
Definition at line 1696 of file bitmap_image.hpp.
|
inline |
Definition at line 3069 of file bitmap_image.hpp.
References bitmap_image::export_gray_scale_response_image(), bitmap_image::height(), response_image< T >::height(), bitmap_image::import_gray_scale_clamped(), response_image< T >::row(), bitmap_image::setwidth_height(), bitmap_image::width(), and response_image< T >::width().
|
inline |
Definition at line 1734 of file bitmap_image.hpp.
References bitmap_image::width().
|
inline |
Definition at line 1814 of file bitmap_image.hpp.
References bitmap_image::height(), and bitmap_image::width().
|
inline |
Definition at line 2902 of file bitmap_image.hpp.
Referenced by find_nearest_color(), find_nearest_wave_length(), and weighted_distance().
Definition at line 2912 of file bitmap_image.hpp.
References rgb_t::blue, rgb_t::green, rgb_t::red, and weighted_distance().
|
inline |
Definition at line 1713 of file bitmap_image.hpp.
const rgb_t autumn_colormap[1000] |
Definition at line 3142 of file bitmap_image.hpp.
Referenced by test18().
const rgb_t copper_colormap[1000] |
Definition at line 3345 of file bitmap_image.hpp.
Referenced by test18().
const rgb_t gray_colormap[1000] |
Definition at line 3548 of file bitmap_image.hpp.
Referenced by test18().
const rgb_t hot_colormap[1000] |
Definition at line 3751 of file bitmap_image.hpp.
Referenced by test18().
const rgb_t hsv_colormap[1000] |
Definition at line 3954 of file bitmap_image.hpp.
const rgb_t jet_colormap[1000] |
const rgb_t palette_colormap[] |
Definition at line 3129 of file bitmap_image.hpp.
const rgb_t prism_colormap[1000] |
Definition at line 4360 of file bitmap_image.hpp.
const rgb_t vga_colormap[1000] |
Definition at line 4563 of file bitmap_image.hpp.
const rgb_t yarg_colormap[1000] |
Definition at line 4766 of file bitmap_image.hpp.
Referenced by test18().