%     This code implements the recoloring method described in the paper:
%     Musialski, P., Cui, M., Ye, J., Razdan, A., & Wonka, P. (2012). 
%     A Framework for Interactive Image Color Editing. 
%     The Visual Computer, 29(11), 1173–1186. doi:10.1007/s00371-012-0761-5

%     Copyright (C) 2011-2013, Przemyslaw Musialski, pm@cg.tuwien.ac.at
% 
%     This program is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     (at your option) any later version.
% -------------------------------------------------------------------------


function [output] = WrapVector2Image(input,row,col)

% assume image is m by n by c dimension, make it a m*n by c matrix

channel = size(input,2);
output = zeros(row, col, channel); 
for i = 1:channel
    output(:,:,i) = reshape(input(:,i),row,col);
end