Prev: Removing indices from a vector
Next: Creating Noise
From: k on 3 Apr 2010 12:27 Hello, i am a final year student doing my project is on image processing in this i want to find the major and minor axis length of the image.please help me .i want the matlab coding to find major and minor axis length.please help me as soon as possible.thanks in advance.
From: ImageAnalyst on 3 Apr 2010 12:42 "k " <kkousaly...(a)gmail.com> : regionprops() has one definition of it. You can check out this demo: http://www.mathworks.com/matlabcentral/fileexchange/25157 but regionprops() probably doesn't calculate the type of major axis length that you're thinking of - it does it based on fitting the blob to an ellipse. You might have to use bwboundaries() and scan the boundary coordinates yourself and then do another, more complicated scan perpendicular to the major axis to get the minor axis (if that's your definition of it). If you think about it, you can some up with several definitions of minor axis length.
From: k on 3 Apr 2010 23:55 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <0be2a79d-8876-4157-94dd-78e628b1cc12(a)31g2000vbq.googlegroups.com>... > "k " <kkousaly...(a)gmail.com> : > regionprops() has one definition of it. You can check out this demo: > http://www.mathworks.com/matlabcentral/fileexchange/25157 > but regionprops() probably doesn't calculate the type of major axis > length that you're thinking of - it does it based on fitting the blob > to an ellipse. You might have to use bwboundaries() and scan the > boundary coordinates yourself and then do another, more complicated > scan perpendicular to the major axis to get the minor axis (if that's > your definition of it). If you think about it, you can some up with > several definitions of minor axis length. hi this code does not work for my image.please give me any other code.its very urgent .please reply me soon.
From: ImageAnalyst on 4 Apr 2010 00:16 The demo code uses bwboundaries(). That should be enough for you to get started. I don't have a turnkey solution for you, but I'm sure you could get one yourself in less than an hour. It's really not that hard - it really isn't. Just use the dumb brute force method to scan all the pixels to find the distances between every pixel and every other pixel, and keep track of the coordinates of the pair that are farthest apart. If you've been programming more than a few months I'm sure you've had a for loop where you had to scan things looking for the max or min - it's pretty standard stuff. If you truly can't figure it out, post your code here and someone may help you. I can't do anything more until tomorrow but you'll probably have it solved by then.
|
Pages: 1 Prev: Removing indices from a vector Next: Creating Noise |