Adding X-Y axis into image file
124 次查看(过去 30 天)
显示 更早的评论
Hi,
can anyone help me to add horizontal and vertical axis on the below image (dimension is 380*584 pix = 50* 77 mm)
0 个评论
采纳的回答
Image Analyst
2020-7-12
After you call imshow() call axis():
grayImage = imread('image.jpeg');
imshow(grayImage, [], 'XData', [0, 50], 'YData', [0, 77]);
axis('on', 'image');
4 个评论
Image Analyst
2020-7-13
编辑:Image Analyst
2020-7-13
You can use flipud() on the variable as you pass it into imshow():
grayImage = imread('image.jpeg');
imshow(flipud(grayImage), [], 'XData', [0, 50], 'YData', [0, 77]);
axis('on', 'image', 'xy');
Or reverse the numbers for YData:
grayImage = imread('image.jpeg');
imshow(grayImage, [], 'XData', [0, 50], 'YData', [77, 0]);
axis('on', 'image', 'xy');
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!