adding a new lower resolution level to bigimages

How can I add one or more lower resolution levels to one bigimage that already exists and is loaded in our workspace?
I'm working with big images (more than 60,000 x 60,000 px) that are not pyramidal (plain tiff files).
To import these images to matlab I use bigimage function but since they are plain tiff they have just one level so all the processing is extremelly slowly (even parallel computing toolbox), despite many functions would produce similar results if I applied then to a lower resolution version of that image.
thanks
Eduardo

Answers (2)

I'm aware of the apply function and that was how I managed to workaround my problems. My main issue is efficiency. It would be nice to just create a pyramidal tiff from my huge big tiff and whenever I have to load and repeat some calculations the downsampling was already there.
Let's hope in future releases this option will be available (as well as a setfFullLevel and a setPixel functions - the setBlock kinda solve thins but is impractical in many situations)

1 Comment

Eduardo,
Thank you for the feedback!
Would you be willing to talk more about your usecase with us? If so, please contact me via email: authama (at companyname).com.
Ashish

Sign in to comment.

I understand that you want to create lower resolutions of the tiff image and add them as levels to the bigimage object.
Currently MATLAB does not support this feature. You can use the following workarounds:
  1. use impyramid function to compute pyramid reduction of images.
  2. Alternatively, use imresize to resize the image.

2 Comments

None of these options are enough since they all need to load in memory an image that simpy doesn't fit in memory. It would be nice if MathWorks develop a method equivalent to impyramid accepting bigimages as input.
I have brought this issue to the concerned team.
Note that you can also use the apply function to create lower resolution image, if the lower resolution image fits in memory. For example,
bigimg = bigimage("spine.tif");
result = bigimg.apply(1, @(x) imresize(x, 0.1)); % scales to 10% of original
imshow(result{1});

Sign in to comment.

Products

Release

R2019b

Tags

Asked:

on 13 Mar 2020

Commented:

on 25 Mar 2020

Community Treasure Hunt

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

Start Hunting!