How can I detect the object in this noisy image?
조회 수: 13 (최근 30일)
이전 댓글 표시
I'm trying to process images like the attached. In this case, there should be an object near the center of the image around test(7,6). The object is roughly elliptical with a major axis of around 6 or 7 pixels. The bright pixels around test(11,6) are from something else that I want to ignore. What is the best way of going about this?
-I tried both global and local thresholding to binarize the image, without success. I think noise is the issue.
-I also tried using a structuring element as a disk and then a morphological technique to locate the object, but that didn't work.
-I think filtering might be the best option. Is there a good filter for this task? imfilter looks promising, but I don't know how the kernel is chosen.
댓글 수: 0
답변 (2개)
Image Analyst
2023년 5월 10일
Why can't you just threshold?
mask = grayImage > 35;
Beyond that I'm not sure what you want to do. There are functions to throw out blobs touching the edge of the image, or to extract blobs of a certain size range, or to extract a specified number of the larger blobs.
The main problem seems to be poor resolution, though noise is a problem too.
Brandon Armstrong
2023년 5월 10일
I'm not sure how many images like this you have or how consistent your intensity values are. For the image you attached, I would create a binary mask with a manual threshold and then filter based on region size to get rid of the smaller object.
Check out MathWorks Image Processing for Engineering and Science on Coursera to learn many techniques for segmenting and analyzing images.
load test
Create a mask and choose a manual threshold to set everythign to zero.
mask = ones(size(test), "logical");
mask(test <= 36) = 0;
filteredMask = bwpropfilt(mask, "Area", [6, inf]);
Use the mask to zero out pixels not under the mask
newImage = test;
newImage(~filteredMask) = 0;
imagesc(newImage)
댓글 수: 2
Brandon Armstrong
2023년 5월 10일
It's going to be tough given the resolution and how close the objects are. There is not much of a decrease in intensity in the one or two pixels separating the areas you want. The suggestion from @Image Analyst sounds like the best thing to try.
If you have a lot of images, you can create a function that works on one or two test images and then apply it to all the images and see the results using the Image Batch Processor.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!