bit_slicebit_sliceBitSliceBitSlicebit_slice (算子名称)
名称
bit_slicebit_sliceBitSliceBitSlicebit_slice — Extract a bit from the pixels.
参数签名
def bit_slice(image: HObject, 位: int) -> HObject
描述
该算子 bit_slicebit_sliceBitSliceBitSliceBitSlicebit_slice extracts a bit level from the input image.
The semantics of the “and” operation corresponds to that of C for the
respective types (signed char, unsigned char, short, unsigned short, int/long).
Only the pixels within the definition range of the image
are processed.
Several images can be processed in one call.
An output image is generated for every input image.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 在元组级别自动并行化。
- 在图像通道级别自动并行化。
- Automatically parallelized on domain level.
参数表
ImageImageImageImageimageimage (input_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)
Input image(s).
ImageSliceImageSliceImageSliceImageSliceimageSliceimage_slice (output_object) (multichannel-)image(-array) → objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4)
Result image(s) by extraction.
位位位位位位 (input_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Bit to be selected.
Default:
8
Suggested values:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 32
Minimum increment:
1
Recommended increment:
1
例程 (HDevelop)
read_image(Image,'fabrik')
for I:= 1 to 8 by 1
bit_slice (Image, ImageSlice, I)
threshold (ImageSlice, Region, 1, 255)
dev_display (Region)
endfor
例程 (C)
read_image(&ByteImage,"fabrik");
for (bit=1; bit<=8; i++)
{
bit_slice(ByteImage,&Slice,bit);
threshold(Slice,&Region,1,255);
disp_region(Region,WindowHandle);
clear(bit_slice); clear(Slice); clear(Region);
}
例程 (HDevelop)
read_image(Image,'fabrik')
for I:= 1 to 8 by 1
bit_slice (Image, ImageSlice, I)
threshold (ImageSlice, Region, 1, 255)
dev_display (Region)
endfor
例程 (HDevelop)
read_image(Image,'fabrik')
for I:= 1 to 8 by 1
bit_slice (Image, ImageSlice, I)
threshold (ImageSlice, Region, 1, 255)
dev_display (Region)
endfor
例程 (HDevelop)
read_image(Image,'fabrik')
for I:= 1 to 8 by 1
bit_slice (Image, ImageSlice, I)
threshold (ImageSlice, Region, 1, 255)
dev_display (Region)
endfor
结果
If the images are correct (type) and
位位位位位位 has a valid value, 该算子 bit_slicebit_sliceBitSliceBitSliceBitSlicebit_slice
返回值 2 (
H_MSG_TRUE)
.
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>)
If necessary an exception is raised.
可能的后置算子
thresholdthresholdThresholdThresholdThresholdthreshold,
bit_orbit_orBitOrBitOrBitOrbit_or
可替代算子
bit_maskbit_maskBitMaskBitMaskBitMaskbit_mask
参考其它
bit_andbit_andBitAndBitAndBitAndbit_and,
bit_lshiftbit_lshiftBitLshiftBitLshiftBitLshiftbit_lshift
模块
Foundation