Back to FabImage Library website
You are here: Start » Function Reference » Image » Image Features » ImageProjection
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Computes the average (or other statistic) for each image row or column and then merges the obtained results into a profile.
Syntax
C++
C#
void fil::ImageProjection ( const fil::Image& inImage, ftl::Optional<const fil::Region&> inRoi, fil::ProjectionDirection::Type inProjectionDirection, fil::ProjectionMode::Type inProjectionMode, fil::Profile& outProfile )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inImage | const Image& | Monochromatic image | |
![]() |
inRoi | Optional<const Region&> | NIL | Range of pixels to be processed |
![]() |
inProjectionDirection | ProjectionDirection::Type | Combine pixel values for image rows (horizontal) or columns (vertical) | |
![]() |
inProjectionMode | ProjectionMode::Type | Sum | Determines how the pixel values are combined |
![]() |
outProfile | Profile& | Output profile |
Requirements
For input inImage only pixel formats are supported: 1⨯uint8, 1⨯int8, 1⨯uint16, 1⨯int16, 1⨯int32, 1⨯real.
Read more about pixel formats in Image documentation.
Description
Computes the average (or other statistic) for each image row or column and then merges the obtained results into a profile.
Examples
ImageProjection performed on a lena sample.
Mode | Horizontal Direction | Vertical Direction |
---|---|---|
Sum | ![]() |
![]() |
Average | ![]() |
![]() |
Maximum | ![]() |
![]() |
Minimum | ![]() |
![]() |
Median | ![]() |
![]() |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Region exceeds an input image in ImageProjection. |
DomainError | Not supported inImage pixel format in ImageProjection. Supported formats: 1xUInt8, 1xInt8, 1xUInt16, 1xInt16, 1xInt32, 1xReal. |