フィルターのクリア

I want a differential pulse code modulation(DPCM) matlab code for images

2 ビュー (過去 30 日間)
tina jain
tina jain 2015 年 5 月 23 日
コメント済み: Walter Roberson 2015 年 5 月 23 日
how to apply DPCM on images

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 5 月 23 日
You can reshape() the image array into a vector in order to create a "signal" that you apply DPCM to. It might not be very effective, but if someone promised that DPCM is useful for images then you should write the code to follow their algorithm.
  3 件のコメント
tina jain
tina jain 2015 年 5 月 23 日
編集済み: Walter Roberson 2015 年 5 月 23 日
see Walter sir, I used the code below
close all;
clear all;
clc;
predictor = [0 1]; % y(k)=x(k-1)
partition = [-1:.1:.9];
codebook = [-1:.1:1];
y=imread('lena256.bmp');
y=double(y);
x = y(:);
t = linspace(1, 2*pi, length(x));
% Quantize x using DPCM.
encodedx = dpcmenco(x,codebook,partition,predictor);
% Try to recover x from the modulated signal.
decodedx = dpcmdeco(encodedx,codebook,predictor);
plot(t,x,t,decodedx,'--')
xx =decodedx(:);
[psnrtest]=psnr(x,xx)
legend('Original signal','Decoded signal','Location','NorthOutside');
is it ok?
PSNR is only 15
Walter Roberson
Walter Roberson 2015 年 5 月 23 日
Shrug. I am not expecting a good PSNR for arbitrarily chosen codebook and partitions and arbitrary reordering of the image into a signal.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSource Coding についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by