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.
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.
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;