フィルターのクリア

Morphological closing to crop an image

3 ビュー (過去 30 日間)
Matthew Alston
Matthew Alston 2014 年 6 月 18 日
コメント済み: Matthew Alston 2014 年 6 月 18 日
Hi,
I'm trying to use the image processing toolbox to remove extraneous pixels from an image and I'm running into trouble. Basically I have a painmap (attached), which is a blank sheet of paper with a black body template on it, and a patient can draw in red marker over the areas of the body that cause them pain. However, often patients will draw outside of the lines and these are the pixels I'd like to crop out: everything outside of the black body outline. A friend suggested I use morphological closing to accomplish this but I'm not sure how to go about doing this. If anyone has any ideas they would be much appreciated.
Thanks, Matt

採用された回答

Image Analyst
Image Analyst 2014 年 6 月 18 日
No that does not sound right. You'd use masking, assuming you have the original body outline. Closing will smooth out the white parts of the image. You didn't attach anything yet. Why don't you attach and image of the blank sheet, an image where the patient scribbled on it, and what you'd like that image to look like after processing?
  11 件のコメント
Image Analyst
Image Analyst 2014 年 6 月 18 日
The problem was that the outline was not completely closed - it had gaps so the body did not fill in. I used imclose to fill the gaps. See attached m-file.
Matthew Alston
Matthew Alston 2014 年 6 月 18 日
Ahh thank you so much, this is perfect.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by