Separating features using imopen with bright and dark features.

1 visualizzazione (ultimi 30 giorni)
Hello, I would like to be able to get the centroid of the white spot as well as where the cross hairs meet. So I though its best to try and seperate out the lines and the circular blob using morphological operations.
I have had some success using imopen when the circular blob ** and ** cross hairs are bright i.e.
(this was a perfect image I created in paint)
my code for this is:
SE = strel("disk",7);
BW1=imopen(IM,SE);
But I don't see how to seperate the circular blob and cross hairs when one is bright and one is dark, and for my real image. Any help greatly appreciated.

Risposte (1)

Raunak Gupta
Raunak Gupta il 27 Mag 2020
Hi,
I can suggest two approach to do the same.
  1. You may use contrast enhancement first followed by morphological techniques so that cross hair and circle is detected as required. You may refer to Contrast Enhancement Techniques for the same.
  2. If you are sure that one part is dark, and one part is bright then you may separate the two component by first taking the bright part in one image and then complimenting the image by subtracting every pixel from 255 in second image. This will give an image that looks bright even if original part was dark. Then you can process both images separately for finding the cross hair and circle.
Hope it helps.

Community Treasure Hunt

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

Start Hunting!

Translated by