MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Image processing of Centroid and Radius

  • To: mathgroup at
  • Subject: [mg131046] Re: Image processing of Centroid and Radius
  • From: stephen.p.luttrell at
  • Date: Thu, 6 Jun 2013 07:28:28 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <komol9$1v5$>

You can detect a circular feature in an image by correlating the image with a kernel image of a circle with the same radius.

I had a quick look at your image (, and found that the following code nicely detects your circular feature.

im = <your image>
im2 = im // ImageAdjust // ColorNegate
ker = {FaceForm[White], EdgeForm[{Black, Thickness[0.1]}], Disk[]} // 
    Graphics // Rasterize[#, ImageSize -> 140] & // ColorNegate
corr = ImageCorrelate[im2, ker] // ImageAdjust

This solution needs to be tidied up and extended, but this approach gives you a fairly direct way of extracting the centroid and radius as you requested.

Stephen Luttrell

  • Prev by Date: Re: Unexpected expectation behaviour
  • Next by Date: Re: Adding value to some elements of a list
  • Previous by thread: Image processing of Centroid and Radius
  • Next by thread: Setting the Font Family and Font Size in BoxWhiskerChart