Transfer Binary ROI to a raw 12bit image
Show older comments
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)
Answers (1)
Walter Roberson
on 21 Nov 2011
0 votes
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.
Categories
Find more on Region and Image Properties 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!