min_max_gray min_max_gray MinMaxGray MinMaxGray min_max_gray (算子名称)
名称
min_max_gray min_max_gray MinMaxGray MinMaxGray min_max_gray — Determine the minimum and maximum gray values within regions.
参数签名
Herror min_max_gray (const Hobject 区域 , const Hobject Image , double Percent , double* Min , double* Max , double* Range )
Herror T_min_max_gray (const Hobject 区域 , const Hobject Image , const Htuple Percent , Htuple* Min , Htuple* Max , Htuple* Range )
void MinMaxGray (const HObject& 区域 , const HObject& Image , const HTuple& Percent , HTuple* Min , HTuple* Max , HTuple* Range )
void HImage ::MinMaxGray (const HRegion& 区域 , const HTuple& Percent , HTuple* Min , HTuple* Max , HTuple* Range ) const
void HImage ::MinMaxGray (const HRegion& 区域 , double Percent , double* Min , double* Max , double* Range ) const
void HRegion ::MinMaxGray (const HImage& Image , const HTuple& Percent , HTuple* Min , HTuple* Max , HTuple* Range ) const
void HRegion ::MinMaxGray (const HImage& Image , double Percent , double* Min , double* Max , double* Range ) const
static void HOperatorSet .MinMaxGray (HObject 区域 , HObject image , HTuple percent , out HTuple min , out HTuple max , out HTuple range )
void HImage .MinMaxGray (HRegion 区域 , HTuple percent , out HTuple min , out HTuple max , out HTuple range )
void HImage .MinMaxGray (HRegion 区域 , double percent , out double min , out double max , out double range )
void HRegion .MinMaxGray (HImage image , HTuple percent , out HTuple min , out HTuple max , out HTuple range )
void HRegion .MinMaxGray (HImage image , double percent , out double min , out double max , out double range )
def min_max_gray (区域 : HObject, image : HObject, percent : Union[int, float]) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
def min_max_gray_s (区域 : HObject, image : HObject, percent : Union[int, float]) -> Tuple[float, float, float]
描述
该算子 min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray min_max_gray creates the histogram of the
absolute frequencies of the gray values within 区域 区域 区域 区域 区域 区域 in
the input image Image Image Image Image image image (see gray_histo gray_histo GrayHisto GrayHisto GrayHisto gray_histo ) and
calculates the number of pixels Percent Percent Percent Percent percent percent corresponding to
the area of the input image. Then it goes inwards on both sides of
the histogram by this number of pixels and determines the smallest
and the largest gray value:
Example:
With area = 60, Percent Percent Percent Percent percent percent = 5 , d.h. i.e. 3 pixels,
histogram = [2,8,0,7,13,0,0,...,0,10,10,5,3,1,1],
Minimum = 0, Maximum = 255, range = 255
min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray min_max_gray returns:
Min Min Min Min min min = 1 ,
Max Max Max Max max max = 253 ,
Range Range Range Range range range = 252 .
For images of type int4, int8, and real,
the above calculation is not performed via histograms, but using a rank
selection algorithm.
If Percent Percent Percent Percent percent percent is set to 50 ,
Min Min Min Min min min = Max Max Max Max max max = Median.
If Percent Percent Percent Percent percent percent is 0 no histogram is calculated in
order to enhance the runtime.
注意
Note that 该算子 min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray min_max_gray only considers
the given 区域 区域 区域 区域 区域 区域 and ignores any previously set domain
of the input image Image Image Image Image image image .
运行信息
多线程类型:可重入(与非独占操作符并行运行)。
多线程作用域:全局(可以从任何线程调用)。
在元组级别自动并行化。
参数表
区域 区域 区域 区域 区域 区域 (input_object) region(-array) → object HRegion HObject HRegion Hobject
Regions, the features of which are to be calculated.
Image Image Image Image image image (input_object) singlechannelimage → object HImage HObject HImage Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
Gray value image.
Percent Percent Percent Percent percent percent (input_control) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Percentage below (above) the absolute maximum
(minimum).
Default:
0
Suggested values:
0, 1, 2, 5, 7, 10, 15, 20, 30, 40, 50
Restriction:
0 <= Percent && Percent <= 50
Min Min Min Min min min (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
“Minimum” gray value.
Max Max Max Max max max (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
“Maximum” gray value.
Assertion:
Max >= Min
Range Range Range Range range range (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Difference between Max and Min.
Assertion:
Range >= 0
例程 (HDevelop)
* Threshold segmentation with training region:
read_image(Image,'fabrik')
draw_region(Region,WindowHandle)
min_max_gray(Region,Image,5,Min,Max,Range)
threshold(Image,SegmentedRegion,Min,Max)
dev_display(SegmentedRegion)
例程 (C)
/* Threshold segmentation with training region: */
read_image(&Image,"fabrik");
draw_region(&Region,WindowHandle);
min_max_gray(Region,Image,5.0,&Min,&Max,NULL);
threshold(Image,&SegmentedRegion,Min,Max);
disp_region(SegmentedRegion,WindowHandle);
例程 (HDevelop)
* Threshold segmentation with training region:
read_image(Image,'fabrik')
draw_region(Region,WindowHandle)
min_max_gray(Region,Image,5,Min,Max,Range)
threshold(Image,SegmentedRegion,Min,Max)
dev_display(SegmentedRegion)
例程 (HDevelop)
* Threshold segmentation with training region:
read_image(Image,'fabrik')
draw_region(Region,WindowHandle)
min_max_gray(Region,Image,5,Min,Max,Range)
threshold(Image,SegmentedRegion,Min,Max)
dev_display(SegmentedRegion)
例程 (HDevelop)
* Threshold segmentation with training region:
read_image(Image,'fabrik')
draw_region(Region,WindowHandle)
min_max_gray(Region,Image,5,Min,Max,Range)
threshold(Image,SegmentedRegion,Min,Max)
dev_display(SegmentedRegion)
结果
该算子 min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray min_max_gray 返回值 2 (
H_MSG_TRUE )
if the
input image has the defined gray values and the parameters are
correct. The behavior in case of empty input (no input images
available) is set via 该算子
set_system(::'no_object_result',<Result>:) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) set_system("no_object_result",<Result>) .
The behavior in case of an empty region is set via 该算子
set_system(::'empty_region_result',<Result>:) set_system("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) set_system("empty_region_result",<Result>) .
If necessary an exception is raised.
可能的前置算子
draw_region draw_region DrawRegion DrawRegion DrawRegion draw_region ,
gen_circle gen_circle GenCircle GenCircle GenCircle gen_circle ,
gen_ellipse gen_ellipse GenEllipse GenEllipse GenEllipse gen_ellipse ,
gen_rectangle1 gen_rectangle1 GenRectangle1 GenRectangle1 GenRectangle1 gen_rectangle1 ,
threshold threshold Threshold Threshold Threshold threshold ,
regiongrowing regiongrowing Regiongrowing Regiongrowing Regiongrowing regiongrowing
可能的后置算子
threshold threshold Threshold Threshold Threshold threshold
可替代算子
select_gray select_gray SelectGray SelectGray SelectGray select_gray ,
intensity intensity Intensity Intensity Intensity intensity
参考其它
gray_histo gray_histo GrayHisto GrayHisto GrayHisto gray_histo ,
scale_image scale_image ScaleImage ScaleImage ScaleImage scale_image ,
scale_image_max scale_image_max ScaleImageMax ScaleImageMax ScaleImageMax scale_image_max ,
learn_ndim_norm learn_ndim_norm LearnNdimNorm LearnNdimNorm LearnNdimNorm learn_ndim_norm
模块
Foundation