gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange gray_histo_range (算子名称)
名称
gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange gray_histo_range
— Calculate the gray value distribution of a single channel image within a
certain gray value range.
参数签名
Herror gray_histo_range (const Hobject 区域 , const Hobject Image , double Min , double Max , const Hlong NumBins , Hlong* Histo , double* BinSize )
Herror T_gray_histo_range (const Hobject 区域 , const Hobject Image , const Htuple Min , const Htuple Max , const Htuple NumBins , Htuple* Histo , Htuple* BinSize )
void GrayHistoRange (const HObject& 区域 , const HObject& Image , const HTuple& Min , const HTuple& Max , const HTuple& NumBins , HTuple* Histo , HTuple* BinSize )
HTuple HImage ::GrayHistoRange (const HRegion& 区域 , const HTuple& Min , const HTuple& Max , Hlong NumBins , double* BinSize ) const
Hlong HImage ::GrayHistoRange (const HRegion& 区域 , double Min , double Max , Hlong NumBins , double* BinSize ) const
HTuple HRegion ::GrayHistoRange (const HImage& Image , const HTuple& Min , const HTuple& Max , Hlong NumBins , double* BinSize ) const
Hlong HRegion ::GrayHistoRange (const HImage& Image , double Min , double Max , Hlong NumBins , double* BinSize ) const
static void HOperatorSet .GrayHistoRange (HObject 区域 , HObject image , HTuple min , HTuple max , HTuple numBins , out HTuple histo , out HTuple binSize )
HTuple HImage .GrayHistoRange (HRegion 区域 , HTuple min , HTuple max , int numBins , out double binSize )
int HImage .GrayHistoRange (HRegion 区域 , double min , double max , int numBins , out double binSize )
HTuple HRegion .GrayHistoRange (HImage image , HTuple min , HTuple max , int numBins , out double binSize )
int HRegion .GrayHistoRange (HImage image , double min , double max , int numBins , out double binSize )
def gray_histo_range (区域 : HObject, image : HObject, min : Union[float, int], max : Union[float, int], num_bins : int) -> Tuple[Sequence[int], float]
def gray_histo_range_s (区域 : HObject, image : HObject, min : Union[float, int], max : Union[float, int], num_bins : int) -> Tuple[int, float]
描述
gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange GrayHistoRange gray_histo_range
calculates the gray value distribution
Histo Histo Histo Histo histo histo
of the single channel Image Image Image Image image image
within 区域 区域 区域 区域 区域 区域
and the gray value range [Min Min Min Min min min
,Max Max Max Max max max
]. The values for
Min Min Min Min min min
and Max Max Max Max max max
are rounded down to the next integer if the
Image Image Image Image image image
is not of type 'real' "real" "real" "real" "real" "real" . The gray value range is divided
into NumBins NumBins NumBins NumBins numBins num_bins
bins of the same size, which is returned in
BinSize BinSize BinSize BinSize binSize bin_size
. If a gray value lies between two bins the gray value is
assigned to the smaller bin. If the Image Image Image Image image image
is of type 'real' "real" "real" "real" "real" "real"
.
If the Image Image Image Image image image
has discrete gray values the size of a bin is
computed with
. Since the accuracy of the histogram Histo Histo Histo Histo histo histo
can
be adjusted with NumBins NumBins NumBins NumBins numBins num_bins
, the calculation of the gray value
histogram with gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange GrayHistoRange gray_histo_range
is most useful for images of type
'real' "real" "real" "real" "real" "real" and images of type 'integer' "integer" "integer" "integer" "integer" "integer" , which have
a high bit depth.
注意
Note that the operator gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange GrayHistoRange gray_histo_range
only considers
the given 区域 区域 区域 区域 区域 区域
and ignores any previously set domain
of the input image Image Image Image Image image image
.
If the Image Image Image Image image image
has discrete gray values the value of BinSize BinSize BinSize BinSize binSize bin_size
may cause the following effects:
For BinSize BinSize BinSize BinSize binSize bin_size
> 1 multiple neighboring gray values are
assigned to the same bin. If BinSize BinSize BinSize BinSize binSize bin_size
is no integer the gray values
are distributed uneven among the bins, e.g., for
BinSize BinSize BinSize BinSize binSize bin_size
= 1.5 the first and second gray value are
assigned to the first bin, the third gray value is assigned to the second
bin, and the fourth and fifth gray value are assigned to the third bin.
This becomes noticeable in several peeks in the histogram Histo Histo Histo Histo histo histo
.
If BinSize BinSize BinSize BinSize binSize bin_size
< 1 some classes are not assigned by any
gray value, e.g., for BinSize BinSize BinSize BinSize binSize bin_size
= 0.5 the first
gray value is assigned to the first bin and the second gray value is assigned
to the third bin. The histogram Histo Histo Histo Histo histo histo
shows some gaps, which
resembles the structure of a comb.
If the Image Image Image Image image image
is of type 'real' "real" "real" "real" "real" "real" and
Min Min Min Min min min
= Max Max Max Max max max
, all pixels of the corresponding gray value
are assigned only to the first bin.
运行信息
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Automatically parallelized on internal data level.
参数表
区域 区域 区域 区域 区域 区域
(input_object) region(-array) →
object HRegion HObject HRegion Hobject
Region in which the histogram is to be calculated.
Image Image Image Image image image
(input_object) singlechannelimage →
object HImage HObject HImage Hobject (byte / cyclic / direction / int1 / uint2 / int2 / int4 / int8 / real)
Input image.
Min Min Min Min min min
(input_control) real →
HTuple Union[float, int] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Minimum gray value.
Default:
0
Suggested values:
0
Max Max Max Max max max
(input_control) real →
HTuple Union[float, int] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Maximum gray value.
Default:
255
Suggested values:
255
Restriction:
Max >= Min
NumBins NumBins NumBins NumBins numBins num_bins
(input_control) integer →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Number of bins.
Default:
256
Suggested values:
16, 32, 64, 128, 256
Restriction:
NumBins >= 1
Histo Histo Histo Histo histo histo
(output_control) histogram(-array) →
HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Histogram to be calculated.
BinSize BinSize BinSize BinSize binSize bin_size
(output_control) real →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Bin size.
结果
If the parameters are valid, the operator gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange GrayHistoRange gray_histo_range
returns the value 2 (
H_MSG_TRUE )
. If necessary an exception is raised.
可能的前置算子
min_max_gray min_max_gray MinMaxGray MinMaxGray MinMaxGray min_max_gray
可能的后置算子
create_funct_1d_array create_funct_1d_array CreateFunct1dArray CreateFunct1dArray CreateFunct1dArray create_funct_1d_array
可替代算子
gray_histo gray_histo GrayHisto GrayHisto GrayHisto gray_histo
,
gray_histo_abs gray_histo_abs GrayHistoAbs GrayHistoAbs GrayHistoAbs gray_histo_abs
参考其它
histo_2dim histo_2dim Histo2dim Histo2dim Histo2dim histo_2dim
,
scale_image_max scale_image_max ScaleImageMax ScaleImageMax ScaleImageMax scale_image_max
模块
Foundation