How can I paint a list of pixels in a matlab image?
2 ビュー (過去 30 日間)
古いコメントを表示
I'm working with a lot of images here and I have to find all the pixels above a scalar value and paint all them into any color.
I've all the indexes of this pixels but I don't know how can I paint them now...
Thx for the help again.
1 件のコメント
Jan
2012 年 1 月 16 日
In which format are the "images" represented? Printed on paper, as JPEGs on the harddisk or as arrays in Matlab? What does "paint all of them in any color" exactly mean?
採用された回答
Image Analyst
2012 年 1 月 16 日
Here's the way to do it without using slow loops:
grayImage = imread('coins.png');
subplot(2,2,1);
imshow(grayImage);
binaryImage = uint8(255 * ~(grayImage > 150));
subplot(2,2,2);
imshow(binaryImage, []);
uniformImage = uint8(255 * ones(size(grayImage)));
zeroImage = uint8(255 * zeros(size(grayImage)));
rgbImage = cat(3, uniformImage, binaryImage, zeroImage);
subplot(2,2,3);
imshow(rgbImage);
0 件のコメント
その他の回答 (2 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!