Adding X-Y axis into image file
조회 수: 21 (최근 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!