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.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Debarpita Chaudhuri
am 14 Jun. 2016
Kommentiert: enyawson
am 19 Sep. 2023
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 Kommentare
Akzeptierte Antwort
Sachin Shrestha
am 14 Jun. 2016
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 Kommentare
enyawson
am 19 Sep. 2023
@Debarpita Chaudhuri what was your solution, and were you able ot achieve compression using this ?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Encryption / Cryptography finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!