필터 지우기
필터 지우기

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

채택된 답변

Image Analyst
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
Fawad Ali
Fawad Ali 2022년 8월 2일
how can i figure out the high intensities of R,G,B if i read a matrix out of it
Image Analyst
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(:))
maxR = uint8 255
maxG = max(g(:))
maxG = uint8 255
maxB = max(b(:))
maxB = uint8 255

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by