| MATLAB Central > MATLAB Newsreader > Measuring object width in an image, thanks |
|
|
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 9 Aug, 2012 08:10:14 Message: 1 of 14 |
|
Dear all, |
|
Subject: Measuring object width in an image, thanks From: Image Analyst Date: 9 Aug, 2012 11:32:14 Message: 2 of 14 |
|
How about using improfile to let the user pick it interactively? |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 9 Aug, 2012 12:59:13 Message: 3 of 14 |
|
Thanks a lot, but that is not possible. The project needs the algorithm to run automatically. |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 10 Aug, 2012 06:40:23 Message: 4 of 14 |
|
Can somebody help me? Thanks a lot. |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 10 Aug, 2012 14:34:16 Message: 5 of 14 |
|
Ask for help again, :) |
|
Subject: Measuring object width in an image, thanks From: Image Analyst Date: 11 Aug, 2012 00:47:07 Message: 6 of 14 |
|
Why not just mask out stuff known not to be part of the cylinder, then sum vertically to get the average profile, then threshold to find where the edge of the cylinder starts and stops. Should be very easy. Can you upload the original image (without the white box)? |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 13 Aug, 2012 07:38:06 Message: 7 of 14 |
|
I think the problem lies in that non-cylinder is not easily detected. I have uploaded an original image (http://farm9.staticflickr.com/8431/7771948574_6eca7b0741_k.jpg). Do you have any ideas how to measure the diameter of the cylinder? Thank you so much. |
|
Subject: Measuring object width in an image, thanks From: Matt J Date: 13 Aug, 2012 09:44:06 Message: 8 of 14 |
|
"Digistar You" <digistar2003@163.com> wrote in message <k0aasu$br2$1@newscl01ah.mathworks.com>... |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 13 Aug, 2012 10:47:06 Message: 9 of 14 |
|
Thanks Matt for the ideas. However, in my project, the problem is that the ends of the narrow red bands do not already match the edges of the cylinder. For example, I have uploaded another image (http://farm9.staticflickr.com/8296/7772735060_57e3bffcc3_k.jpg). Thus, it seems I have to detect the red narrow band in the middle first, and then try to measure its diameter. This seems to be not very easy. Do you have any suggestions? Thanks a lot. |
|
Subject: Measuring object width in an image, thanks From: Matt J Date: 13 Aug, 2012 13:47:09 Message: 10 of 14 |
|
"Digistar You" <digistar2003@163.com> wrote in message <k0alva$dch$1@newscl01ah.mathworks.com>... |
|
Subject: Measuring object width in an image, thanks From: ImageAnalyst Date: 13 Aug, 2012 23:32:10 Message: 11 of 14 |
|
I agree with Matt. Actually this image looks even easier than your first one because there is far less clutter. It looks like a laser beam coming up at an angle and hitting a rod/shaft/cylinder so you should be able to narrow down the position somewhat, due to a known range of diameters, and just crop out that portion, making the alignment and profiling even easier. |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 14 Aug, 2012 08:24:07 Message: 12 of 14 |
|
Hi Matt, thank you so much for your time. I couldn't completely understand your suggestions, I guess the reason is that I didn't fully understand the meaning of Radon transform. I have read many explanations about the Radon transform, and now I think I should know what it does. I have used Matlab radon function to perform the Radon transform on the second image, and then got the result (http://farm9.staticflickr.com/8425/7779863888_1e30c421dc.jpg). According to the result (peak point at theta=89 degrees), I know the tilt of the red bands, based on which I may calculate the average profile later based on ImageAnalyst's suggestion. |
|
Subject: Measuring object width in an image, thanks From: Matt J Date: 14 Aug, 2012 15:38:06 Message: 13 of 14 |
|
"Digistar You" <digistar2003@163.com> wrote in message <k0d1v7$inc$1@newscl01ah.mathworks.com>... |
|
Subject: Measuring object width in an image, thanks From: Digistar You Date: 15 Aug, 2012 15:31:14 Message: 14 of 14 |
|
Dear Matt, thank you so much for your time and detailed explanations. Now I completely understand your suggestions. I have also tested the algorithm on a few simple images, which works well. I will see if it works with more complex images. Thank you very much. |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
