 |
Zivid C++ API
1.8.1+6967bc1b-1
Defining the Future of 3D Machine Vision
|
Go to the documentation of this file.
51 #include <type_traits>
59 static_assert(
sizeof(RGBA8) == 4,
"RGBA8 must be packed");
61 template<
class PixelFormat>
66 template<
class PixelFormat>
70 static_assert(std::is_same<PixelFormat, Zivid::RGBA8>::value,
"PixelFormat must be Zivid::RGBA8.");
87 const PixelFormat &
operator()(
size_t idx)
const
95 const PixelFormat &
operator()(
size_t i,
size_t j)
const
109 : m_impl(std::make_shared<
ImageImpl<PixelFormat>>(std::move(imageImpl)))
114 std::shared_ptr<ImageImpl<PixelFormat>> m_impl;
ZIVID_API_EXPORT_TEMPLATE_H size_t height() const
Return height (number of rows) of image
uint8_t r
Definition: Image.h:136
const PixelFormat & operator()(size_t idx) const
Obtain a constant reference to a pixel given by a 1D linear index.
Definition: Image.h:126
uint8_t b
Definition: Image.h:136
uint8_t g
Definition: Image.h:136
ZIVID_API_EXPORT_TEMPLATE_H void save(const std::string &fileName) const
Save the image to a file. The supported file type is PNG with extension .png. This method will throw ...
#define ZIVID_API_EXPORT_TEMPLATE_H
Definition: APIExport.h:76
ZIVID_API_EXPORT_TEMPLATE_H std::string toString() const
Get image information as string
ZIVID_API_EXPORT_TEMPLATE_H size_t size() const
Return number of pixels in the image
uint8_t a
Definition: Image.h:136
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:52
const ZIVID_API_EXPORT_TEMPLATE_H PixelFormat * dataPtr() const
Obtain a pointer to the first pixel in the image. The pointer is valid for the lifetime of this objec...
ZIVID_API_EXPORT_TEMPLATE_H size_t width() const
Return width (number of columns) of image
A 2-dimensional image stored on the host. The format of each pixel is given by template parameter Pix...
Definition: Image.h:106