how to change the color of pixels in a binary image?

15 views (last 30 days)
I want to generating random pixels on edge boundary and give red color to that pixels. Thanks in advance.
  1 Comment
Rik
Rik on 1 Dec 2017
A binary image has only 2 colors. Depending on what method you choose to display it, you can choose the two colors yourself.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Dec 2017
See attached m-file.
  20 Comments
Image Analyst
Image Analyst on 5 Dec 2017
The image will be red anywhere the red value is non-zero and the green and blue values are both 0. If that describes the whole image, then it's the whole image. If that describes only some pixels in the image, then only those pixels will be red.
bamini thavarajah
bamini thavarajah on 5 Dec 2017
thanks a lot sir for spent your time for me. I understood & I got the answer.

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!