free hand drawing on photo matlab
Mostra commenti meno recenti
How can I draw freehand on photo opened by imshow
%a=imread('tree.jpg)
imshow(a);
%then how can i draw on tree photos as i wish??


As mentioned above, I would like to open a gray scale photos (left) and then want to draw on it by freehand (as shown in right). What command shall I use to allow me to draw on photo? Can anyone suggest me? Thanks.
Risposte (3)
Image Analyst
il 23 Mag 2016
1 voto
You might want to use Photoshop or Gimp.
3 Commenti
win tun
il 23 Mag 2016
win tun
il 23 Mag 2016
Image Analyst
il 23 Mag 2016
You have to get a mask
mask = M.createMask;
Then for each color channel, set the value, like to 255:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Burn line into images
redChannel(mask) = 255;
greenChannel(mask) = 255;
blueChannel(mask) = 255;
% Recombine separate color channels into a single, true color RGB image.
rgbImage = cat(3, redChannel, greenChannel, blueChannel);
You can probably do it all in one line with bsxfun() but I don't know what it is.
Image Analyst
il 24 Mag 2016
1 voto
Categorie
Scopri di più su Red in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

