Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1687
| From | Stefan <wutchamacallit27@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: x y coordinates of image pixels for an image outline |
| Date | 2011-04-15 07:56 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <io8tna$qav$1@smc.vnet.net> (permalink) |
| References | <io17cv$i44$1@smc.vnet.net> |
On Apr 12, 5:52 am, william parr <willpower...@hotmail.com> wrote: > Dear Mathgroup, > > I think this problem is fairly straight forward, but I'm struggling with it! > > essentially, I want to; > 1) determine/assign x y coordinate values to the black pixels in a binarised image. > 2) select the outline black pixels (and get their x y coordinates) on each line of the image. > > This falls within a larger project of wanting to recover the outside outline (ie surface outline with x y coordinates) of a bone from a CT slice image. I would then probably aim to create a 3D point cloud for the external bone surface by assigning each slice a z coordinate value. However, unless anyone has a very clever (ie not processor intensive) way of of creating a polygon mesh from the 3D point cloud, I will probably export the point cloud for surface meshing in another program. > > thanks in advance, > > Will Will, Not too long ago I was trying to do the same thing with an image, though for a different purpose. What I did was use MorphologicalComponents[] on the binarized image, which returns another image with white pixels on the boundary of the object in the image. I then used Position[ImageData[%],1] to find the pixel coordinates of all the white pixels in that image. Then a simple coordinate transformation can be applied to this list to arrive at the correct points in x-y. Then like you said, I'm sure you could add a z coordinate based on the order of the images. Binarize[pic]; MorphologicalComponents[%]; Position[ImageData[%],1]; points = Map[myCoordinateTransform,%]; -Stefan
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
x y coordinates of image pixels for an image outline william parr <willpowers69@hotmail.com> - 2011-04-12 09:52 +0000
Re: x y coordinates of image pixels for an image outline Stefan <wutchamacallit27@gmail.com> - 2011-04-15 07:56 +0000
Re: x y coordinates of image pixels for an image outline Stefan <wutchamacallit27@gmail.com> - 2011-04-16 11:33 +0000
csiph-web