Skip to main content

MimHistogram

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Generate the intensity histogram of an image.

Syntax

void MimHistogram(
AIL_ID SrcImageBufId, //in
AIL_ID HistResultImId //out
)

Description

This function calculates the histogram (or pixel intensity distribution) of the specified source image and stores the results in the specified result buffer.

You can control the bin size of the calculated histogram, and the number of smoothing iterations to perform on it, by calling MimControl with M_HIST_BIN_SIZE_MODE and M_HIST_SMOOTHING_ITERATIONS. By default, a histogram has 1 value per bin, and has not been smoothed.

To read the resulting histogram values from the result buffer, use MimGetResult1d or MimGetResult, and specify M_CUMULATIVE_VALUE, M_HIST_..., M_PERCENTILE_VALUE, or M_VALUE as the result type.

You can limit this function's results to a region of an image buffer using a region of interest (ROI) set using MbufSetRegion. The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR).

Parameters

SrcImageBufId (in, AIL_ID)

Specifies the identifier of the source image buffer. The image buffer must be 1-band.

HistResultImId (out, AIL_ID)

Specifies the identifier of the destination for the histogram results. This parameter must be given the identifier of an image processing result buffer that was allocated with MimAllocResult and has an M_HIST_LIST type.

Copyright © 2026 Zebra Technologies.