Plotting the coordinates of maxima
古いコメントを表示
I want to get all the coordinates of the area where maxima is detected i.e. the blob detected area as a separate binary image.The maxima coordinates should be white and other pixels must be black. So im creating an array 'a' in the size of 1655x1655. While execution, in the output image the points are not spreaded entirely for 1655x1655. They are seen only on left top corner of the entire zero array. Im not sure whether all the values of maxima are getting plotted or is there some other issue. How to solve this issue? Pls help me with this. The code and input image is provided in the attached file.
Output image:

4 件のコメント
KSSV
2020 年 1 月 6 日
Why did you attach code as pdf? You can copy it here.
Sk
2020 年 1 月 6 日
Guillaume
2020 年 1 月 6 日
Missing from your code is any comment explaining what it attempts to do. In particular, what is the puprose of each loop?
Note that:
k=1.28;
sigma=2;
logScales=zeros(1,15);
for i=1 : 15
logScales(1,i)= sigma;
sigma=k*sigma;
end
is simply:
k = 1.28;
sigma = 2;
logScales = sigma * k.^(0:14);
回答 (1 件)
Image Analyst
2020 年 1 月 6 日
Try imregionalmax() and find():
maxImage = imregionalmax(binaryImage);
[rows, columns] = find(maxImage);
5 件のコメント
KALYAN ACHARJYA
2020 年 1 月 6 日
If looking for segmentation, here the code (Do change as per requirement)
%% Code: Segmentation: kalyan.matlab1@gmail.com
rgb=imread('rgb.jpg');
BW1=im2bw(rgb2gray(rgb));
BW2=bwareaopen(~BW1,60);
%% This Part @Image Analyst
windowSize=5;
kernel=ones(windowSize)/windowSize^2;
blurryImage=conv2(single(BW2),kernel,'same');
BW3=blurryImage>0.5;
%% Morpho Operation
se=strel('disk',2);
BW3=imclose(BW3,se);
rgb(~BW3)=0; % Mask Apply
imshow(rgb);

Sk
2020 年 1 月 7 日
Image Analyst
2020 年 1 月 7 日
You have not defined what maxima is. imregionalmax() will give a 1 where a pixel is the highest value in a local window. For your RGB image of characters in rock, it's not clear that the characters are the brightest pixels.
As far as segmenting the characters carved in rock, I think there are probably papers on that. Check here VisionBib
Sk
2020 年 1 月 8 日
カテゴリ
ヘルプ センター および File Exchange で Image Segmentation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
