draw michael jackson in matlab

main.m
% Read the image of Michael Jackson
MJ = imread('michael_jackson.jpg');

% Display the original image
subplot(1,2,1);
imshow(MJ);
title('Original Image');

% Convert the image to grayscale
grayMJ = rgb2gray(MJ);
% Invert the grayscale image
invMJ = 255 - grayMJ;

% Apply edge detection to the inverted grayscale image
edgeMJ = edge(invMJ, 'canny');

% Display the edge-detected image
subplot(1,2,2);
imshow(edgeMJ);
title('Edge-Detected Image');
447 chars
21 lines

You can tweak the parameters of the edge detection function to get a better result. Finally, you can use various image processing techniques to enhance the image or add color to it to make it look more appealing.

gistlibby LogSnag