GRASP::Ladybug::StreamFileDecoded Class Reference

Main interface to the Ladybug image stream (.PGR) file. More...

#include <lb_stream_file.h>

Inheritance diagram for GRASP::Ladybug::StreamFileDecoded:

GRASP::Ladybug::StreamFile GRASP::Ladybug::StreamHeader

List of all members.

Public Member Functions

 StreamFileDecoded (std::string &file_name, bool read_calibration=true)
ImageHeader GetUncompressedFrame (uint32_t frame_number, uint32_t camera_number, std::vector< uint8_t > &RGB, uint32_t &width, uint32_t &height, BAYER_QUALITY quality=NEAREST_NEIGHBOR) const
ImageHeader WriteJpegFrame (uint32_t frame_number, uint32_t camera_number, uint32_t jpeg_quality, const std::string &file_name, BAYER_QUALITY quality=NEAREST_NEIGHBOR) const

Protected Attributes

std::vector< uint8_t > C0J
std::vector< uint8_t > C1J
std::vector< uint8_t > C2J
std::vector< uint8_t > C3J
std::vector< uint8_t > C0
std::vector< uint8_t > C1
std::vector< uint8_t > C2
std::vector< uint8_t > C3
std::vector< uint8_t > Bayer


Detailed Description

Main interface to the Ladybug image stream (.PGR) file.

This class provides access to all data available in the Ladybug stream file (.PGR), including header information, calibration and uncompressed image data. You can also use it to write out jpeg-compressed frames directly.

For calibration data retrieval use GetCalibrationData() from StreamFile class. For stream header data retrieval, see interface of StreamHeader class.

Author:
Oleg Naroditsky { narodits@cis.upenn.edu }

Constructor & Destructor Documentation

GRASP::Ladybug::StreamFileDecoded::StreamFileDecoded ( std::string &  file_name,
bool  read_calibration = true 
)

Constructor

Parameters:
file_name name of the stream (.PGR) file
read_calibration read the calibration information from stream file (200K)


Member Function Documentation

ImageHeader GRASP::Ladybug::StreamFileDecoded::GetUncompressedFrame ( uint32_t  frame_number,
uint32_t  camera_number,
std::vector< uint8_t > &  RGB,
uint32_t &  width,
uint32_t &  height,
BAYER_QUALITY  quality = NEAREST_NEIGHBOR 
) const

Retrieve an uncompressed RGB frame. It's a "const" with respect to the stream file.

Parameters:
frame_number frame number from the stream (from 0 to GetNumberOfImages()-1)
camera_number ladybug camera (from 0 to 5)
RGB vector of interleaved RGB pixels (RGBRGBRGB...) of size width*height*3
width width of RGB image
height height of RGB image

ImageHeader GRASP::Ladybug::StreamFileDecoded::WriteJpegFrame ( uint32_t  frame_number,
uint32_t  camera_number,
uint32_t  jpeg_quality,
const std::string &  file_name,
BAYER_QUALITY  quality = NEAREST_NEIGHBOR 
) const

Write one frame of the stream as a jpeg file.

Parameters:
frame_number frame number from the stream (from 0 to GetNumberOfImages()-1)
camera_number ladybug camera (from 0 to 5)
file_name name of the file to write


The documentation for this class was generated from the following files:
Generated on Tue May 19 13:50:32 2009 by  doxygen 1.5.3