how to convert a grayscale image to a sequence of bytes

2 vues (au cours des 30 derniers jours)
myetceteramail myetceteramail
Commenté : Walter Roberson le 28 Déc 2016
how do i convert the image into a sequence of bytes and then get the hash value using SHA3 256 bits.

Réponses (1)

Image Analyst
Image Analyst le 28 Déc 2016
For the first question:
sequenceOfBytes = grayImage(:);
  1 commentaire
Walter Roberson
Walter Roberson le 28 Déc 2016
Or alternately, in case it is not already uint8:
sequenceOfBytes = typecast(grayImage, 'uint8');

Connectez-vous pour commenter.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by