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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Debarpita Chaudhuri
el 14 de Jun. de 2016
Comentada: enyawson
el 19 de Sept. de 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 comentarios
Respuesta aceptada
Sachin Shrestha
el 14 de Jun. de 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 comentarios
enyawson
el 19 de Sept. de 2023
@Debarpita Chaudhuri what was your solution, and were you able ot achieve compression using this ?
Más respuestas (0)
Ver también
Categorías
Más información sobre Encryption / Cryptography en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!