📄 compute_patch_library.m
字号:
function [H,X,Y] = compute_patch_library(M,w,options)
% [H,X,Y] = compute_patch_library(M,w,options);
%
% M is the texture
% w is the half-width of the patch, so that each patch
% has size (2*w+1,2*w+1,s) where s is the number of colors.
%
% H(:,:,:,i) is the ith patch (can be a color patch).
% X(i) is the x location of H(:,:,:,i) in the image M.
% Y(i) is the y location of H(:,:,:,i) in the image M.
%
% options.sampling can be set to 'random' or 'uniform'
% If options.sampling=='random' then you can define
% options.nbr as the number of random patches and/or
% option.locations_x and option.locations_y.
%
% If w is a vector of integer size, then the algorithm
% compute a set of library, one for each size,
% and use the same location X,Y for each patch.
% H{k} is the k-th library.
%
% You can define options.wmax to avoid too big patch.
% In this case, if w>wmax, the texture M will be filtered, and the patches
% will be subsampled to match the size.
%
% Copyright (c) 2006 Gabriel Peyr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -