#include <MultiSenseTypes.hh>
Public Member Functions | |
Histogram () | |
Public Attributes | |
uint32_t | bins |
uint32_t | channels |
std::vector< uint32_t > | data |
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
{.cpp} // // Instantiate a channel connecting to a sensor at the factory default // IP address crl::multisense::Channel* channel; channel = crl::multisense::Channel::Create("10.66.171.21"); channel->setMtu(7200); // // Create a histogram instance to store histogram data crl::multisense::image::Histogram histogram; 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 if(crl::multisense::Status_Ok != status) { throw std::runtime_error("Unable to query image histogram for frameId %d", frameId); } // // Destroy the channel instance crl::multisense::Channel::Destroy(channel);
Definition at line 1113 of file MultiSenseTypes.hh.
crl::multisense::image::Histogram::Histogram | ( | ) | [inline] |
Default constructor
Definition at line 1119 of file MultiSenseTypes.hh.
The number of possible pixel values for each color channel
Definition at line 1126 of file MultiSenseTypes.hh.
The number of color channels in the given histogram. For color images this is 4 corresponding to the GRBG Bayer channels
Definition at line 1121 of file MultiSenseTypes.hh.
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 1129 of file MultiSenseTypes.hh.