How to draw/change the color of 1 pixel in an image

6 vues (au cours des 30 derniers jours)
TT Simmons
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

Réponse acceptée

Image Analyst
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
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
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by