Transfer Binary ROI to a raw 12bit image

9 Ansichten (letzte 30 Tage)
Jason
Jason am 21 Nov. 2011
Hi. I have a 12bit grayscale image (of white dots on a black background) that I binarise. Is it possible to create circular ROI's around the binary image features and trasnfer these back onto the raw 12 bit image. This is what I have so far>
bw = im2bw(I, graythresh(I));
axis off;
imshow(bw)
%-------------------------------------------------------
bw4_perim = bwperim(bw);
CC=bwconncomp(bw4_perim); %This is a struct, so access only the number
num = CC.NumObjects;
set(handles.editCount,'String', num2str(num));
axes(handles.axes3)
imshow(I,[])
hold on
spy(bw4_perim)

Antworten (1)

Walter Roberson
Walter Roberson am 21 Nov. 2011
Once you have the binary circle created in the appropriate positions, multiply the roi mask by (2^12 - 1) to get the 12-bit grayscale image.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by