MATLAB: How to create an image by replacing each pixel with mean RGB value. imageMATLABmeanrgb I need to create an image by replacing each pixel with the mean value of its RGB components. Best Answer Specify the dimension to the mean function. It will create a grayscale imageimg = im2double(imread('peacock.jpg'));img_mean = mean(img, 3); fig = figure();subplot(1, 2, 1);imshow(img);subplot(1, 2, 2);imshow(img_mean); Related SolutionsMATLAB: Cretae a video from Images using WriterObj Please see doc page for VideoWriter. MATLAB: How to run the version of GrowCut in FileExchange in Matlab 2012a You appear to have a variable named "imshow" that is interfering with use of the Image Processing Toolbox routine imshow() Related QuestionHow to resolve this errorHow can i count the number of circles with random centers and fixed diameters.Lighthouse.jpg imread into matrix and calculate mean and std? – HomeworkHow to get back the rgb image from r g b component
Best Answer