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 Kommentar

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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 17 Aug. 2013
Perhaps FEX: ScreenCapture runs under Octave also.
Which OS do you use?

1 Kommentar

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.

Melden Sie sich an, um zu kommentieren.

Gefragt:

Cam
am 16 Aug. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by