How to find maximum value among R,G,B channels in the same indices?
2 次查看(过去 30 天)
显示 更早的评论
I want to find the maximum of R,G,B in the same indices But it shows some error with max function.Please help me out
采纳的回答
ES
2017-8-3
A = imread('thank-you.jpg');
[iRows, iColumns, ~] = size(A);
for iLoop1=1:iRows
for iLoop2=1:iColumns
B(iLoop1, iLoop2) = max(A(iLoop1, iLoop2, :));
end
end
更多回答(1 个)
ES
2017-8-3
I dont know any direct way, but you can run a loop on the length and breadth of the image matrix to find the max of R, G, B at each pixel.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!