open only a field in a large tiff image

4 ビュー (過去 30 日間)
Daniel Balvay
Daniel Balvay 2020 年 3 月 6 日
コメント済み: Daniel Balvay 2021 年 4 月 1 日
I would like open only fields in tiff images of very high definition.
In histology, it is possible to work on multi-image tiff formats. Each image corresponds to different spatial scales. Typically, the higher resolution corresponds to images of size 100.000 x 50.000. To preserve memory and processing time, it is possible to define fields in lower resolution to crop the corresponding image at the full size. However I did not found any function wich could crop such image without opening the all tall image. In particular the 'pixelRegion' argument of imread induce a memory overflow event for arbitrary small fields.
do you have a solution ?

回答 (1 件)

Nipun Katyal
Nipun Katyal 2020 年 3 月 9 日
MATLAB provides out-of-core processing with the help of bigimage for formats like .tiff, It enables you to read blocks from the original image and process them without any worry about memory usage or processing power usage.
Here is an example on how to read the block
%Read the image
img = bigimage('sample.tif');
%Starting coordinates
coordStart = [250 250];
%Ending Coordinates
coordEnd = [750,750];
%Extract the region between the aforementioned coordinates
blk1 = getRegion(img,1,coordStart, coordEnd);
%Display the image
bigimageshow(bigimage(blk1))
  4 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 13 日
Thanks for the details, @Hauke Kolster !
Daniel Balvay
Daniel Balvay 2021 年 4 月 1 日
Thanks a lot, I have my complete answer!

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by