how to convert a grayscale image to a sequence of bytes
조회 수: 1 (최근 30일)
이전 댓글 표시
how do i convert the image into a sequence of bytes and then get the hash value using SHA3 256 bits.
댓글 수: 0
답변 (1개)
Image Analyst
2016년 12월 28일
For the first question:
sequenceOfBytes = grayImage(:);
댓글 수: 1
Walter Roberson
2016년 12월 28일
Or alternately, in case it is not already uint8:
sequenceOfBytes = typecast(grayImage, 'uint8');
참고 항목
카테고리
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!