how to convert a grayscale image to a sequence of bytes
2 次查看(过去 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!