如何算出MSE , PSNR?? |
尚未結案
|
skyshine
一般會員 發表:1 回覆:2 積分:0 註冊:2004-10-26 發送簡訊給我 |
小弟寫了一個去後面4bit的壓縮法
我想知道一張圖的品質如何....
MSE愈低愈好,則PSNR是愈高愈好 我寫的程式內容為
void __fastcall TForm1::cut1Click(TObject *Sender)
{
Graphics::TBitmap *TheBitmap;
Byte* ptr;
Image2->Picture->Bitmap=Image1->Picture->Bitmap ;
TheBitmap=Image2->Picture->Bitmap;
for(int y=0;y
|
richtop
資深會員 發表:122 回覆:646 積分:468 註冊:2003-06-10 發送簡訊給我 |
skyshine 您好: distortion就是您刪去的那四個bits,把它們取出並取平方後相加即是所有的distortion。
引言: 小弟寫了一個去後面4bit的壓縮法 我想知道一張圖的品質如何.... MSE愈低愈好,則PSNR是愈高愈好 我寫的程式內容為RichTop 敬上 =====***** 把數學當工具,可以解決問題;將數學變能力,能夠發現並解決問題! =====######include <math.h> // for log10(.) .... void __fastcall TForm1::cut1Click(TObject *Sender) { Graphics::TBitmap *TheBitmap; Byte* ptr; Image2->Picture->Bitmap=Image1->Picture->Bitmap ; TheBitmap=Image2->Picture->Bitmap; double mse, distortion=0.0; for(int y=0;y請教一下...PSNR的值 謝謝^^ |
skyshine
一般會員 發表:1 回覆:2 積分:0 註冊:2004-10-26 發送簡訊給我 |
#include <math.h> // for log10(.)
....
void __fastcall TForm1::cut1Click(TObject *Sender)
{
Graphics::TBitmap *TheBitmap;
Byte* ptr;
Image2->Picture->Bitmap=Image1->Picture->Bitmap ;
TheBitmap=Image2->Picture->Bitmap;
double mse, distortion=0.0;
for(int y=0;y
|
richtop
資深會員 發表:122 回覆:646 積分:468 註冊:2003-06-10 發送簡訊給我 |
引言: #include <math.h> // for log10(.) .... void __fastcall TForm1::cut1Click(TObject *Sender) { Graphics::TBitmap *TheBitmap; Byte* ptr; Image2->Picture->Bitmap=Image1->Picture->Bitmap ; TheBitmap=Image2->Picture->Bitmap; double mse, distortion=0.0; for(int y=0;yRichTop 敬上 =====***** 把數學當工具,可以解決問題;將數學變能力,能夠發現並解決問題! =====##### |
skyshine
一般會員 發表:1 回覆:2 積分:0 註冊:2004-10-26 發送簡訊給我 |
|
bvd
一般會員 發表:9 回覆:12 積分:4 註冊:2006-10-31 發送簡訊給我 |
===================引 用 文 章=================== skyshine 您好: distortion就是您刪去的那四個bits,把它們取出並取平方後相加即是所有的distortion。 引言: 小弟寫了一個去後面4bit的壓縮法我想知道一張圖的品質如何.... MSE愈低愈好,則PSNR是愈高愈好 我寫的程式內容為int z=240; ptr[x]=(byte)(ptr[x]&z); distortion = (ptr[x] & 0x0f)*(ptr[x] & 0x0f);請問richtop大大,上述的ptr[x]&z和ptr[x] & 0x0f)*(ptr[x] & 0x0f是什麼意思呢??還有為什麼z會是240呢???多謝指導~~!
------
加強磨鍊 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |