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 CenterFile Exchange에서 Image Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by