how to convert a grayscale image to a sequence of bytes
2 views (last 30 days)
Show older comments
how do i convert the image into a sequence of bytes and then get the hash value using SHA3 256 bits.
0 Comments
Answers (1)
Image Analyst
on 28 Dec 2016
For the first question:
sequenceOfBytes = grayImage(:);
1 Comment
Walter Roberson
on 28 Dec 2016
Or alternately, in case it is not already uint8:
sequenceOfBytes = typecast(grayImage, 'uint8');
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!