Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14741 > unrolled thread
| Started by | Antonio Alvaro Ranha Neves <aneves@gmail.com> |
|---|---|
| First post | 2013-06-05 07:16 +0000 |
| Last post | 2013-06-06 11:23 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Image processing of Centroid and Radius Antonio Alvaro Ranha Neves <aneves@gmail.com> - 2013-06-05 07:16 +0000
Re: Image processing of Centroid and Radius stephen.p.luttrell@gmail.com - 2013-06-06 11:23 +0000
| From | Antonio Alvaro Ranha Neves <aneves@gmail.com> |
|---|---|
| Date | 2013-06-05 07:16 +0000 |
| Subject | Image processing of Centroid and Radius |
| Message-ID | <komol9$1v5$1@smc.vnet.net> |
Dear group members, I've been doodling with Mathematica's image processing, after seeing the example, "Analyze Segmented Cells in an Image" at http://reference.wolfram.com/mathematica/example/AnalyzeSegmentedCellsInAnImage.html It seemed beautiful, and I quickly wanted to automated a problem of mine, here is a sample image http://img850.imageshack.us/img850/6925/samplerd.png It is a single unilaminar vesicle (the big low contrast disk), and I basically want to determine its center and radius. The radius should be from the center up to an inflection point of a sigmoid type curve (between the dark and light halo). I've tried several of Mathematicas built-in filters before trying to binarize, without success. Any hint from those of you who uses image processing? In the end I know I have to use ComponentMeasurements[SelectComponents["Binarized Image"], "Centroid"] and "SemiAxes", but the difficulty is trying to binarize a low contrast image. Thanks, Antonio
[toc] | [next] | [standalone]
| From | stephen.p.luttrell@gmail.com |
|---|---|
| Date | 2013-06-06 11:23 +0000 |
| Message-ID | <koprf0$cgl$1@smc.vnet.net> |
| In reply to | #14741 |
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 (http://img850.imageshack.us/img850/6925/samplerd.png), 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web