Right-click on the ROI in the Image window, select Intensity Profile
Profiling image data on ROI
cvroiprofile -r 1 multi:=all trstats.n:=1 trstats.sum:=1;
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
roi |
Input/Output String |
|
The ROI added in the Image window. | |
Input Image | imgi |
Input ImageLayer |
|
Specifies the input Image layer. |
Profile on | multi |
Input int |
|
Specifies profiling on active ROI or all ROIs on Image. Option list:
|
Data Layout | layout |
Input int |
|
Available when Profile on is set to All ROIs on Image. When there are more than one ROIs and/or multiple frames, it will generate multiple sets of statistics values. This option is used to specify the layout of the statistics values output to the result worksheet. Option list:
|
Statistics | trstats |
Input TreeNode |
|
Specifies which quantity to be computed and output. See more details in section below. |
Weighted ROI | weight |
Input int |
|
This option is useful for tiny coordinates ROI. If this option is selected (weight = 1), each pixel is weighted by the area covered by ROI polygon. For example, if a pixel point on the edge of ROI box is half inside ROI and the other half outside ROI, its weight is 0.5. On the other hand, a pixel point at the censter of ROI box will count weight as 1. |
RGB Profile | rgb |
Input int |
|
When import colorful image, this option supports generating the intensity profile result base on RGB value of each pixel: 0=false, 1=true.
|
Sort Output Columns by | sort |
Input int |
|
Available when RGB Profile checkbox is checked. Specifies how to sort the output columns. Option list:
|
Output | rd |
Output ReportData |
|
Specifies the output Worksheet. |
This X-Function cvroiprofile is used to profile on ROI and generate a new worksheet to output descriptive statistics values. Refer to this document page for more information.
The trstats tree specifies the descriptive statistics values to be output from cvroiprofile X-Function: 0=false, 1=true.
Syntax: trstats.Treenode:=<value>
Example:
Treenode | Label | Type | Default | Description |
---|---|---|---|---|
mean | Mean | int | 1 | Mean value |
sd | SD | int | 0 | Standard deviation value |
n | N | int | 0 | The number of the data points covered by ROI box |
min | Min | int | 0 | Minimum value inside ROI box |
max | Max | int | 0 | Maximum value inside ROI box |
median | Median | int | 0 | Median value inside ROI box |
sum | Sum | int | 0 | Sum value |
mincoord | XY of Min | int | 0 | XY coordinates of the minimum value inside ROI |
maxcoord | XY of Max | int | 0 | XY coordinates of the maximum value inside ROI |