i have double array and i want to rescale it in the range (0,1) and then convert it into jpg.how to do it?
조회 수: 2 (최근 30일)
이전 댓글 표시
i have double array and i want to rescale it in the range (0,1) and then convert it into jpg .how to do it?
댓글 수: 0
답변 (1개)
Walter Roberson
2019년 1월 21일
mat2gray() followed by imwrite()
Note: true grayscale jpg are very uncommon in practice, but they have been valid for quite a while. They are not handled by some rather old browers (e.g., don't expect to display them easily in Windows XP time frame.)
In practice nearly all jpeg are RGB images.
Reminder: JPEG is a lossy image format, so if you expect to be able to read back in exactly what you wrote out, then you should use a different image format.
댓글 수: 0
참고 항목
카테고리
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!