필터 지우기
필터 지우기

Can we find the transparency of an overlay on an image ?

조회 수: 1 (최근 30일)
Mr.X
Mr.X 2017년 8월 17일
편집: Walter Roberson 2017년 10월 5일
If I have an image with a transparent overlay on it, can we find the percentage of transparency from the alpha channel of the image?
  댓글 수: 6
Mr.X
Mr.X 2017년 10월 5일
Yes I have a partly transparent red line etched on the image and I need to find the transparency of the line alone. Not the image transparency
Walter Roberson
Walter Roberson 2017년 10월 5일
편집: Walter Roberson 2017년 10월 5일
Could you post a sample image?
Will the line always be straight? Is the line in a known position or does it need to be detected?

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 8월 17일
Yes.
if isinteger(YourAlphaData)
tAD = im2double(YourAlphaData);
else
tAD = YourAlphaData;
end
percent_transparent = 100 * (1 - tAD);

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by