MATLAB: How move locations of each pixels in an image to another location Image Processing Toolboxmove pixels hai i have a jpg image . now i am trying to move each pixels to new locations. please help me Best Answer I = imread('peppers.png') ;figure(1)imshow(I)% indices to move idx0 = 10:100 ;idy0 = 10:100 ;% indices move here idx1 = 210:300 ;idy1 = 210:300 ;% move these pixels T0 = I(idx0,idx1,:) ; T1 = I(idx1,idy1,:) ; % replace I(idx0,idy0,:) = T1 ;I(idx1,idy1,:) = T0 ;figure(2)imshow(I) Related SolutionsMATLAB: Cut/crop out region of image How about this?I = imread('Original.jpg') ;[nx,ny] = size(I) ;% h = imdistline ;dx = 50 ; % calulated from imdistlineidx = round([(nx/2-dx) (nx/2+dx)]) ;idy = round([(ny/2-dx) (ny/2+dx)]) ;I0 = I ;I(idx(1):idx(2),idy(1):idy(2)) = 0 ;imshow(I) MATLAB: Compare the intensity of a pixel with the one next to it if 'one next to it' means right side pixcel, you can identify the value increase/decrease more than 300.I = imread('filename');r = numel(I(:,1))ext = zeros(r,1);I1 = [I ext];I2 = [ext I];I3 = I1-I2;Iout = abs(I3) > 300; Related QuestionHow to increase the brightness of an image
Best Answer