Clear Filters
Clear Filters

how can i draw small circles on several specific pixels and count all the pixels inside these circles

2 views (last 30 days)
I have a road map and i am trying to put circles on each road pixel (which defined the accessibility from the road) and then count all the pixels inside these circles. Can someone help me with this
thanks Mojtaba

Answers (1)

Image Analyst
Image Analyst on 22 May 2017
You can use viscircles() to draw circles in the overlay above the image. From the radius, you know how many complete pixels and partial pixels will be in a circle of that radius.
  2 Comments
Mojtaba Houballah
Mojtaba Houballah on 23 May 2017
Hello,
I dont know if i was clear in my question.
The first problem that I had is sepcifying the center of the circles with the black pixels(the roads), so specifying the coordinates of the pixels.
The second problem is counting the pixels inside these circles (I tried using inpolygon function).
can you give me a small example of how to do that?.
Many thanks in advance Mojtaba

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!