How to actually using image(x,y,c) function?

Dear all, since I read the documentation about image(x,y,c) function and understand a few things, I ask you please tell me how this function works with a very simple example.
I know c is the image. I have an example if anyone can clarify for me I think I could understand the problem.
I have a large size image (c) which I read it using imread. I want to put it in latitude = 40 and longitude = 30; as the c is large I can make it small so it can take little place on figure using x and y upper right corner and lower-left corner. So is this what should I do?
LowerLeftCornerLat = 40 - (1/2);
LowerLeftCornerLon = 30 - (1/2);
UperrRightCornerLat = 40 + (1/2);
UperrRightCornerLon = 30 + (1/2);
After that how I can using this in image as x and y, is this true?
img1_lon = [LowerLeftCornerLon,UperrRightCornerLon];
img1_lat = [LowerLeftCornerLat,UperrRightCornerLat];
and then:
Image (img1_lon,img1_lat,c)
So is this true? is these steps can add my image with a small size on the figure?
Any help is highly appreciated.

댓글 수: 3

Walter Roberson
Walter Roberson 2020년 4월 14일
편집: Walter Roberson 2020년 4월 14일
Those look plausible, except for needing to use image intead of Image
But be careful because the coordinates refer to the center of pixels, so if you wanted the bottom left to be at 40, you would put the center at 40 plus 1/2 pixel [converted to data units], not at 40 plus 1/2 data unit and not at 40 minus 1/2.
Adam Danz
Adam Danz 2020년 4월 14일
편집: Adam Danz 2020년 4월 14일
@Behzad, if you check out my most recent comment in that link, you'll see how to shrink the image size.
BN
BN 2020년 4월 14일
편집: BN 2020년 4월 14일
Thank you all, this was very helpful. ??

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

BN
2020년 4월 14일

편집:

BN
2020년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by