1 #ifndef __PBIO_API__PBIO__RAW_IMAGE_H_409ecb3ab16c416ea44ca0828ae7d624
2 #define __PBIO_API__PBIO__RAW_IMAGE_H_409ecb3ab16c416ea44ca0828ae7d624
9 #include "InternalImageBuffer.h"
15 class CameraCalibrator;
75 unsigned char const*
data,
76 std::size_t size = 0);
186 CapiData makeCapiData()
const;
191 std::vector<unsigned char> buffer;
209 , crop_info_offset_x(-1)
210 , crop_info_offset_y(-1)
211 , crop_info_data_image_width(-1)
212 , crop_info_data_image_height(-1)
222 , format((
Format) a.format())
224 , crop_info_offset_x(-1)
225 , crop_info_offset_y(-1)
226 , crop_info_data_image_width(-1)
227 , crop_info_data_image_height(-1)
239 , crop_info_offset_x(-1)
240 , crop_info_offset_y(-1)
241 , crop_info_data_image_width(-1)
242 , crop_info_data_image_height(-1)
243 , internal_image_buffer(a)
254 unsigned char const* data,
255 const std::size_t size)
260 , crop_info_offset_x(-1)
261 , crop_info_offset_y(-1)
262 , crop_info_data_image_width(-1)
263 , crop_info_data_image_height(-1)
267 memcpy(&buffer[0], data, size);
268 this->data = buffer.data();
302 RawImage::CapiData RawImage::makeCapiData()
const
306 result.width =
width;
315 PBI0x3dfb4fe3Assert(0x02a169c4,
data,
"RawImage with NULL data used");
317 if(internal_image_buffer)
319 PBI0x3dfb4fe3Assert(0xb0be4ddd,
data == internal_image_buffer->data,
320 "RawImage data does not match corresponding InternalImageBuffer");
322 PBI0x3dfb4fe3Assert(0x951aadf1,
width == internal_image_buffer->width,
323 "RawImage width does not match corresponding InternalImageBuffer");
325 PBI0x3dfb4fe3Assert(0x88d7c6fc,
height == internal_image_buffer->height,
326 "RawImage height does not match corresponding InternalImageBuffer");
328 PBI0x3dfb4fe3Assert(0xd7008c02,
format == internal_image_buffer->format,
329 "RawImage format does not match corresponding InternalImageBuffer");
331 result.format |= InternalImageBuffer::FORMAT_FLAG__DATA_IMAGET;
333 result.data = internal_image_buffer->imagetptr_ptr;
342 #endif // __PBIO_API__PBIO__RAW_IMAGE_H_409ecb3ab16c416ea44ca0828ae7d624
int width
Width of the rectangle.
Definition: Rectangle.h:47
int crop_info_offset_x
Cropping offset along the x axis. This value is set in the RawImage::crop member function.
Definition: RawImage.h:142
Struct that provides raw image data and optional cropping information.
Definition: RawImage.h:28
Interface object for creating other interface objects.
Definition: FacerecService.h:64
int x
X coordinate of the top-left corner.
Definition: Rectangle.h:33
Interface object that stores a captured face sample.
Definition: RawSample.h:49
LightSmartPtr< InternalImageBuffer >::tPtr Ptr
Alias for the type of a smart pointer to InternalImageBuffer.
Definition: InternalImageBuffer.h:34
int crop_info_data_image_width
Image width before RawImage::crop. This value is set in the RawImage::crop member function...
Definition: RawImage.h:158
IRawImage - Raw image interface.
pbio::IRawImage::Format Format
Format of image data.
Definition: RawImage.h:38
int width
Image width.
Definition: RawImage.h:109
bool with_crop
Flag, which indicates that croppping info is initialized. This value is set in the RawImage::crop mem...
Definition: RawImage.h:134
int crop_info_offset_y
Cropping offset along the y axis. This value is set in the RawImage::crop member function.
Definition: RawImage.h:150
Format format
Format of image data.
Definition: RawImage.h:125
VideoWorker is an interface object for tracking, processing and matching faces on multiple video stre...
Definition: VideoWorker.h:63
int height
Height of the rectangle.
Definition: Rectangle.h:54
Raw image interface. To use this interface, you need to inherit it and create your own implementation...
Definition: IRawImage.h:30
unsigned char const * data
Pointer to the image data buffer. All pixels must be stored continuously, row by row, without gaps at the end of each row.
Definition: RawImage.h:101
Rectangle in an image.
Definition: Rectangle.h:12
int crop_info_data_image_height
Image height before RawImage::crop. This value is set in the RawImage::crop member function...
Definition: RawImage.h:166
int height
Image height.
Definition: RawImage.h:117
RawImage()
Default constructor.
Definition: RawImage.h:203
Interface object for detecting or tracking of faces in the images or video sequences.
Definition: Capturer.h:16
VideoWorker is an interface object for tracking, processing and matching faces on multiple video stre...
Definition: VideoWorker.h:105
Interface object for detecting or tracking of faces in the images or video sequences.
Definition: Capturer.h:36
Interface object that stores a captured face sample.
Definition: RawSample.h:125
Interface object for camera calibration and correction of image distortion.
Definition: CameraCalibrator.h:39
int y
Y coordinate of the top-left corner.
Definition: Rectangle.h:40
RawImage crop(const Rectangle rectangle) const
Create RawImage that represents the specified rectangle area of this image.
Definition: RawImage.h:277
Definition: FacerecService.mm:79
Format
Format of image data.
Definition: IRawImage.h:46