replace one bit plane with random image in DCT domain and get DCT inverse
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
mohammad nemat
le 25 Jan 2022
Réponse apportée : yanqi liu
le 26 Jan 2022
Hi, I want to replace one bit plane with random image in DCT domain and get DCT inverse but I can't get correct image like orginal image.
What's the problem? If I didn't replace bit plane with random image I can get result like source image.
I tested with different bit plane but I got this result.
img=imread('cameraman.tif');
b= dct2(img);
img=uint8(b);
[n,m]=size(img);
random=randi([0 1], n,m);
bitset(img, 1,random );
idct_T= idct2(img);
imshow(uint8(idct_T));
img=imread('cameraman.tif');
b= dct2(img);
idct_T= idct2(b);
imshow(uint8(idct_T));
0 commentaires
Réponse acceptée
yanqi liu
le 26 Jan 2022
may be use uint8 loss some image data,can use more bigger range format,such as
img=imread('cameraman.tif');
b = dct2(img);
img=int32(b);
[n,m]=size(img);
random=randi([0 1], n,m);
bitset(img, 1, random );
idct_T = idct2(img);
figure;
imshow(mat2gray(idct_T));
img=imread('cameraman.tif');
b= dct2(img);
idct_T= idct2(b);
figure;
imshow(mat2gray(idct_T));
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!