Adding X-Y axis into image file
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MSK
el 12 de Jul. de 2020
Comentada: MSK
el 13 de Jul. de 2020
Hi,
can anyone help me to add horizontal and vertical axis on the below image (dimension is 380*584 pix = 50* 77 mm)
0 comentarios
Respuesta aceptada
Image Analyst
el 12 de Jul. de 2020
After you call imshow() call axis():
grayImage = imread('image.jpeg');
imshow(grayImage, [], 'XData', [0, 50], 'YData', [0, 77]);
axis('on', 'image');
4 comentarios
Image Analyst
el 13 de Jul. de 2020
Editada: Image Analyst
el 13 de Jul. de 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');
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!