PlotIntensityProfile
Plots the pixel intensity profile along a line segment in an image.
Syntax
Definition:
HRESULT PlotIntensityProfile(
HRESULT hrPrev,
ITcVnImage* ipSrcImage,
ITcVnImage*& ipDestImage,
TcVnPoint2_REAL& aStartPoint,
TcVnPoint2_REAL& aEndPoint,
TcVnVector4_LREAL& aBackgroundColor = {0, 0, 0, 0},
TcVnVector4_LREAL& aLineColor = {255, 255, 255, 255},
TcVnVector4_LREAL& aGridColor = {64, 64, 64, 64},
LONG nScaleX = 2,
LONG nScaleY = 2,
LONG nThickness = 1,
LONG nDestChannels = 1
)
Parameters
Name |
Type |
Default |
Description |
---|---|---|---|
hrPrev |
|
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
ipSrcImage |
|
Source image (USINT, 1 channel) | |
ipDestImage |
|
Destination image (USINT, 1 channel. x: position, y: intensity, origin: bottom left. An appropriate destination image will be created if required.) | |
aStartPoint |
|
Start point of the line segment | |
aEndPoint |
|
End point of the line segment | |
aBackgroundColor |
{0, 0, 0, 0} |
Background color | |
aLineColor |
{255, 255, 255, 255} |
Line color | |
aGridColor |
{64, 64, 64, 64} |
Grid color | |
nScaleX |
LONG |
2 |
Scale in x direction (ipDestImage will have a width of nScaleX * (ipSrcImage width - 1) + 1) |
nScaleY |
LONG |
2 |
Scale in y direction (ipDestImage will have a height of nScaleY * 255 + 1) |
nThickness |
LONG |
1 |
Line thickness |
nDestChannels |
LONG |
1 |
ipDestImage channels (1 or 3) |
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |