replace one bit plane with random image in DCT domain and get DCT inverse
조회 수: 1 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!