When using imread function, the blank area automatic as 255. How to turn the pixel of blank area as empty?
조회 수: 1 (최근 30일)
이전 댓글 표시
rgb_image = imread('13100 IP.jpg');
댓글 수: 0
답변 (1개)
Walter Roberson
2017년 5월 3일
That is not possible with .jpg files. .jpg files can only store integral values, and cannot store an Alpha channel.
If you want to store information about which positions are empty, you will need to use a different image file format; in particular imwrite() PNG image file and either the 'alpha' or 'transparency' options. It is also possible to create alpha channels in TIFF images if you use the Tiff() class.
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!