Finding Distance Between Lines
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi All, I am trying to learn how to process images in Matlab. I am trying to find the horizontal/vertical distance from the outer edge of the major gridline to other outer edge of the major gridline. The major gridlines are spaced 1" apart. I have attached some graph paper for visualization. I have a few questions as to how to start the process. Do I need to convert the image to binary in order to find the edges? How would I determine the exact edge of the gridline? How can I get the count of the pixels between these two edges?
Any guidance would be greatly appreciated to get me started in the right direction.
Thanks!
Added a PNG file.
0 Commenti
Risposte (2)
Image Analyst
il 21 Gen 2015
Get profiles and look at full width at half max
verticalProfile = sum(grayImage, 2);
horizontalProfile = sum(grayImage, 1);
subplot(2,1,1);
plot(verticalProfile);
subplot(2,1,2);
plot(horizontalProfile);
5 Commenti
Image Analyst
il 22 Gen 2015
Modificato: Image Analyst
il 22 Gen 2015
I'll look at it later this morning. In the meantime, do you have a PNG, BMP, or TIFF file? JPG files are not good for image analysis because of the jpeg artifacts like block artifacts and blurring. It's easier to go from center to center - you can use findpeaks() in the Signal Processing Toolbox. Is that okay? Do you have that toolbox?
sukuchha shrestha
il 22 Gen 2015
use thresholding to get major grid lines run with horizontal line structuring element to get vertical major grids ( imgV) run with vertical line structuring element to get horizonal major grids(imgH) label imgV and get minX, minY for every blobs compute distance ( x-x)2+(y-y)2
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!