Adding X-Y axis into image file

24 vues (au cours des 30 derniers jours)
MSK
MSK le 12 Juil 2020
Commenté : MSK le 13 Juil 2020
Hi,
can anyone help me to add horizontal and vertical axis on the below image (dimension is 380*584 pix = 50* 77 mm)

Réponse acceptée

Image Analyst
Image Analyst le 12 Juil 2020
After you call imshow() call axis():
grayImage = imread('image.jpeg');
imshow(grayImage, [], 'XData', [0, 50], 'YData', [0, 77]);
axis('on', 'image');
  4 commentaires
Image Analyst
Image Analyst le 13 Juil 2020
Modifié(e) : Image Analyst le 13 Juil 2020
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');
MSK
MSK le 13 Juil 2020
Thanks a lot.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by