Changeset 493 for trunk/src/read_image.m


Ignore:
Timestamp:
Jul 16, 2012, 10:44:12 AM (9 years ago)
Author:
sommeria
Message:

various bugs repaired, tests in Windows OS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_image.m

    r453 r493  
    11%--read images or video objects
    2 function A=read_image(FileName,FileType,VideoObject,num)
     2function [A,ParamOut]=read_image(FileName,FileType,VideoObject,num)
    33%------------------------------------------------------------------------
    44%num is the view number needed for an avi movie
     5ParamOut=VideoObject;%default
    56switch FileType
    6     case {'video','mmreader'}
    7         A=read(VideoObject,num);
     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
    821    case 'multimage'
    922        A=imread(FileName,num);
Note: See TracChangeset for help on using the changeset viewer.