C++ Bitmap Library
release
|
#include <bitmap_image.hpp>
Public Types | |
enum | channel_mode { rgb_mode = 0, bgr_mode = 1 } |
enum | color_plane { blue_plane = 0, green_plane = 1, red_plane = 2 } |
Public Member Functions | |
bitmap_image () | |
bitmap_image (const std::string &filename) | |
bitmap_image (const unsigned int width, const unsigned int height) | |
bitmap_image (const bitmap_image &image) | |
bitmap_image & | operator= (const bitmap_image &image) |
bool | operator! () |
void | clear (const unsigned char v=0x00) |
unsigned char | red_channel (const unsigned int x, const unsigned int y) const |
unsigned char | green_channel (const unsigned int x, const unsigned int y) const |
unsigned char | blue_channel (const unsigned int x, const unsigned int y) const |
void | red_channel (const unsigned int x, const unsigned int y, const unsigned char value) |
void | green_channel (const unsigned int x, const unsigned int y, const unsigned char value) |
void | blue_channel (const unsigned int x, const unsigned int y, const unsigned char value) |
unsigned char * | row (unsigned int row_index) const |
void | get_pixel (const unsigned int x, const unsigned int y, unsigned char &red, unsigned char &green, unsigned char &blue) |
template<typename RGB > | |
void | get_pixel (const unsigned int x, const unsigned int y, RGB &colour) |
void | set_pixel (const unsigned int x, const unsigned int y, const unsigned char red, const unsigned char green, const unsigned char blue) |
template<typename RGB > | |
void | set_pixel (const unsigned int x, const unsigned int y, const RGB &colour) |
bool | copy_from (const bitmap_image &image) |
bool | copy_from (const bitmap_image &source_image, const unsigned int &x_offset, const unsigned int &y_offset) |
bool | region (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height, bitmap_image &dest_image) |
bool | roi_from_center (const unsigned int &cx, const unsigned int &cy, const unsigned int &width, const unsigned int &height, bitmap_image &dest_image) |
bool | set_region (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height, const unsigned char &value) |
bool | set_region (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height, const color_plane color, const unsigned char &value) |
bool | set_region (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height, const unsigned char &red, const unsigned char &green, const unsigned char &blue) |
void | reflective_image (bitmap_image &image, const bool include_diagnols=false) |
unsigned int | width () const |
unsigned int | height () const |
unsigned int | bytes_per_pixel () const |
unsigned int | pixel_count () const |
void | setwidth_height (const unsigned int width, const unsigned int height, const bool clear=false) |
void | save_image (const std::string &file_name) const |
void | set_all_ith_bits_low (const unsigned int bitr_index) |
void | set_all_ith_bits_high (const unsigned int bitr_index) |
void | set_all_ith_channels (const unsigned int &channel, const unsigned char &value) |
void | set_channel (const color_plane color, const unsigned char &value) |
void | ror_channel (const color_plane color, const unsigned int &ror) |
void | set_all_channels (const unsigned char &value) |
void | set_all_channels (const unsigned char &r_value, const unsigned char &g_value, const unsigned char &b_value) |
void | invert_color_planes () |
void | add_to_color_plane (const color_plane color, const unsigned char &value) |
void | convert_to_grayscale () |
const unsigned char * | data () const |
unsigned char * | data () |
void | bgr_to_rgb () |
void | rgb_to_bgr () |
void | reverse () |
void | horizontal_flip () |
void | vertical_flip () |
void | export_color_plane (const color_plane color, unsigned char *image) |
void | export_color_plane (const color_plane color, bitmap_image &image) |
void | export_response_image (const color_plane color, double *response_image) |
void | export_gray_scale_response_image (double *response_image) const |
void | export_rgb (double *red, double *green, double *blue) const |
void | export_rgb (float *red, float *green, float *blue) const |
void | export_rgb (unsigned char *red, unsigned char *green, unsigned char *blue) const |
void | export_ycbcr (double *y, double *cb, double *cr) |
void | export_rgb_normal (double *red, double *green, double *blue) const |
void | export_rgb_normal (float *red, float *green, float *blue) const |
void | import_rgb (double *red, double *green, double *blue) |
void | import_rgb (float *red, float *green, float *blue) |
void | import_rgb (unsigned char *red, unsigned char *green, unsigned char *blue) |
void | import_ycbcr (double *y, double *cb, double *cr) |
void | import_gray_scale_clamped (double *gray) |
void | import_rgb_clamped (double *red, double *green, double *blue) |
void | import_rgb_clamped (float *red, float *green, float *blue) |
void | import_rgb_normal (double *red, double *green, double *blue) |
void | import_rgb_normal (float *red, float *green, float *blue) |
void | subsample (bitmap_image &dest) |
void | upsample (bitmap_image &dest) |
void | alpha_blend (const double &alpha, const bitmap_image &image) |
double | psnr (const bitmap_image &image) |
double | psnr (const unsigned int &x, const unsigned int &y, const bitmap_image &image) |
void | histogram (const color_plane color, double hist[256]) |
void | histogram_normalized (const color_plane color, double hist[256]) |
unsigned int | offset (const color_plane color) |
void | incremental () |
void | reverse_channels () |
Definition at line 37 of file bitmap_image.hpp.
Enumerator | |
---|---|
rgb_mode | |
bgr_mode |
Definition at line 41 of file bitmap_image.hpp.
Enumerator | |
---|---|
blue_plane | |
green_plane | |
red_plane |
Definition at line 46 of file bitmap_image.hpp.
|
inline |
Definition at line 52 of file bitmap_image.hpp.
|
inline |
Definition at line 61 of file bitmap_image.hpp.
|
inline |
Definition at line 72 of file bitmap_image.hpp.
|
inline |
Definition at line 83 of file bitmap_image.hpp.
|
inline |
Definition at line 534 of file bitmap_image.hpp.
References data(), and offset().
Referenced by test11().
|
inline |
Definition at line 1095 of file bitmap_image.hpp.
References data().
Referenced by test16().
|
inline |
Definition at line 578 of file bitmap_image.hpp.
References bgr_mode, reverse_channels(), and rgb_mode.
|
inline |
Definition at line 135 of file bitmap_image.hpp.
|
inline |
Definition at line 150 of file bitmap_image.hpp.
|
inline |
Definition at line 390 of file bitmap_image.hpp.
Referenced by checkered_pattern(), and psnr_region().
|
inline |
Definition at line 120 of file bitmap_image.hpp.
Referenced by export_color_plane(), reverse_channels(), setwidth_height(), subsample(), test14(), test15(), test20(), and upsample().
|
inline |
Definition at line 542 of file bitmap_image.hpp.
References data(), and rgb_mode.
Referenced by test07().
|
inline |
Definition at line 199 of file bitmap_image.hpp.
Referenced by reflective_image().
|
inline |
Definition at line 214 of file bitmap_image.hpp.
References row().
|
inline |
Definition at line 568 of file bitmap_image.hpp.
Referenced by add_to_color_plane(), alpha_blend(), convert_to_grayscale(), export_color_plane(), export_gray_scale_response_image(), export_response_image(), export_rgb(), export_rgb_normal(), export_ycbcr(), histogram(), import_gray_scale_clamped(), import_rgb(), import_rgb_clamped(), import_rgb_normal(), import_ycbcr(), incremental(), invert_color_planes(), psnr(), reverse(), reverse_channels(), ror_channel(), set_all_channels(), set_all_ith_bits_high(), set_all_ith_bits_low(), set_all_ith_channels(), set_channel(), subsample(), and upsample().
|
inline |
Definition at line 573 of file bitmap_image.hpp.
|
inline |
|
inline |
Definition at line 661 of file bitmap_image.hpp.
References clear(), data(), offset(), and setwidth_height().
|
inline |
Definition at line 696 of file bitmap_image.hpp.
References data().
Referenced by sobel_operator().
|
inline |
Definition at line 686 of file bitmap_image.hpp.
References data(), and offset().
|
inline |
Definition at line 713 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 726 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 739 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 769 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 782 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 752 of file bitmap_image.hpp.
References bgr_mode, and data().
Referenced by test12(), and test13().
|
inline |
Definition at line 160 of file bitmap_image.hpp.
Referenced by get_pixel().
|
inline |
Definition at line 174 of file bitmap_image.hpp.
References get_pixel().
|
inline |
Definition at line 130 of file bitmap_image.hpp.
|
inline |
Definition at line 145 of file bitmap_image.hpp.
|
inline |
Definition at line 385 of file bitmap_image.hpp.
Referenced by checkered_pattern(), convert_rsp_to_image(), hierarchical_psnr(), plasma(), psnr(), psnr_region(), region(), reverse_channels(), set_region(), setwidth_height(), sobel_operator(), test08(), test15(), test16(), test17(), test18(), and upsample().
|
inline |
Definition at line 1198 of file bitmap_image.hpp.
References data(), and offset().
Referenced by histogram_normalized().
|
inline |
Definition at line 1208 of file bitmap_image.hpp.
References histogram(), and pixel_count().
|
inline |
Definition at line 616 of file bitmap_image.hpp.
References row().
Referenced by reflective_image(), and test02().
|
inline |
Definition at line 851 of file bitmap_image.hpp.
References bgr_mode, and data().
Referenced by sobel_operator().
|
inline |
Definition at line 795 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 808 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 821 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 868 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 881 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 894 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 907 of file bitmap_image.hpp.
References bgr_mode, and data().
|
inline |
Definition at line 834 of file bitmap_image.hpp.
References bgr_mode, and data().
Referenced by test12(), and test13().
|
inline |
Definition at line 1250 of file bitmap_image.hpp.
References data().
|
inline |
Definition at line 529 of file bitmap_image.hpp.
References data().
Referenced by test10().
|
inline |
Definition at line 1222 of file bitmap_image.hpp.
References bgr_mode, blue_plane, green_plane, red_plane, and rgb_mode.
Referenced by add_to_color_plane(), checkered_pattern(), export_color_plane(), export_response_image(), histogram(), ror_channel(), set_channel(), and set_region().
|
inline |
Definition at line 112 of file bitmap_image.hpp.
|
inline |
Definition at line 95 of file bitmap_image.hpp.
Referenced by cartesian_canvas::fill_triangle(), cartesian_canvas::max_y(), and image_drawer::pen_color().
|
inline |
Definition at line 395 of file bitmap_image.hpp.
Referenced by histogram_normalized(), test12(), and test13().
|
inline |
Definition at line 1124 of file bitmap_image.hpp.
References data().
Referenced by hierarchical_psnr(), and hierarchical_psnr_r().
|
inline |
Definition at line 1160 of file bitmap_image.hpp.
References height(), row(), and width().
|
inline |
Definition at line 125 of file bitmap_image.hpp.
|
inline |
Definition at line 140 of file bitmap_image.hpp.
|
inline |
Definition at line 347 of file bitmap_image.hpp.
References copy_from(), horizontal_flip(), setwidth_height(), and vertical_flip().
|
inline |
Definition at line 233 of file bitmap_image.hpp.
References height(), row(), and setwidth_height().
Referenced by roi_from_center(), and test08().
|
inline |
Definition at line 596 of file bitmap_image.hpp.
References data().
|
inline |
Definition at line 1264 of file bitmap_image.hpp.
References clear(), data(), height(), row(), and width().
Referenced by bgr_to_rgb(), and rgb_to_bgr().
|
inline |
Definition at line 587 of file bitmap_image.hpp.
References bgr_mode, reverse_channels(), and rgb_mode.
|
inline |
Definition at line 262 of file bitmap_image.hpp.
References region().
|
inline |
Definition at line 501 of file bitmap_image.hpp.
References data(), and offset().
|
inline |
Definition at line 155 of file bitmap_image.hpp.
Referenced by checkered_pattern(), copy_from(), horizontal_flip(), psnr(), psnr_region(), region(), reverse_channels(), set_region(), and vertical_flip().
|
inline |
Definition at line 416 of file bitmap_image.hpp.
Referenced by test01(), test02(), test03(), test04(), test05(), test06(), test07(), test08(), test09(), test10(), test11(), test12(), test13(), test14(), test15(), test17(), test18(), test19(), and test20().
|
inline |
Definition at line 509 of file bitmap_image.hpp.
References data().
Referenced by test19().
|
inline |
Definition at line 517 of file bitmap_image.hpp.
References data().
|
inline |
Definition at line 475 of file bitmap_image.hpp.
References data().
|
inline |
Definition at line 465 of file bitmap_image.hpp.
References data().
Referenced by test05().
|
inline |
Definition at line 485 of file bitmap_image.hpp.
References data().
|
inline |
Definition at line 493 of file bitmap_image.hpp.
References data(), and offset().
|
inline |
Definition at line 180 of file bitmap_image.hpp.
Referenced by convert_rsp_to_image(), plasma(), set_pixel(), test09(), and test20().
|
inline |
Definition at line 194 of file bitmap_image.hpp.
References set_pixel().
|
inline |
Definition at line 273 of file bitmap_image.hpp.
References height(), and row().
Referenced by hierarchical_psnr_r().
|
inline |
Definition at line 293 of file bitmap_image.hpp.
References height(), offset(), and row().
|
inline |
Definition at line 320 of file bitmap_image.hpp.
References height(), and row().
|
inline |
Definition at line 400 of file bitmap_image.hpp.
References clear(), height(), and width().
Referenced by export_color_plane(), reflective_image(), region(), sobel_operator(), subsample(), and upsample().
|
inline |
Definition at line 920 of file bitmap_image.hpp.
References clear(), data(), and setwidth_height().
Referenced by test03().
|
inline |
Definition at line 1048 of file bitmap_image.hpp.
References clear(), data(), and setwidth_height().
Referenced by test04().
|
inline |
Definition at line 639 of file bitmap_image.hpp.
References row().
Referenced by reflective_image(), and test02().
|
inline |
Definition at line 380 of file bitmap_image.hpp.
Referenced by checkered_pattern(), convert_rsp_to_image(), hierarchical_psnr(), image_drawer::pen_width(), plasma(), psnr(), psnr_region(), reverse_channels(), setwidth_height(), sobel_operator(), subsample(), test08(), test15(), test16(), test17(), test18(), and upsample().