I am trying to do DWT transform on image and then quantize the image for lossy compression. However I am not getting any image after quantization, only a plotting of the signals are obtained. Kindly help.
3 ビュー (過去 30 日間)
古いコメントを表示
Sir , I am doing a region of interest (ROI) based compression on medical images. I am doing DWT and quantization on Non-ROI or the background. However I am not getting any image after quantization. I need the quantized image. My code is given below.
if true
% f = imread('Image_difference.bmp');
imshow(f)
wname = 'sym4';
[CA,CH,CV,CD] = dwt2( f, wname, 'mode', 'per');
subplot(311)
imagesc(CV); title('Vertical Detail Image');
colormap gray;
subplot(312)
imagesc(CA); title('Lowpass Approximation');
q = quantizer;
y1 = quantize(q, CA);
y2 = quantize(q, CH);
y3 = quantize(q, CV);
y4 = quantize(q, CD);
subplot(313)
plot(CA, y1); title('quantize lowpass Approximation');
end
Sir I am also sending the images herewith.
Kindly help me Sir. Thanks and regards Debarpita Chaudhuri.
<<
>>
0 件のコメント
採用された回答
Sachin Shrestha
2016 年 6 月 14 日
Hi Debarpita,
There are some issues with the code. The major one being the last line;
plot(CA, y1);
Try this instead to get the image, imagesc(y1);
alike the previous ways to display the image. I can't understand why you are plotting those values to get the image.
You may define the 'quantizer' to get the better results.
I hope this will help. Good Luck!
5 件のコメント
enyawson
2023 年 9 月 19 日
@Debarpita Chaudhuri what was your solution, and were you able ot achieve compression using this ?
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!