| Customize Help
| Save Settings

MimProjection



Function Map
Synopsis
Project a 2D image into 1D.
Syntax
void MimProjection(
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufOrResultImId, //in
MIL_DOUBLE ProjectionAxisAngle, //in
MIL_INT64 Operation, //in
MIL_DOUBLE OperationValue //in
)
Description

This function projects a two-dimensional image into one dimension, based on the specified projection operation and projection axis angle, writing results to the specified projection image processing result buffer or a destination image buffer. The results are generated based on the specified operation and calculated along each lane of pixels in the image, perpendicular to the specified projection axis angle. The 90° projection of the image (lanes = rows) using a summation operation is known as the row profile; the 0° projection (lanes = columns) as the column profile.

Writing results to a projection image processing result buffer allows you to manipulate results using an array once you have retrieved the results using MimGetResult() or MimGetResult1d().

You can limit this function's results to a region of the source image buffer using a region of interest (ROI) set using MbufSetRegion().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
SrcImageBufId

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

This image buffer can have an 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).

DstImageBufOrResultImId

Specifies the destination buffer in which to write the projection results.

function map For specifying the projection result buffer identifier or a destination image buffer
Click to summarizeValue Description
Click to summarize Destination image buffer ID

Specifies the identifier of an image buffer allocated with MbufAlloc...(). The destination image buffer must have the same data type (unsigned, signed, or float) as the source buffer. For an M_SUM operation, this image buffer must be of 32-bit depth. For a M_MAX, M_MEDIAN, or M_MIN operation, this image buffer can have a depth greater than or equal to that of the source image buffer.

(summarize)
Click to summarize Destination result buffer ID

Specifies the identifier of an image processing result buffer allocated using MimAllocResult() with M_PROJ_LIST. The buffer should have as many locations as there are lanes to project in the image perpendicular to the specified projection axis angle.

You can read the projection values from the result buffer using MimGetResult1d() or MimGetResult() with M_VALUE.

(summarize)
ProjectionAxisAngle

Specifies the angle of the projection axis. Lanes are perpendicular to this angle. This parameter can be set to one of the following:

function map For specifying the angle of projection in degrees
Click to summarizeValue Description
Click to summarize M_0_DEGREE

Specifies a projection onto the axis at 0° (lanes = columns).

Click to summarize M_90_DEGREE

Specifies a projection onto the axis at 90° (lanes = rows).

Operation

Specifies the operation to perform.

The following operations are supported.

function map For specifying the type of operation
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_SUM.

Click to summarize M_MAX

Specifies to find the maximum pixel value along each lane.

Click to summarize M_MEAN

Specifies to find the mean pixel value along each lane.

Click to summarize M_MEDIAN

Specifies to find the median pixel value along each lane.

Click to summarize M_MIN

Specifies to find the minimum pixel value along each lane.

Click to summarize M_SUM

Specifies to sum all pixel values along each lane.

Note that, if the sum of pixels in any lane is larger than the depth of the result buffer or destination image buffer, the result will be undefined.

(summarize)
OperationValue

Reserved for future expansion. This parameter must be set to M_NULL.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC VECTOR 0 DEGREE 90 DEGREE DEFAULT MAX MEAN MEDIAN MIN SUM