get_histogram.asv
988 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
38
39
40
41
clear all;
sequence=["CrowdRun","DucksTakeOff","OldTownCross","ParkJoy","ArenaOfValor","GlassHalf"];
resolution = {'2K','4K'};
QP=["1","2","3","4","5" ,"6"];
seq = sequence{2};
qp=QP{1};
resolution = resolution{1};
numFrame = 100;
frame=24;
x=768;
y=768;
Base_path="C:\Users\user\Documents\KHU\compressai\examples\\"+seq+"\\";
Target_folder =Base_path+"recon\\";
Source_File = Base_path + seq+"_768x768_"+numFrame/2+"_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;
h = histogram(Error);
% %%%
% 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);