Counting pixels in echocardiogram image

1 回表示 (過去 30 日間)
Zo
Zo 2019 年 2 月 21 日
回答済み: Krishna Zanwar 2019 年 2 月 26 日
Hello good morning ,
What is a code to count the RGB pixel values in attached image?

採用された回答

Krishna Zanwar
Krishna Zanwar 2019 年 2 月 26 日
Hey Zo,
I am not clear on what your objective is.
If you want to find the RGB values of pixels in the image then you can find the syntax here.
If you want to count how many pixels are there for each possible color combination you can run this script in Matlab -
A = imread('image.jpg')
b=size(A)
col=zeros(256,256,256);
for i=1:b(1)
for j=1:b(2)
col(A(i,j,1)+1,A(i,j,2)+1,A(i,j,3)+1)=col(A(i,j,1)+1,A(i,j,2)+1,A(i,j,3)+1)+1;
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

Translated by