How to draw/change the color of 1 pixel in an image
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
TT Simmons
le 16 Avr 2014
Commenté : Image Analyst
le 31 Jan 2017
I want to take an image into matlab and edit it by changing one pixel at a set of coordinates to a different color so as to identify points of interest on the image.
The plot function won't work as I am creating a video with a series of frames and implay.
Any help much appreciated
0 commentaires
Réponse acceptée
Image Analyst
le 16 Avr 2014
rgbImage(row, column, :) = [r, g, b]; % r, g, b are uint8 values.
imshow(rgbImage);
drawnow; % Force it to paint right now
3 commentaires
Shivani Pahuja
le 31 Jan 2017
the above code is giving error as Undefined function or variable 'r'.
Error in fill1 (line 3) rgbImage(row, column, :) = [r, g, b]; % r, g, b are uint8 values.
how to resolve it??
Image Analyst
le 31 Jan 2017
If you're going to assign something, you have to have something to assign. What did you assign for r? Show me the line that says
r = 123; % or whatever value you need.
I don't think you'll find that line, therefore there is no r to assign. What do you think it should assign? Just make up something? That's probably no good. You should make that decision.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!