LibMultiSense
LibMultiSense Documentation
crl::multisense::image::Histogram Class Reference

Class which stores a image histogram from a camera image. More...

#include <MultiSenseTypes.hh>

Public Member Functions

 Histogram ()
 Default constructor. More...
 

Public Attributes

uint32_t channels
 The number of color channels in the given histogram. More...
 
uint32_t bins
 The number of possible pixel values for each color channel. More...
 
std::vector< uint32_t > data
 The histogram data concatinated serially in GRBG order. More...
 

Detailed Description

Class which stores a image histogram from a camera image.

This is used as an input when querying a image histogram.

Example code to query a image histogram for a left image corresponding to frameId 100

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create a histogram instance to store histogram data
uint64_t frameId = 100;
//
// Query the histogram from the image with the frameId == 100.
// Note histograms can only be queried for images whose frameIds are
// less than 20 frameIds away from the most recent received frameId
crl::multisense::Status status = channel->getImageHistogram(frameId, histogram);
//
// Check to see if the histogram query succeeded
throw std::runtime_error("Unable to query image histogram for frameId %d", frameId);
}
//
// Destroy the channel instance

Definition at line 1949 of file MultiSenseTypes.hh.

Constructor & Destructor Documentation

◆ Histogram()

crl::multisense::image::Histogram::Histogram ( )
inline

Default constructor.

Definition at line 1955 of file MultiSenseTypes.hh.

Member Data Documentation

◆ bins

uint32_t crl::multisense::image::Histogram::bins

The number of possible pixel values for each color channel.

Definition at line 1962 of file MultiSenseTypes.hh.

◆ channels

uint32_t crl::multisense::image::Histogram::channels

The number of color channels in the given histogram.

For color images this is 4 corresponding to the GRBG Bayer channels

Definition at line 1957 of file MultiSenseTypes.hh.

◆ data

std::vector<uint32_t> crl::multisense::image::Histogram::data

The histogram data concatinated serially in GRBG order.

The length of data is equal to channels * bins

Definition at line 1965 of file MultiSenseTypes.hh.


The documentation for this class was generated from the following file:
crl::multisense::Channel
Class which manages all communications with a MultiSense device.
Definition: MultiSenseChannel.hh:69
crl::multisense::Status_Ok
static CRL_CONSTEXPR Status Status_Ok
Definition: MultiSenseTypes.hh:98
crl::multisense::image::Histogram
Class which stores a image histogram from a camera image.
Definition: MultiSenseTypes.hh:1949
crl::multisense::Channel::getImageHistogram
virtual Status getImageHistogram(int64_t frameId, image::Histogram &histogram)=0
Get the image histogram for the image corresponding to a specified frameId.
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Destroy a channel instance that was created using the static member function Channel::Create().
crl::multisense::Status
int32_t Status
General status typdef used as a return value for get/set crl::multisense::Channel methods.
Definition: MultiSenseTypes.hh:93
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
Set the current sensor's MTU.
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Create a Channel instance, used to manage all communications with a sensor.