How can i save the [x,y,intensity] of image if i am running a threshold intensity scan of a picture?
1 次查看(过去 30 天)
显示 更早的评论
clc
source= imread('testimg.jpg');
[rows,coloumn,channels]=size(source)
% Scanning row & coloumn wise
a=1;
while a>=1 && a<=rows
[b]=1;
if b>=1 && b<=coloumn
if source(a,b,3)>=100
% Need help in saving this to specific coloumn in form a vector!
xlswrite("data_oel.xlsx",b,'data','(B2:B169)')
end
b=b+1;
end
xlswrite("data_oel.xlsx",a,'data','(A2:A300)')
a=a+1;
end
0 个评论
采纳的回答
Image Analyst
2022-7-29
See attached demo where I write R, G, B, x, y to a CSV file. Is that what you want?
2 个评论
Image Analyst
2022-8-2
编辑:Image Analyst
2022-8-2
You can use the max function
rgbImage = imread('peppers.png');
[r, g, b] = imsplit(rgbImage);
maxR = max(r(:))
maxG = max(g(:))
maxB = max(b(:))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!