how to save siteviewer image from coverage function

Antenna toolbox coverage function plots propagation terrain image. How to set image size and save image in script,? If manually adjusted the size of the image, how to save the image?

댓글 수: 5

Actually coverage function has save image in Temporary Location. To get that image, command to select current viewer. In viewer.TempFiles, you will see location that it saves coverage image.
Capture1.PNG
When you say "save siteviewer image", does that mean you want to save a screenshot of siteviewer?
Also, what do you mean by "set image size" and "manually adjusted size of image"? Are you referring adjusting the size of the Site Viewer window, or some other image?
I was hoping to save the image similar to saving a plot, such as saveas() or savefig() in the matlab script and to be able to configure the size, orientation, etc. Stuff that one does to figures in matlab script. -jc
cheat morokot
cheat morokot 2019년 5월 14일
편집: cheat morokot 2019년 5월 14일
This is image that I get from coverage of siteviewer. Follow my comment above, you will get what you want.
cheat morokot
cheat morokot 2019년 5월 14일
편집: cheat morokot 2019년 5월 14일
You can view this video to get image from coverage function. (https://www.youtube.com/watch?v=P9Lstv0NFEI)

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

 채택된 답변

Abhi Sundararaman
Abhi Sundararaman 2019년 5월 14일
Based on your responses, it looks like you want to save a snapshot of the Site Viewer window, similar to saving a figure window's contents. Unfortunately, Site Viewer doesn't currently have any functionality similar to "savefig" or "saveas" for figures. For now you'd have to use utilities like "print screen" to save an snapshot of the Site Viewer.
You also mentioned wanting to change the size and orientation of the Site Viewer via script. Unfortunately, the orientation currently cannot be set using a script. You can still set the size of the viewer by changing the last two values of the "Position" field of the viewer like so.
viewer = siteviewer;
width = 600; % screen pixels
height = 400; % screen pixels
viewer.Position(3:4) = [width height]

댓글 수: 1

Guess the best solution for now is windows prt screen. The solution of /apddata/temp/xx.png not having the terrain background, legends and icons is less useful. Thank you for the assistance.

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

추가 답변 (1개)

John K.
John K. 2021년 1월 19일

0 개 추천

Another way to capture screenshots of siteviewer directly from within Matlab is to use the screenshot diagnotic class.
png files are stored to a temporary directory and a prefix can be defined.
Create a TestCase for interactive use.
import matlab.unittest.TestCase
testCase = TestCase.forInteractiveUse;
Use a ScreenshotDiagnostic to log an image of the desktop as a test diagnostic with a custom prefix
import matlab.unittest.diagnostics.ScreenshotDiagnostic
testCase.log(ScreenshotDiagnostic('Prefix','LoggedScreenshot_'))

카테고리

도움말 센터File Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

질문:

2019년 4월 18일

답변:

2021년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by