problem with imregdemons: uint8 incompatible?

4 visualizaciones (últimos 30 días)
Paul-Henri PREVOT
Paul-Henri PREVOT el 25 de Jun. de 2016
Comentada: Paul-Henri PREVOT el 25 de Jun. de 2016
Hi all!
I am trying to use the function imregdemons to fit two pictures together. I copied and pasted the code given in the example on the function description and tried to modify it for my images but I always have this error showing up:
Undefined function 'imregdemons' for input arguments of type 'uint8'.
Here is the code which is similar to the one on the 'imregdemons' example page: http://fr.mathworks.com/help/images/ref/imregdemons.html
fixed = imread('LPE_EnvelopeDeformationv4j.jpg');
moving = imread('LPE_EnvelopeDeformationv5j.jpg');
% Convert the images to grayscale for processing.
fixed = rgb2gray(fixed);
% fixed=im2double(fixed);
moving = rgb2gray(moving);
% moving = im2double(moving);
% Observe the initial misalignment. Fingers are in different poses. In the second figure, the two images are overlaid over each other
% to make it easy to see where the images differ. The differences are highlighted in green.
figure
imshowpair(fixed,moving,'montage')
figure
imshowpair(fixed,moving)
moving = imhistmatch(moving,fixed);
[~,movingReg] = imregdemons(moving,fixed);
% [~,movingReg] = imregdemons(moving,fixed,[500 400 200],...
% 'AccumulatedFieldSmoothing',1.3);
figure
imshowpair(fixed,movingReg)
figure
imshowpair(fixed,movingReg,'montage')
This function should take uint8 as arguments (even tried doubles) but it does not seem to work.
Does anybody can tell me if I'm missing something basic here? I have no clue...
Thanks in advance,
PH

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Jun. de 2016
... Introduced in R2014b.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by