Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

Querying image information: horizontal and vertical intensity profile

First, create an object of the type "PixelColumn" for the corresponding column. Then, read out a vector with the existing color channels. For each color channel there is a vector with values for each pixel of the column.

Accessing the image column at position x = 100 or image row at position y = 200 (peak::ipl::Image)

Note: The IDS peak IPL is described in a separate documentation.

genericC++

peak::ipl::PixelColumn col(image, 100);
peak::ipl::PixelRow row(image, 200);

Querying the number of color channels

The number of color channels is the same for row and column.

genericC++

int numberChannelsColumn = col.Channels().size();
int numberChannelsRow = row.Channels().size();

Accessing the individual color channels of the image

Depending on whether the format is RGB or BGR, the first channel in the vector (index = 0) has red or blue pixel values. In a Bayer image, the number of channels = 1 and the pixel values are Bayer pixels.

genericC++

auto channelsColumn = col.Channels();
auto channelsRow = row.Channels();
 
auto channel = channelsColumn.at(0);

Accessing the values in each color channel

genericC++

auto values = channel.Values;

Combined call

genericC++

peak::ipl::PixelRow row(image, 200);
auto values = row.Channels().at(0).Values

Example: Iteration through the whole image in y-direction (each line, each pixel value per line)

Histogram

You can retrieve a histogram over the complete image as follows. The procedure is similar to the horizontal and vertical intensity profile.

Generating the histogram

genericC++

peak::ipl::Histogram histogram(image);

Querying the number of channels

genericC++

auto numberChannels = histogram.Channels().size();

Getting a special channel

genericC++

auto channel = histogram.Channels().at(0);

Getting the frequency of a special pixel value in the corresponding channel

An 8-bit/channel image may have pixel values from 0 to 255 per channel. The frequency of a pixel value in the whole image is summed up in the histogram. For each pixel value from 0 to 255 there is a so-called "bin", which can be used to read out the frequency. For example, you can use the bin at position 14 in the vector to read out how often the pixel value 14 is present in the whole image (in the corresponding channel).

genericC++

auto numberOfBins = channel.Bins.size();
auto numberOfValue_14 = channel.Bins.at(14);

© 2024 IDS Imaging Development Systems GmbH