Double inputs must have integer values in the range of ASSUMEDTYPE.
Afficher commentaires plus anciens
My code is,
din=imread('test.jpg');
figure(1);
imshow(din);
din=im2double(din);
[m,n]=size(din);
y_pts = numel(din(1,:));%number of columns
x_pts = numel(din(:,1));%number of rows
t_pts = numel(din);%total number of elements
%copy of matrix with object value 0 and rest value 1000
c_din = 1000.*int16(bitcmp(din,1));
d_new = zeros(x_pts+2,y_pts+2);
d_new(2:x_pts+1,2:y_pts+1)= c_din;%creating boundry object
%performing forward processing
for j=2:1:y_pts+1
for i=2:1:x_pts+1
d_new(i,j)=min([d_new(i,j);1+d_new(i-1,j);
1.41+d_new(i-1,j-1);1+d_new(i,j-1);1.41+d_new(i+1,j-1)]);
end
end
I am getting an error as,
Error using bitcmp Double inputs must have integer values in the range of ASSUMEDTYPE.
Error in distance1 (line 16) c_din = 1000.*int16(bitcmp(din,1));
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!