Double inputs must have integer values in the range of ASSUMEDTYPE.
Show older comments
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));
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!