problem with imregdemons: uint8 incompatible?

조회 수: 3 (최근 30일)
Paul-Henri PREVOT
Paul-Henri PREVOT 2016년 6월 25일
댓글: Paul-Henri PREVOT 2016년 6월 25일
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

채택된 답변

Walter Roberson
Walter Roberson 2016년 6월 25일
... Introduced in R2014b.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by