资源简介
基于SEDMI方法实现的视频摘要,video synopsis。
代码片段和文件信息
function varargout = colorspace(Conversionvarargin)
%COLORSPACE Convert a color image between color representations.
% B = COLORSPACE(SA) converts the color representation of image A
% where S is a string specifying the conversion. S tells the
% source and destination color spaces S = ‘dest<-src‘ or
% alternatively S = ‘src->dest‘. Supported color spaces are
%
% ‘RGB‘ R‘G‘B‘ Red Green Blue (ITU-R BT.709 gamma-corrected)
% ‘YPbPr‘ Luma (ITU-R BT.601) + Chroma
% ‘YCbCr‘/‘YCC‘ Luma + Chroma (“digitized“ version of Y‘PbPr)
% ‘YUV‘ NTSC PAL Y‘UV Luma + Chroma
% ‘YIQ‘ NTSC Y‘IQ Luma + Chroma
% ‘YDbDr‘ SECAM Y‘DbDr Luma + Chroma
% ‘JPEGYCbCr‘ JPEG-Y‘CbCr Luma + Chroma
% ‘HSV‘/‘HSB‘ Hue Saturation Value/Brightness
% ‘HSL‘/‘HLS‘/‘HSI‘ Hue Saturation Luminance/Intensity
% ‘XYZ‘ CIE XYZ
% ‘Lab‘ CIE L*a*b* (CIELAB)
% ‘Luv‘ CIE L*u*v* (CIELUV)
% ‘Lch‘ CIE L*ch (CIELCH)
%
% All conversions assume 2 degree observer and D65 illuminant. Color
% space names are case insensitive. When R‘G‘B‘ is the source or
% destination it can be omitted. For example ‘yuv<-‘ is short for
% ‘yuv<-rgb‘.
%
% MATLAB uses two standard data formats for R‘G‘B‘: double data with
% intensities in the range 0 to 1 and uint8 data with integer-valued
% intensities from 0 to 255. As MATLAB‘s native datatype double data is
% the natural choice and the R‘G‘B‘ format used by colorspace. However
% for memory and computational performance some functions also operate
% with uint8 R‘G‘B‘. Given uint8 R‘G‘B‘ color data colorspace will
% first cast it to double R‘G‘B‘ before processing.
%
% If A is an Mx3 array like a colormap B will also have size Mx3.
%
% [B1B2B3] = COLORSPACE(SA) specifies separate output channels.
% COLORSPACE(SA1A2A3) specifies separate input channels.
% Pascal Getreuer 2005-2006
%%% Input parsing %%%
if nargin < 2 error(‘Not enough input arguments.‘); end
[SrcSpaceDestSpace] = parse(Conversion);
if nargin == 2
Image = varargin{1};
elseif nargin >= 3
Image = cat(3varargin{:});
else
error(‘Invalid number of input arguments.‘);
end
FlipDims = (size(Image3) == 1);
if FlipDims Image = permute(Image[132]); end
if ~isa(Image‘double‘) Image = double(Image)/255; end
if size(Image3) ~= 3 error(‘Invalid input size.‘); end
SrcT = gettransform(SrcSpace);
DestT = gettransform(DestSpace);
if ~ischar(SrcT) & ~ischar(DestT)
% Both source and destination transforms are affine so they
% can be composed into one affine operation
T = [DestT(:1:3)*SrcT(:1:3)DestT(:1:3)*SrcT(:4)+DestT(:4)];
Temp = zeros(size(Image));
Temp(::1) = T(1)*Image(::1) + T(4)*Image(::2) + T(7)*Image(::3) + T(10);
Temp(::2) = T(2)*Image(::1) + T(5)*Image(::
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-12 16:14 SEDIM\
文件 29301 2016-03-21 02:40 SEDIM\Clipboard01.gif
文件 14019 2016-03-21 02:40 SEDIM\colorspace.m
文件 3781452 2016-03-21 02:40 SEDIM\foreman.avi
文件 512610 2017-05-12 15:55 SEDIM\foreman_Video_Synopsis_a0.1.avi
文件 805 2016-03-21 02:40 SEDIM\getCLD.m
文件 999 2016-03-21 02:40 SEDIM\getDistortCLD.m
文件 899 2016-03-21 02:40 SEDIM\getKeyfr
文件 1161 2016-03-21 02:40 SEDIM\getKeyfr
文件 1544 2016-03-21 02:40 SEDIM\HierarchicalAlg1.m
文件 1555 2016-03-21 02:40 SEDIM\HierarchicalAlg2.m
文件 1319 2016-03-21 02:40 SEDIM\license.txt
文件 1878 2016-03-21 02:40 SEDIM\readme.txt
文件 45 2017-05-12 15:54 SEDIM\rundemo.m
文件 1736 2016-03-21 02:40 SEDIM\TimeEquidistant.m
文件 818 2017-05-12 14:56 SEDIM\video_writer.m
文件 11387 2017-05-12 14:46 SEDIM\vsyn.m
- 上一篇:内存测试工具
- 下一篇:结构力学求解器3D版试用60天
评论
共有 条评论