Should XOR operation performed on binary images only?
Afficher commentaires plus anciens
I want to perform XOR encryption and decryption on images.Should this operation performed on binary images only?
Réponses (2)
I assume this question came to be because you looked at the doc of xor in matlab and saw that it only applied to logical (binary / boolean) values. That's because xor is a logical operator.
It would be a bit pointless to have to binarise an image to be able to encrypt it. It certainly wouldn't be reversible anyway.
What you are looking for is the bit-wise xor, bitxor which can xor two integer bit xoring their corresponding bits.
encimage = bitxor(rawimage, somevalue)
%or
encimage = bitxor(rawimage, someotherimagethesamesize)
Rushikesh Tade
le 5 Juin 2015
0 votes
I think so because XOR is binary operator.
1 commentaire
Anushka
le 5 Juin 2015
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!