MATLAB 帮助中心
Read specific block of blocked image
blockdata = getBlock(bim,blocksub)
blockdata = getBlock(bim,blocksub,Level=L)
[blockdata,blockinfo] = getBlock(___)
blockdata = getBlock(bim,blocksub) returns blockdata, the block specified by the subscripts in blocksub.
blockdata
bim
blocksub
example
blockdata = getBlock(bim,blocksub,Level=L) gets the specified block from the L'th level of the multiresolution blockedImage, bim. By default, L is 1.
L
blockedImage
[blockdata,blockinfo] = getBlock(___) also returns block metadata in blockinfo.
blockinfo
collapse all
Create a blocked image and display it.
bim = blockedImage("tumor_091R.tif"); bigimageshow(bim, ... GridVisible="on",GridLevel=1, ... GridLineWidth=2,GridColor="k",GridAlpha=0.3)
Display the value of the SizeInBlocks property.
SizeInBlocks
disp(bim.SizeInBlocks)
5 6 1 2 2 1 1 1 1
Specify the block you want to read.
block = getBlock(bim, [3, 2, 1]);
Display the block.
imshow(block)
Blocked image, specified as a blockedImage object.
Block subscript vector, specified as a 1-by-N integer-valued vector. Valid elements range from 1 to the corresponding element in the SizeInBlocks property.
Example: [3, 2, 1]
[3, 2, 1]
Block of pixels from blocked image, returned as a numeric array. Partial blocks around the edges can be smaller than the BlockSize property.
BlockSize
struct
Metadata of block of pixels, returned as a scalar struct. The blockinfo struct contains these fields.
Start
End
Level
Introduced in R2021a
blockedImage | setBlock
setBlock
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处