From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m (limited to 'SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m') diff --git a/SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m b/SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m new file mode 100755 index 0000000..4745d8d --- /dev/null +++ b/SD-VBS/common/toolbox/toolbox_basic/disp/disp_image.m @@ -0,0 +1,19 @@ +function disp_image(img,sze,index,mask) + +%figure(2) +subplot(sze(1),sze(2),index); + +if (size(mask) ~= size(mask)), + error(['size of image is ',int2str(size(mask)),' size of mask is ',... + int2str(size(mask))]); +end + +img = img-min(min(img)); +I = 0*(img.*(~mask)) + img.*mask; +I = img.*mask; +colormap(gray) +imagesc(I); +%axis('off') +axis('equal'); +axis('square'); +drawnow; -- cgit v1.2.2