replace one bit plane with random image in DCT domain and get DCT inverse
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
yanqi liu
2022-1-26
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!