Borrar filtros
Borrar filtros

Error in resample>n​onUniformR​esample

2 visualizaciones (últimos 30 días)
Raviteja Kurva
Raviteja Kurva el 22 de En. de 2019
% addpath(genpath('\\mars\usr\FA8_Mikroskopie\FA8_public\PublicFiles\MATLAB\Toolboxes\Restricted\2011-08-10-FAIR'))
addpath(genpath('W:\MATLAB\Toolboxes\Registration\2011-08-10-FAIR'));
%cd C:\Program Files\MATLAB\R2018b\toolbox\Registration
a=imread('objphase.jpg');
b=imread('calphase.jpg');
c=b-91;
c(c<0)=0;
c(1:end,:)=c(end:-1:1,:); % flip the image
cat(3,a,c)
r=imrotate(c,45.5*pi/180);
d=extract(resample(r,[0.8437 0.8437],[-13 5]),size(b)/2);
e=extract(a,size(b)/2);
cat(3,e,d) % This is a pretty good pre alignment. So now FAIR can do the rest...
useCuda=0;
if (useCuda)
e=cuda(e);
d=cuda(d);
enableCuda();
%set_zeros_cuda(1);
%set_ones_cuda(1);
%global zeros; zeros=@(varargin) zeros_cuda(varargin{:});
%set_rand_cuda(1);
end
tic
[aligned,mytransform]=MultiLevelAlign(e,d); % ist superlangsam auf meinem Laptop aber was solls....
toc
% mytransform = [ 0.9975 0.0013 0.6298 -0.0006 1.0032 -0.1691]'; % This is the result of the aligment
% [aligned2]=MultiLevelAlign(e,d,mytransform); % just do the transform
cat(3,d,aligned) % ... perfect
[aligned2,mytransform2]=MultiLevelAlign(e,d,mytransform); % use the same transformation but just apply it
cat(3,d,aligned2) % ... perfect. Also works
When i run this program
I got the error
Error in resample>nonUniformResample
[x, tx] = getSamples(varargin{1:2});
Error in resample (line 116)
[varargout{1:max(1,nargout)}] = nonUniformResample(method,varargin{:});
Error in alignRainer (line 13)
d=extract(resample(r,[0.8437 0.8437],[-13 5]),size(b)/2);

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by