Argus Nonlinear Histogram Api

Unable to create Nonlinear Histogram Interface…

hello 01fe20bec061,

may I know what’s the actual use-case, and… which camera module you’re using, Argus API it only works with bayer camera sensors.

Camera is Econ imx415 sensor

std::vector< BayerTuple<uint32_t> > histogram;
const IBayerHistogram* bayerHistogram =
interface_cast(iMetadata->getBayerHistogram());
if (!bayerHistogram || bayerHistogram->getHistogram(&histogram) != STATUS_OK)
ORIGINATE_ERROR(“Failed to get histogram data\n”);

                  std::vector< BayerTuple<float> >binValues
           
              const Ext::INonLinearHistogram* iNonLinearHistogram =
                    interface_cast<const Ext::INonLinearHistogram>(iMetadata->getBayerHistogram());       
              if(! iNonLinearHistogram|| iNonLinearHistogram->getHistogramBinValues(&binValues) != STATUS_OK)
                      ORIGINATE_ERROR("Failed to get NON LINEAR histogram data\n");

CANNOT create interface

hello 01fe20bec061,

please check MMAPI developer guide, for example, Argus::ICaptureMetadata::getBayerHistogram.
it uses metadata to read the Bayer histogram, please check you’re able to get Argus metadata.
please also refer to Argus sample, Argus/public/samples/histogram/main.cpp for using this API.
thanks

I m editing histogram sample code itself and added Nonlinear Histogram API after Bayer Histogram but iNonLinearHistogram interface is NULL .

hello 01fe20bec061,

is the metadata contain Bayer histogram, for example, are you able read that correctly?

Able to read Bayer histogram and other metadata correctly like getscenelux …

this interface will only be exposed in case the histogram is compressed.

How to check whether the data is compressed …

hello 01fe20bec061,

it’s from sensor side.
may I know what’s the actual use-case, don’t you able to read the Bayer histogram?

Use it for Tonecurve Api which accepts float values

hello 01fe20bec061,

please point-out which API you’re going to used.
besides, you may normalize them with active dimension to obtain float values.

settonemapcurve and gettonemapcurve

hello 01fe20bec061,

it’s Argus::IAutoControlSettings::setToneMapCurve to set the user-specified tone map curve.
here’s pseudo code as an example to setToneMapCurve.
const std::vector<float> tonemap_R(ToneMapR_Size, 0.2f);
autocontrol->setToneMapCurve(RGB_CHANNEL_R, tonemap_R));

BTW,
you may also check this for demonstration of tone-mapping.

Can we display the tonemap curve and frames on live camera preview

there’s no sample application for demonstration at the moment.

Hello JerryChang
How does tonemapcurve output looks like and how can it be displayed on screen

you may also check my previous comment #16 for the external link for demonstration of tone-mapping.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.