How do I measure a distance in a pic and get access of those pixel in that line.
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166711/image.png)
I'm currently working on a project needs to batch process some image. I need to locate the line in the image which is the shortest distance from left to right and get access to those pixels on that line. can anyone help me? very urgent!
回答(1 个)
Image Analyst
2017-8-16
Try improfile() to manually draw a line and get the pixel values under it along with the coordinates, from which you can get the distance.
If you want to automatically find it, then find the left and right sides, then use pdist2().
Let me know if you need help.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!