Error using imwarp - ippgeotrans requestest a huge array

8 ビュー (過去 30 日間)
Silja Heilmann
Silja Heilmann 2015 年 9 月 7 日
コメント済み: Silja Heilmann 2015 年 9 月 9 日
While using imwarp on an 777x3161 image I get the following error:
Error using ippgeotrans
Requested 50995x174010 (33.1GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and
cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in imwarp>ippWarpAffine (line 566)
outputImage = ippgeotrans(single(inputImage),double(T),Rout.ImageSize,interp,single(fillVal));
Error in imwarp>remapPointsAndResample (line 223)
outputImage = ippWarpAffine(inputImage,R_A,tform,outputRef,method,fillValues);
Error in imwarp (line 210)
outputImage = remapPointsAndResample(parsedInputs.InputImage,R_A,tform,outputRef,method,fillValues);
I use imwarp inside a loop and the error only occurs for one particular image. For the other images imwarp returns an image with the expected size (777x3161)
There is no documentation on ippgeotrans so I have no idea why it is requesting an array of this astronomical size... Would it help if I perhaps chose another interpolation method?
Can anyone help/explain what is going on here?
Best regards
Silja

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 8 日
Is it possible that the one image is 3 dimensional when the others are all 2 dimensional?
At the command line, issue the command
dbstop if error
and run the program for that one problem image. When it stops in the error, ask it to show size(inputImage) . Then give the command dbup and ask for the size again. Keep using dbup and asking for the size until you get to remapPointsAndResample and in there look at size(parsedInputs.InputImage)
  3 件のコメント
Walter Roberson
Walter Roberson 2015 年 9 月 9 日
Sorry, I do not see how those input sizes lead to attempting to allocate that size of array. I would need access to the toolbox code to follow it.
Silja Heilmann
Silja Heilmann 2015 年 9 月 9 日
Hey Walter I just found out that when I generate the transform using 'pure' images instead of pre-processing them using imhistmatch() I do not get the error!
The code was:
fixed = timestack_BF(:,:,1,tt);
moving = imhistmatch(timestack_BF(:,:,1,tt+1),fixed);
[optimizer,metric] = imregconfig('monomodal');
tform = imregtform(moving,fixed,'similarity',optimizer,metric);
moving_reg = imwarp(moving,tform,'nearest');
(I got the error in the last line).
This code however:
fixed = timestack_BF(:,:,1,tt);
moving = timestack_BF(:,:,1,tt+1);
[optimizer,metric] = imregconfig('monomodal');
tform = imregtform(moving,fixed,'similarity',optimizer,metric);
moving_reg = imwarp(moving,tform,'nearest');
runs without error for the two problem images!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDSP Algorithm Acceleration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by