A histogram returned by the histogram generator. More...
Public Member Functions |
|
Histogram () | |
The default constructor is an invalid histogram storing no data. |
|
Histogram (unsigned buckets, unsigned channels, Rect region) | |
Make a new empty histogram of the given number of buckets and channels. |
|
unsigned | operator() (int b, int c) const |
Sample the histogram at a particular bucket in a particular image channel. |
|
unsigned & | operator() (int b, int c) |
Acquire a reference to a particular histogram entry. |
|
unsigned | operator() (int b) const |
Sample the histogram at a particular bucket, summed over all channels. |
|
bool | valid () const |
Is it safe to dereference data and/or call operator(). |
|
unsigned * | data () |
Access to the raw histogram data. |
|
unsigned | buckets () const |
How many buckets does this histogram have. |
|
unsigned | channels () const |
How many channels does this histogram have. |
|
Rect | region () const |
What region of the image was this histogram computed over. |
A histogram returned by the histogram generator.
Before you dereference the data, check if valid is true. Even if you requested a histogram, you're not guaranteed to get one back in all cases.
FCam::Histogram::Histogram | ( | ) | [inline] |
The default constructor is an invalid histogram storing no data.
FCam::Histogram::Histogram | ( | unsigned | buckets, | |
unsigned | channels, | |||
Rect | region | |||
) | [inline] |
Make a new empty histogram of the given number of buckets and channels.
unsigned FCam::Histogram::operator() | ( | int | b, | |
int | c | |||
) | const [inline] |
Sample the histogram at a particular bucket in a particular image channel.
The absolute number should not be relied on, because the histogram is computed over the bayer-mosaiced raw sensor data, which may be a different resolution to the actual output image if the imaging pipe is doing some resizing. If color histograms are available, the order of the channels is RGB, which will be in the sensor's raw color space. Despite there being twice as many green samples on the raw sensor, the green channel is normalized to have roughly the same total count as red and blue.
unsigned& FCam::Histogram::operator() | ( | int | b, | |
int | c | |||
) | [inline] |
Acquire a reference to a particular histogram entry.
Useful for creating your own histograms.
unsigned FCam::Histogram::operator() | ( | int | b | ) | const [inline] |
Sample the histogram at a particular bucket, summed over all channels.
bool FCam::Histogram::valid | ( | ) | const [inline] |
Is it safe to dereference data and/or call operator().
unsigned* FCam::Histogram::data | ( | ) | [inline] |
Access to the raw histogram data.
Stored similarly to an image: first bucket, then color channel.
unsigned FCam::Histogram::buckets | ( | ) | const [inline] |
How many buckets does this histogram have.
unsigned FCam::Histogram::channels | ( | ) | const [inline] |
How many channels does this histogram have.
Rect FCam::Histogram::region | ( | ) | const [inline] |
What region of the image was this histogram computed over.
Copyright (c) 2012, Nokia Corporation and/or its subsidiary(-ies). All rights reserved. See Copyright. |
MeeGo 1.2 Harmattan API
|