Can we find the transparency of an overlay on an image ?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
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
2017년 8월 17일
Yes.
if isinteger(YourAlphaData)
tAD = im2double(YourAlphaData);
else
tAD = YourAlphaData;
end
percent_transparent = 100 * (1 - tAD);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!