define a scale on an image
12 ビュー (過去 30 日間)
古いコメントを表示
Hello, I'm using matlab gui to count objects in an image and plot an histogram which shows the size distribution of these latest. My problem is the X axis of the histogram corresponds to the number of pixels forming the edges of the objects. In the image i want to analyse, I have a bar which corresponds to the scale in meter. Does anyone know how to measure this scale to convert the number of pixels in the X axis to meter ?
Thank you in advance :) Hadi
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 2 月 9 日
You need to calculate/determine a spatial calibration factor. Are you looking through a microscope or telescope? The number of meters per pixel will be vastly different for those two cases. What is your field of view? Basically to get linear distances you need to multiply pixels by meters per pixel, and to get squared things, like area, you need to multiply by (meters per pixel)^2.
See my attached spatial calibration demo.
5 件のコメント
Image Analyst
2018 年 11 月 8 日
Yes but you'd have to measure at two locations and develop a spatial calibration "image" that gives you the spatial calibration at each location. I think that's probably what the camera calibration function in the Computer Vision System Toolbox does, though I haven't used it. See https://www.mathworks.com/products/computer-vision/features.html#camera-calibration since that's exactly what you need.
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!