0

i m looking for an alternate method for bin2dec conversion to speed up my code.bin2dec functions takes 2.5 to 3 sec as run time.Is there any solution. Here is my code:

img = imread('cameraman.tif');
D1=256;D2=256;
img = dec2bin(img(:)).';
I   = reshape(permute(reshape(imgD, 8, [], D2), [2,1,3]), D1, D2 * 8);

(Processing)

a1{D1,D2} = [];
for i=1:1:D1
    for j=1:1:D2
        a1{i,j,1}=I(i,:,j); 
    end
end
C1 = bin2dec(a1);

Is there anyway to speed up the bin2dec function and make the running time under 0.2 seconds or even better as every miliseconds counts for my application?

0 Answers0