필터 지우기
필터 지우기

how to dilate the gray scale image and threshold value only on ROI?

조회 수: 4 (최근 30일)
BV
BV 2013년 4월 10일
I have a gray scale image that has several objects in it. can anyone tell me how to apply threshold only to one object( which is my ROI) in the image?

채택된 답변

Susan
Susan 2013년 4월 10일
If you created an ROI object, you can create a binary mask from the ROI. Then, you can specify an arbitrary image matrix where the values corresponding to where the mask = 1 are the original gray values, and all others are zero. You can then threshold the new image, since it only contains your ROI, with all other pixels being black. Finally, reverse the process and in the original image, say that anywhere the mask = 1 is now equal to the new, thresholded, image values.
In order to explain this better, I'd have to know more about your code. What function are you using to get your ROI?
  댓글 수: 5

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

추가 답변 (1개)

BV
BV 2013년 4월 10일
My image is an orthopaedic one (CT image), in which I have a bone and other objects. I created a mask with imellipse , within which I still have more than one object inside it. I want to apply threshold only to the bone and not other objects. The pixel intensties inside bone and the pixel values of the objects are too close to fix the threshold value. goal is to detect just the bone.
  댓글 수: 8
BV
BV 2013년 4월 17일
thanks Susan!) I tried connecting components , label & regionprops to get just the bone.
Now I would like to try finding the weighted centroid of the bone and the other object(noise at the other end) and track the bone as it keeps shifting in every image. In otherwords, kind of object trackng.
Susan
Susan 2013년 5월 29일
I know it's been a while, but just wanted to check in and see if you found something that would work for tracking the bone and the noise object? I'm curious, as I may need to do some sort of object tracking down the line for the projects I work on.

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

Community Treasure Hunt

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

Start Hunting!

Translated by