Code covered by the BSD License
-
bayermask(data,pattern)
bayermask provides sampled bayer CFA data and bayer mask
-
bayersampling( rgb, pattern )
bayersampling samples pixel value associated bayer color filter array
-
eachchannel(func, src)
eachchannel allows us to apply function for each channel
-
imgrad(X)
imgrad calculates horizontal and vertical gradients.
-
impsnr(X, Y, peak, b)
impsnr evaluates the psnr and the rmse beween images
-
imreadind(filename, varargin)
imreadind reads image file from file
-
patch2img(X, mn, mnImg )
patch2img compose image from columned image patches by averaging (almost same to col2im)
-
patchdctfilter(X,dctfilter)
patchdctfilter applys dct filter for each columned image patches
-
patchtiling(X, psize, tsize, ...
patchtiling tiles columned image patches as a image
-
rgb123(str)
-
rgb2ycc(rgb)
rgb2ycc transfers color space from rgb to ycc
-
ycc2rgb(ycc)
ycc2rgb transfers color space from ycc to rgb
-
View all files
from
Miscellaneous tools for image processing
by Masayuki Tanaka
It includes some miscellaneous useful image processing functions.
|
| eachchannel(func, src)
|
% eachchannel allows us to apply function for each channel
%
% dst = eachchannel(func, src)
%
%
%Output parameter:
% dst: output of function
%
%Input parameters:
% func: function to be applied
% src: input image data
%
%
%Example:
% X = double(imread('img.jpg'));
% Xdct = eachchannel(@(X)(dct2(X)), X);
%
%
%Version: 20120629
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Miscellaneous tools for image processing %
% %
% Copyright (C) 2012 Masayuki Tanaka. All rights reserved. %
% mtanaka@ctrl.titech.ac.jp %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dst = eachchannel(func, src)
if( size(src,3) > 1 )
for i=1:size(src,3)
dst(:,:,i) = func(src(:,:,i));
end
else
dst = func(src);
end
|
|
Contact us