You are here: Start » AVL.NET » Function Reference » Point3DGrid » Point3DGrid Basics » AVL.CreatePoint3DGridFromImage

AVL.CreatePoint3DGridFromImage

Creates a Point3DGrid structure from coordinates encoded in pixels of image.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CreatePoint3DGridFromImage
(
	AvlNet.Image inImage,
	AvlNet.PointCloudCoordinateTransform inXCoordinateTransform,
	AvlNet.PointCloudCoordinateTransform inYCoordinateTransform,
	AvlNet.PointCloudCoordinateTransform inZCoordinateTransform,
	AvlNet.Point3DGrid outPoint3DGrid
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageSource image with per pixel encoded XYZ coordinates.
inXCoordinateTransformAvlNet.PointCloudCoordinateTransformPointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 0 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) )Description of the creation of the X coordinate. Default value: PointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 0 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) ).
inYCoordinateTransformAvlNet.PointCloudCoordinateTransformPointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 1 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) )Description of the creation of the Y coordinate. Default value: PointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 1 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) ).
inZCoordinateTransformAvlNet.PointCloudCoordinateTransformPointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 2 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) )Description of the creation of the Z coordinate. Default value: PointCloudCoordinateTransform ( Offset: 0.000000D ValueCoordinateTransform: ImageValueCoordinateTransform( ChannelIndex: 2 Scale: 1.0D InvalidValues: Nil ) LocationCoordinateTransform: Nil Limits: ValueLimits_f64( MinValue: Nil, MaxValue: Nil ) ).
outPoint3DGridAvlNet.Point3DGrid

Description

The operation creates a point cloud object based on the input point image. Coordinates of points included in the cloud are created based on inXCoordinateTransform, inYCoordinateTransform and inYCoordinateTransform. The listed structures describe the transformation of pixel values and their indexes to a given coordinate. At least one of the transforms based on pixel location or value must be present in PointCloudCoordinateTransform.

Example for the coordination of x. We assume that inXCoordinateTransform.locationCoordinateTransform and inXCoordinateTransform.valueCoordinateTransform are not empty. Empty transformation will be skipped.

New value of pixel is given by:

\[ P_{x} = scale_{value} * value_{channel} + scale_{row} * i + scale_{column} * j + offset \]

where

  • \(scale_{value}\) is inXCoordinateTransform.valueCoordinateTransform.scale
  • \(value_{channel}\) is image pixel channel value, when channel is inXCoordinateTransform.valueCoordinateTransform.channelIndex
  • \(scale_{row}\) is inXCoordinateTransform.locationCoordinateTransform.rowScale
  • \(scale_{column}\) is inXCoordinateTransform.locationCoordinateTransform.columnScale
  • \(i\) is pixel row index
  • \(j\) is pixel column index
  • \(offset\) is inXCoordinateTransform.offset

InvalidValues are checked based on direct pixel value.

Limits are applied to the final, transformed 3D point.

Errors

List of possible exceptions:

Error type Description
DomainError Channel index from inXCoordinateTransform is bigger than image channel count in CreatePoint3DGridFromImage.
DomainError Channel index from inYCoordinateTransform is bigger than image channel count in CreatePoint3DGridFromImage.
DomainError Channel index from inZCoordinateTransform is bigger than image channel count in CreatePoint3DGridFromImage.
DomainError PointCloudCoordinateTransform requires at least one non-empty X coordinate transform in CreatePoint3DGridFromImage.
DomainError PointCloudCoordinateTransform requires at least one non-empty Y coordinate transform in CreatePoint3DGridFromImage.
DomainError PointCloudCoordinateTransform requires at least one non-empty Z coordinate transform in CreatePoint3DGridFromImage.

Function Overrides

See also