Image Processing

I would greatly appreciate help with coding the following image processing steps in matlab: - loading in an analyze image (type:hdr/img) and binarize it (BW image and the ROI are the white areas) - For each "white area" (defined either by a 1 or 0), create its own separate mask
I am having trouble flowing each step into the other and figuring it out. I have some experience with MATLAB but I am really having trouble with this combination. I would greatly appreciate anyone's help!
Thank you in advance!

댓글 수: 3

Sven
Sven 2011년 11월 12일
Do you have the image processing toolbox, and have you checked out the docs about labeling black and white images?
http://www.mathworks.com/help/toolbox/images/f18-34186.html
Elle
Elle 2011년 11월 14일
I have looking into how to binarize the image to where it is a set of 0's and 1's but I could not figure out how to have it identify the 1s in the image and then group them. I thought of if the entire image after it was binarize was then made into a matrix of 1's and 0's and then just have each group of 1's separated and then made into a mask to utilize later but I wasn't sure it that would be possible because looking at the link you provided, the image is an image of the brain and not an exact shape such as a square. I do not have the image processing toolbox but I will definitely look into that.
Thanks!
Walter Roberson
Walter Roberson 2011년 11월 14일
bwlabel() to group the 1's.
regionprops() to get the individual masks.

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2011년 11월 14일

1 개 추천

Look at my BlobsDemo - it does all that. Well, different image format (not hdr/img - whatever that is) but basically it finds and measures objects.
You should get the Image Processing Toolbox. It will be hard to do much image processing without it unless you love to spend lots of time reinventing wheels and things.

댓글 수: 4

Elle
Elle 2011년 12월 2일
Thank you for the demo link! It does the step that I am looking for but I was wondering if it would still work for a 3-dimensional image? Would I be able to binarize it and outline the areas of interest for a 3-d image?
Sean de Wolski
Sean de Wolski 2011년 12월 2일
You'll probably need to change a few things, but it should still work. You said above that you don't have the Image Processing Toolbox, are you sure? Image Analyst's demos appear to rely heavily on it.
Elle
Elle 2011년 12월 2일
I was most definitely mistaken, I do indeed have the Image Processing Toolbox.
Image Analyst
Image Analyst 2011년 12월 5일
If by 3D image you mean a color image, check out my color segmentation examples. If you mean a gray scale volumetric image you'd have to change a few things perhaps. Some routines have a higher dimensional version like bwlabeln(), convn(), and so on. You could probably change bwlabel to bwlabeln() or bwconncomp() (which is newer and better/faster) and that would probably get a lot of it to work, like regionprops(). The cropping part wouldn't though since the cropping assumes 2D grayscale images.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 11월 14일

1 개 추천

It appears that there is at least one user contribution that can load data from ANALYZE files: http://www.mathworks.com/matlabcentral/fileexchange/8797

댓글 수: 1

Walter Roberson
Walter Roberson 2011년 12월 2일
An additional toolset that can read ANALYZE files appears to be http://www.rotman-baycrest.on.ca/~jimmy/NIFTI/

댓글을 달려면 로그인하십시오.

Sean de Wolski
Sean de Wolski 2011년 11월 14일

1 개 추천

for easy automatic hdr/img reading:
doc analyze75read %and friends

카테고리

도움말 센터File Exchange에서 White에 대해 자세히 알아보기

질문:

2011년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by