MATLAB: How to get odd rows and columns,even rows and columns . A1 is the lena image A is to the first row similarly how to get the even rows ,even columns,odd rows,odd columns A1 = imread('lena1.jpg'); A=A1(:,1); Best Answer Consider you have number of rows and columns which is an even number,Odd rows:A1(1:2:end-1,:)Even rows:A1(2:2:end,:)Odd columns:A1(:,1:2:end-1)Even columns:A1(:,2:2:end) Related SolutionsMATLAB: I have converted image into 16*16 block. How can i convert these block into video Vidya - consider using the videowriter to write each of your block images to file. See the examples in the provided link to get an idea on what you can try. MATLAB: How to Remove a Column and add it again %copy original image (img) without first column if number of column is oddnewimage = 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]; Related QuestionHow can you extract odd and even rows and columns from image to seperate image outputsError using subplot (line 301) Index exceeds number of subplots.Concatenating even and odd rowsSplitting a matrix by even and odd numbers
Best Answer