From 3f3f033436d0df7991bc5e06b8afaafeceaab2d0 Mon Sep 17 00:00:00 2001 From: Elian Dib <elian.dib@inria.fr> Date: Tue, 7 May 2019 13:41:17 +0200 Subject: [PATCH] Added replication function --- replicate.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 replicate.m diff --git a/replicate.m b/replicate.m new file mode 100644 index 0000000..a417fdd --- /dev/null +++ b/replicate.m @@ -0,0 +1,14 @@ +function LFRef = replicate(LFRef,ResOff) +%REPLICATE Summary of this function goes here +% Detailed explanation goes here + +LFSize = size(LFRef); +ImgSize = LFSize(1:3); +ImgRes = LFSize(4:end); +ResOff = num2cell(ResOff); + +LFRef = reshape(LFRef,prod(ImgSize),prod(ImgRes)); +LFRef = utils.replicate(LFRef,sub2ind(ImgRes,ResOff{:})); +LFRef = reshape(LFRef ,[ImgSize,ImgRes]); + +end \ No newline at end of file -- GitLab