How to replace the 'hardcopy' function with something that will run in Octave

Hello all!
I am working to read in images, lay scatterplot data over them, and then export them as a movie. I have done this successfully in matlab, but need to make it work in Octave now. The only remaining conversion issue is the hardcopy function that I use at the end of the code.
detailed here http://www.mathworks.com/support/solutions/en/data/1-3NMHJ5/?solution=1-3NMHJ5 (in the solution) are two alternatives to the hardcopy function (#2 looks promising) but I'm not sure what of my block of code to replace with the imread calls.
The code I have (which works) is:
renderer = get(hnd,'renderer');
if strcmp(renderer,'painters')
renderer = 'opengl';
end
set(hnd, 'Units', 'pixels');
pixelsperinch = get(0,'screenpixelsperInch');
frame = hardcopy(hnd, ['-d' renderer], ['-r' num2str(round(pixelsperinch))]);
addframe(mov,frame);
I have tried replacing all of that with
addframe(mov,gcf)
But it just returns error: addframe: input frame should be in [0-1]
Any suggestions (or interpretations of the link I posted) on how to use something other than that hardcopy function to accomplish the same goal would be unbeliviably appreciated. Thank you all!

댓글 수: 1

The best way to go is probably to capture the image data directly from openGL. (Probably faster than printing it as an image, imreading it, and then adding that as a frame) But, I'm really not sure, and am ok with something being slower if it works.

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

답변 (1개)

Jan
Jan 2013년 8월 17일

0 개 추천

Perhaps FEX: ScreenCapture runs under Octave also.
Which OS do you use?

댓글 수: 1

Thanks for responding Jan! Sorry it took so long for me to get back to you (I was in the adirondacks). I'm using Windows 7.

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

카테고리

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

질문:

Cam
2013년 8월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by