![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <bitmap.h>
Public Member Functions | |
| Bitmap () | |
| Bitmap (const Bitmap &other) | |
| Bitmap (Bitmap &&other) | |
| Bitmap (FIBITMAP *data) | |
| Bitmap & | operator= (const Bitmap &other) |
| Bitmap & | operator= (Bitmap &&other) |
| bool | Allocate (const int width, const int height, const bool as_rgb) |
| void | Deallocate () |
| const FIBITMAP * | Data () const |
| FIBITMAP * | Data () |
| int | Width () const |
| int | Height () const |
| int | Channels () const |
| unsigned int | BitsPerPixel () const |
| unsigned int | ScanWidth () const |
| bool | IsRGB () const |
| bool | IsGrey () const |
| size_t | NumBytes () const |
| std::vector< uint8_t > | ConvertToRawBits () const |
| std::vector< uint8_t > | ConvertToRowMajorArray () const |
| std::vector< uint8_t > | ConvertToColMajorArray () const |
| bool | GetPixel (const int x, const int y, BitmapColor< uint8_t > *color) const |
| bool | SetPixel (const int x, const int y, const BitmapColor< uint8_t > &color) |
| const uint8_t * | GetScanline (const int y) const |
| void | Fill (const BitmapColor< uint8_t > &color) |
| bool | InterpolateNearestNeighbor (const double x, const double y, BitmapColor< uint8_t > *color) const |
| bool | InterpolateBilinear (const double x, const double y, BitmapColor< float > *color) const |
| bool | ExifCameraModel (std::string *camera_model) const |
| bool | ExifFocalLength (double *focal_length) const |
| bool | ExifLatitude (double *latitude) const |
| bool | ExifLongitude (double *longitude) const |
| bool | ExifAltitude (double *altitude) const |
| bool | Read (const std::string &path, const bool as_rgb=true) |
| bool | Write (const std::string &path, const FREE_IMAGE_FORMAT format=FIF_UNKNOWN, const int flags=0) const |
| void | Smooth (const float sigma_x, const float sigma_y) |
| void | Rescale (const int new_width, const int new_height, const FREE_IMAGE_FILTER filter=FILTER_BILINEAR) |
| Bitmap | Clone () const |
| Bitmap | CloneAsGrey () const |
| Bitmap | CloneAsRGB () const |
| void | CloneMetadata (Bitmap *target) const |
| bool | ReadExifTag (const FREE_IMAGE_MDMODEL model, const std::string &tag_name, std::string *result) const |
| colmap::Bitmap::Bitmap | ( | ) |
Definition at line 69 of file bitmap.cc.
Referenced by Clone(), CloneAsGrey(), and CloneAsRGB().
|
explicit |
| bool colmap::Bitmap::Allocate | ( | const int | width, |
| const int | height, | ||
| const bool | as_rgb | ||
| ) |
Definition at line 104 of file bitmap.cc.
References data, height, and width.
Referenced by BOOST_AUTO_TEST_CASE(), CreateImageWithSquare(), colmap::RectifyAndUndistortStereoImages(), cloudViewer::MatchMatrixWidget::Show(), colmap::MatchMatrixWidget::Show(), colmap::mvs::NormalMap::ToBitmap(), colmap::mvs::DepthMap::ToBitmap(), colmap::UndistortImage(), colmap::WarpImageBetweenCameras(), and colmap::WarpImageWithHomographyBetweenCameras().
|
inline |
Definition at line 253 of file bitmap.h.
Referenced by BOOST_AUTO_TEST_CASE(), and ConvertToRawBits().
|
inline |
Definition at line 251 of file bitmap.h.
Referenced by BOOST_AUTO_TEST_CASE().
| Bitmap colmap::Bitmap::Clone | ( | ) | const |
Definition at line 586 of file bitmap.cc.
References Bitmap().
Referenced by BOOST_AUTO_TEST_CASE(), CloneAsGrey(), and CloneAsRGB().
| Bitmap colmap::Bitmap::CloneAsGrey | ( | ) | const |
Definition at line 588 of file bitmap.cc.
References Bitmap(), Clone(), and IsGrey().
Referenced by BOOST_AUTO_TEST_CASE(), and colmap::DetectLineSegments().
| Bitmap colmap::Bitmap::CloneAsRGB | ( | ) | const |
| void colmap::Bitmap::CloneMetadata | ( | Bitmap * | target | ) | const |
Definition at line 604 of file bitmap.cc.
References Data().
Referenced by colmap::RectifyAndUndistortStereoImages(), and colmap::UndistortImage().
| std::vector< uint8_t > colmap::Bitmap::ConvertToColMajorArray | ( | ) | const |
Definition at line 162 of file bitmap.cc.
Referenced by BOOST_AUTO_TEST_CASE().
| std::vector< uint8_t > colmap::Bitmap::ConvertToRawBits | ( | ) | const |
Definition at line 136 of file bitmap.cc.
References BitsPerPixel(), and ScanWidth().
Referenced by colmap::ExtractSiftFeaturesGPU().
| std::vector< uint8_t > colmap::Bitmap::ConvertToRowMajorArray | ( | ) | const |
Definition at line 147 of file bitmap.cc.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::DetectLineSegments(), colmap::ExtractCovariantSiftFeaturesCPU(), and colmap::ExtractSiftFeaturesCPU().
|
inline |
Definition at line 247 of file bitmap.h.
Referenced by BOOST_AUTO_TEST_CASE(), CloneMetadata(), and colmap::mvs::Image::Rescale().
| void colmap::Bitmap::Deallocate | ( | ) |
Definition at line 121 of file bitmap.cc.
Referenced by BOOST_AUTO_TEST_CASE().
| bool colmap::Bitmap::ExifAltitude | ( | double * | altitude | ) | const |
Definition at line 472 of file bitmap.cc.
References ReadExifTag(), and result.
Referenced by colmap::ImageReader::Next().
| bool colmap::Bitmap::ExifCameraModel | ( | std::string * | camera_model | ) | const |
Definition at line 306 of file bitmap.cc.
References ReadExifTag(), and patch::to_string().
Referenced by colmap::ImageReader::Next().
| bool colmap::Bitmap::ExifFocalLength | ( | double * | focal_length | ) | const |
Definition at line 336 of file bitmap.cc.
References colmap::CameraDatabase::QuerySensorWidth(), ReadExifTag(), and result.
Referenced by colmap::ImageReader::Next().
| bool colmap::Bitmap::ExifLatitude | ( | double * | latitude | ) | const |
Definition at line 416 of file bitmap.cc.
References ReadExifTag(), result, colmap::StringToLower(), and colmap::StringTrim().
Referenced by colmap::ImageReader::Next().
| bool colmap::Bitmap::ExifLongitude | ( | double * | longitude | ) | const |
Definition at line 444 of file bitmap.cc.
References ReadExifTag(), result, colmap::StringToLower(), and colmap::StringTrim().
Referenced by colmap::ImageReader::Next().
| void colmap::Bitmap::Fill | ( | const BitmapColor< uint8_t > & | color | ) |
Definition at line 226 of file bitmap.cc.
References color, IsGrey(), IsRGB(), x, and y.
Referenced by BOOST_AUTO_TEST_CASE(), CreateImageWithSquare(), cloudViewer::MatchMatrixWidget::Show(), colmap::MatchMatrixWidget::Show(), and colmap::mvs::DepthMap::ToBitmap().
| bool colmap::Bitmap::GetPixel | ( | const int | x, |
| const int | y, | ||
| BitmapColor< uint8_t > * | color | ||
| ) | const |
Definition at line 178 of file bitmap.cc.
References color, IsGrey(), IsRGB(), x, and y.
Referenced by colmap::BitmapToQImageRGB(), BOOST_AUTO_TEST_CASE(), and InterpolateNearestNeighbor().
| const uint8_t * colmap::Bitmap::GetScanline | ( | const int | y | ) | const |
|
inline |
Definition at line 250 of file bitmap.h.
Referenced by colmap::BitmapToQImageRGB(), BOOST_AUTO_TEST_CASE(), colmap::DetectLineSegments(), colmap::ExtractCovariantSiftFeaturesCPU(), colmap::ExtractSiftFeaturesCPU(), colmap::ExtractSiftFeaturesGPU(), colmap::ImageReader::Next(), colmap::RectifyAndUndistortStereoImages(), colmap::mvs::Image::SetBitmap(), colmap::UndistortImage(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomography(), and colmap::WarpImageWithHomographyBetweenCameras().
| bool colmap::Bitmap::InterpolateBilinear | ( | const double | x, |
| const double | y, | ||
| BitmapColor< float > * | color | ||
| ) | const |
Definition at line 248 of file bitmap.cc.
References color, cloudViewer::utility::floor(), IsGrey(), IsRGB(), x, and y.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::Reconstruction::ExtractColorsForAllImages(), colmap::Reconstruction::ExtractColorsForImage(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomography(), and colmap::WarpImageWithHomographyBetweenCameras().
| bool colmap::Bitmap::InterpolateNearestNeighbor | ( | const double | x, |
| const double | y, | ||
| BitmapColor< uint8_t > * | color | ||
| ) | const |
Definition at line 241 of file bitmap.cc.
References color, GetPixel(), x, and y.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 263 of file bitmap.h.
Referenced by BOOST_AUTO_TEST_CASE(), CloneAsGrey(), colmap::DetectLineSegments(), colmap::ExtractCovariantSiftFeaturesCPU(), colmap::ExtractSiftFeaturesCPU(), colmap::ExtractSiftFeaturesGPU(), Fill(), GetPixel(), InterpolateBilinear(), and SetPixel().
|
inline |
Definition at line 261 of file bitmap.h.
Referenced by BOOST_AUTO_TEST_CASE(), CloneAsRGB(), Fill(), GetPixel(), InterpolateBilinear(), colmap::RectifyAndUndistortStereoImages(), SetPixel(), colmap::UndistortImage(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomography(), and colmap::WarpImageWithHomographyBetweenCameras().
| size_t colmap::Bitmap::NumBytes | ( | ) | const |
Definition at line 128 of file bitmap.cc.
References ScanWidth().
Referenced by BOOST_AUTO_TEST_CASE().
| bool colmap::Bitmap::Read | ( | const std::string & | path, |
| const bool | as_rgb = true |
||
| ) |
Definition at line 485 of file bitmap.cc.
References colmap::ExistsFile(), format, and cloudViewer::t::geometry::path.
Referenced by colmap::EstimateManhattanWorldFrame(), colmap::Reconstruction::ExtractColorsForAllImages(), colmap::Reconstruction::ExtractColorsForImage(), colmap::ImageReader::Next(), cloudViewer::ImageViewerWidget::ReadAndShow(), colmap::ImageViewerWidget::ReadAndShow(), cloudViewer::FeatureImageViewerWidget::ReadAndShowWithKeypoints(), colmap::FeatureImageViewerWidget::ReadAndShowWithKeypoints(), cloudViewer::FeatureImageViewerWidget::ReadAndShowWithMatches(), colmap::FeatureImageViewerWidget::ReadAndShowWithMatches(), cloudViewer::PointViewerWidget::Show(), and colmap::PointViewerWidget::Show().
| bool colmap::Bitmap::ReadExifTag | ( | const FREE_IMAGE_MDMODEL | model, |
| const std::string & | tag_name, | ||
| std::string * | result | ||
| ) | const |
Definition at line 610 of file bitmap.cc.
References result.
Referenced by ExifAltitude(), ExifCameraModel(), ExifFocalLength(), ExifLatitude(), and ExifLongitude().
| void colmap::Bitmap::Rescale | ( | const int | new_width, |
| const int | new_height, | ||
| const FREE_IMAGE_FILTER | filter = FILTER_BILINEAR |
||
| ) |
Definition at line 581 of file bitmap.cc.
Referenced by BOOST_AUTO_TEST_CASE(), colmap::mvs::Image::Rescale(), colmap::WarpImageBetweenCameras(), and colmap::WarpImageWithHomographyBetweenCameras().
|
inline |
Definition at line 257 of file bitmap.h.
Referenced by ConvertToRawBits(), colmap::ExtractSiftFeaturesGPU(), and NumBytes().
| bool colmap::Bitmap::SetPixel | ( | const int | x, |
| const int | y, | ||
| const BitmapColor< uint8_t > & | color | ||
| ) |
Definition at line 199 of file bitmap.cc.
References color, IsGrey(), IsRGB(), x, and y.
Referenced by BOOST_AUTO_TEST_CASE(), CreateImageWithSquare(), cloudViewer::MatchMatrixWidget::Show(), colmap::MatchMatrixWidget::Show(), colmap::mvs::NormalMap::ToBitmap(), colmap::mvs::DepthMap::ToBitmap(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomography(), and colmap::WarpImageWithHomographyBetweenCameras().
Definition at line 553 of file bitmap.cc.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 249 of file bitmap.h.
Referenced by colmap::BitmapToQImageRGB(), BOOST_AUTO_TEST_CASE(), colmap::DetectLineSegments(), colmap::ExtractCovariantSiftFeaturesCPU(), colmap::ExtractSiftFeaturesCPU(), colmap::ImageReader::Next(), colmap::RectifyAndUndistortStereoImages(), colmap::mvs::Image::SetBitmap(), colmap::UndistortImage(), colmap::WarpImageBetweenCameras(), colmap::WarpImageWithHomography(), and colmap::WarpImageWithHomographyBetweenCameras().
| bool colmap::Bitmap::Write | ( | const std::string & | path, |
| const FREE_IMAGE_FORMAT | format = FIF_UNKNOWN, |
||
| const int | flags = 0 |
||
| ) | const |
Definition at line 523 of file bitmap.cc.
References format, and cloudViewer::t::geometry::path.