I can't do region of interest sharping of image why ?

1 Ansicht (letzte 30 Tage)
Ali Zulfikaroglu
Ali Zulfikaroglu am 12 Jan. 2021
Kommentiert: Ali Zulfikaroglu am 16 Jan. 2021
I have a mammogram image. In Left side image, I used roipoly command and drawed that polygon .
and then I sharpened that polygon inside region but image blurred instead of sharpen
What's my mistake in my codes ?
I need that polygon inside region sharpened.
img=imread('image.jpg');
if(size(img,3)>1)
img=rgb2gray(img);
end
mask=roipoly(img);
filt=fspecial('unsharp');
filt_img=roifilt2(filt,img,mask);
figure, imshow(filt_img);

Antworten (1)

Nitin Kapgate
Nitin Kapgate am 15 Jan. 2021
You can use the imsharpen function to sharpen a ROI in your image as illustrated here.
  1 Kommentar
Ali Zulfikaroglu
Ali Zulfikaroglu am 16 Jan. 2021
I tried but I got still same image.
My code is in here which is applied your solution way with imsharpen.
I drawed my circle with roipoly function
and then filtered. But it looks crystallized which is showen above ,not sharpened.
img=imread('image.jpg');
if(size(img,3)>1)
img=rgb2gray(img);
end
mask=roipoly(img);
f = @(x)imsharpen(x,'Amount',3)
filt_img=roifilt2(img,mask,f);
figure, imshow(filt_img);

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by