image thumbnail

videoioPlayer

by

 

16 Feb 2012 (Updated )

This package contains a videoplayer class capable of viewing and processing video files in real-time

demo_photoshopTB(fname)
function vp = demo_photoshopTB(fname)

pstb = which('pslaunch') ;
if isempty(pstb)
    warning(['To run test ' mfilename ...
        ' the photoshop toolbox must be installed'])
    vp = [] ;
    return
else
    
end

if ~exist('fname','var')
    fname = which('traffic.avi') ;
end

% config PS
psconfig('pixels', 'pixels', 0, 'no');

% start video player
vp = videoioPlayer(fname,'ffmpegDirect', ...
    'position',[500 300],'title',mfilename);

% open new PS document
psnewdoc(vp.width, vp.height);

% set filter function
vp.filter = @filter ;

% filter function
    function out = filter(im)
        pssetpixels(im) ;
        psgaussianblur(4);
        out = psgetpixels ;        
    end

end

Contact us