Hi
What's the easiest way to filter a frame that was just captured using Screen('GetCapturedImage, ...). I'd like to use some filters from OpenCV libraries (I uploaded them through the mex function) or even filters provided by Matlab. However, all what Screen('GetCapturedImage'...) returns is a pointer/handle, not a frame. How can I extract the frame?
I know Psychtoolbox provides some obscure functions (shaders) for image processing but there is barely some documentation out there about those and they are not flexible. Manipulating the frame(s) directly would be ideal.
Ex.
while <cond.>
...
Frame = Screen('GetCapturedImage', ...);
rgb2gray(Frame); (or any other filter from Matlab/OpenCV)
Screen('DrawTexture', ...);
...
end
Any ideas?
Thanks,
What's the easiest way to filter a frame that was just captured using Screen('GetCapturedImage, ...). I'd like to use some filters from OpenCV libraries (I uploaded them through the mex function) or even filters provided by Matlab. However, all what Screen('GetCapturedImage'...) returns is a pointer/handle, not a frame. How can I extract the frame?
I know Psychtoolbox provides some obscure functions (shaders) for image processing but there is barely some documentation out there about those and they are not flexible. Manipulating the frame(s) directly would be ideal.
Ex.
while <cond.>
...
Frame = Screen('GetCapturedImage', ...);
rgb2gray(Frame); (or any other filter from Matlab/OpenCV)
Screen('DrawTexture', ...);
...
end
Any ideas?
Thanks,