How can I Remove a Column and add it again?
2 visualizzazioni (ultimi 30 giorni)
I want to remove first column from an Image and do some thing on Image and then add that column again. I want to remove a colum if the number of column is odd. _
The speed and Performance of solution is important for me._
Could you help me?
Guillaume il 25 Giu 2015
%copy original image (img) without first column if number of column is odd
newimage = img(:, 2-mod(size(img, 2), 2):end, :);
%do something with newimage
%add back first column if size is odd.
newimage = [img(:, 1:mod(size(img, 2), 2), :) newimage];