MATLAB: Changing the colour gray colourImage Processing Toolbox I have a binary image with black background and a white object in circle ,now i want to change the colour of white to gray plz help Best Answer grayValue = uint8(128); % or whatever you want in the range of 1-255grayScaleImage = grayValue * uint8(binaryImage); Related SolutionsMATLAB: How to create a white image Try this to create a grayscale image:whiteImage = 255 * ones(N, M, 'uint8');imshow(whiteImage);To create an RGB image, try this:whiteImage = 255 * ones(480, 640, 3, 'uint8');imshow(whiteImage); MATLAB: Increase RGB image saturation. This is easier in HSV colorspace:RGB = rand(100, 100, 3);HSV = rgb2hsv(RGB);% "20% more" saturation:HSV(:, :, 2) = HSV(:, :, 2) * 1.2;% or add:% HSV(:, :, 2) = HSV(:, :, 2) + 0.2;HSV(HSV > 1) = 1; % Limit valuesRGB = hsv2rgb(HSV); Related QuestionGenerate a two-dimensional square and rectangular shape digital image.
Best Answer