get_histogram2.m
914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
clear all;
sequence=["CrowdRun","DucksTakeOff","OldTownCross","ParkJoy","ArenaOfValor","GlassHalf"];
resolution = {'2K','4K'};
QP=["1","2","3","4","5" ,"6"];
seq = sequence{6};
qp=QP{1};
resolution = resolution{1};
numFrame = 48;
frame=24;
Base_path="C:\Users\user\Documents\KHU\compressai\examples\\"+seq+"\\";
Target_folder =Base_path+"recon\\";
Source_File = Base_path + "GlassHalf_768x768_24_8bit_444_frame"+(frame-1)+".png";
Target_File = Target_folder +"recon"+(frame-1)+"_q"+qp+".png";
%-----------setting------------
image = imread(Source_File);
Generate = imread(Target_File);
Generate = int32(Generate);
image = int32(image);
Error = Generate - image;
figure;
histogram2(Error,image,'DisplayStyle','tile')
set(gca,'ColorScale','log')
set(gca,'Colormap',bone)
figure;
histogram2(Error,image, 'DisplayStyle','bar3')
set(gca,'ColorScale','log')
set(gca,'Colormap',bone)
zlim([0,limt])
view(-10,35);