source: trunk/src/read_image.m @ 493

Last change on this file since 493 was 493, checked in by sommeria, 9 years ago

various bugs repaired, tests in Windows OS

File size: 846 bytes
Line 
1%--read images or video objects
2function [A,ParamOut]=read_image(FileName,FileType,VideoObject,num)
3%------------------------------------------------------------------------
4%num is the view number needed for an avi movie
5ParamOut=VideoObject;%default
6switch FileType
7         case 'video'
8            if strcmp(class(VideoObject),'VideoReader')
9                A=read(VideoObject,num);
10            else
11                ParamOut=VideoReader(FileName);
12                A=read(ParamOut,num);
13            end
14        case 'mmreader'
15            if strcmp(class(VideoObject),'mmreader')
16                A=read(VideoObject,num);
17            else
18                ParamOut=mmreader(FileName);
19                A=read(ParamOut,num);
20            end
21    case 'multimage'
22        A=imread(FileName,num);
23    case 'image'   
24        A=imread(FileName);
25end
Note: See TracBrowser for help on using the repository browser.