필터 지우기
필터 지우기

how to calculate intensity

조회 수: 3 (최근 30일)
Elysi Cochin
Elysi Cochin 2013년 2월 6일
I really appreciate your help and I would be so grateful if you help me with this?,
how to calculate, the difference between the number of pixels in a block and the ratio of the sum of pixel intensities in the block to the maximum in the block
i wanted to substitute the values in the equation in the link below.....
please do reply.....

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 6일
I = rgb2gray( im2double( YourImage) );
T = M(x : x+M-1, y : y+M-1);
sum(T(:))
max(T(:))
and I'll leave you to work out the ratio.
  댓글 수: 9
Elysi Cochin
Elysi Cochin 2013년 2월 9일
thank u sir...
Image Analyst
Image Analyst 2013년 2월 9일
편집: Image Analyst 2013년 2월 9일
Of course you could do this all in one to three lines with a vectorized approach using conv2() and imdilate(), like this (untested):
blurredImage = -conv2(yourImage, ones(M)/M^2, 'same') + M^2;
maxImage = imdilate(yourImage, true(M));
BDIP = blurredImage ./ maxImage;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by