- /
-
300 Baud Membrane
on 20 Oct 2021
- 1
- 23
- 0
- 0
- 231
logo;
m=@()frame2im(getframe(gcf));
% Setup external calls and constants
n=@(x)read(py.os.popen(x));
for k=1:50
%display
X=m();
% save as JPEG
% for k=:50, imwrite(X,'a.jpg','Quality',k); yields an intereseting one!
imwrite(X,'a.jpg','Quality',70-k);
g=uint8(str2num(char(n('djpeg a.jpg | od -An -w1 -tu1 -v'))));
%disp(n('djpeg a.jpg | head -n2 | tail -n1'))
% and reopen
for l=1:3
q(:,:,l)=reshape(g(15+l:3:end),577,433)';
end
imshow(q);
end