MimHistogram()函数

Synopsis

Generate the intensity histogram of an image buffer.

Format

void MimHistogram(SrcImageBufId, HistImResultId)

MIL_ID SrcImageBufId; Source image buffer identifier
MIL_ID HistImResultId; Histogram image processing result buffer identifier

Description

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

You can read the histogram values from the result buffer, using MimGetResult1d or MimGetResult, specifying M_VALUE as the result type.

The SrcImageBufId parameter specifies the identifier of the data source of the operation. This parameter will be treated as an unsigned image buffer identifier.

The HistImResultId parameter 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. If the result buffer has fewer entries than the full range of source values, the pixels that are out of range will not be written into the histogram.

Note

Floating point values will be cast as unsigned long values before performing the histogram. Therefore, unexpected results can occur if a floating point value is larger than the unsigned long range.

See also

MimHistogramEqualize, MimAllocResult

《MimHistogram()函数》上有2条评论

评论已关闭。