How can I find center coordinates of six black rectangles in a image with HitMiss transformation?

2 ビュー (過去 30 日間)
Hey everyone! In my image, there are six black rectangles in size 11 x 11 pixels. I have to use the method of the Hit-or-Miss transform
to find the centre coordinates of these rectangles and also I cannot use function BWHITMISS.Therefore, I have my erosion,dilation function (without imerode or imdilate).I have to use these function while doing hit-miss transform.How can I find center coordinates of six black rectangles in the image with HitMiss transformation? Thanks for your attention by now!
The attached are my image and erosion and dilation functions.
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 3 月 4 日
Is it fixed to be use Hit-or-Miss ransform or we can approach other way also?
Ayberk Ay
Ayberk Ay 2020 年 3 月 4 日
I have to use hit ot miss transform to find centers.

サインインしてコメントする。

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 3 月 4 日
bwImage=imread('semafor.bmp');
result=bwareaopen(~(bwImage | bwareafilt(~bwImage,1)),50);
imshow(result);
Now get the indices & calculate the mid spatial positions
  5 件のコメント
Image Analyst
Image Analyst 2020 年 3 月 15 日
I've added the tag "Homework" to your post. In the future, please do that so that we don't give you complete solutions which would get you into ethical trouble with your teacher, or lead you to deleting questions, which would lead to displeasure from Answers people who took the time and trouble to help you. If you do delete something, do it very quickly, before anyone has answered it or else there's a chance it might be restored.
Ayberk Ay
Ayberk Ay 2020 年 3 月 15 日
oh I see, thanks for this info. I'll be more careful about asking questions.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by