hello.can any one tell me how can I change a particular black pixel in a binary image to white?

1 次查看(过去 30 天)
hello.can any one tell me how can I change a particular black pixel in a binary image to white?

回答(2 个)

Guillaume
Guillaume 2016-8-6
Img(row, column) = 1
Will set the pixel (row, column) to white.

Image Analyst
Image Analyst 2016-8-6
Binary images are of class logical and take on values true and false. To set a pixel at some row and column to appear white, set it to true
binaryImage(row, column) = true;
It's possible to set whole irregularly shaped regions (many pixels) to true if you have some mask or other binary image:
binaryImage1(binaryImage2) = true;
If you don't know the coordinates of your black pixels that you want to turn white, then you need to identify them somehow and for that you should attach an image so we can tell you how to do that.

类别

Help CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by