> restart: > Digits:=14: > st:= time(): > with(LinearAlgebra): > with(PolynomialTools): > with(DiscreteTransforms): > with(ImageTools): > read"../Src/Two_RGBImages.mpl": > infolevel[S_stls]:=1: > interface(rtablesize=190): > printlevel:=0: > k:=6:m:=4: > Ph:=Read("../Result/Figure.2/TRGB_original.jpg"): > Vx:=Vector(175,i->x^(i-1)):Vy:=Vector(133,i->y^(i-1)): > P1:=RandomMatrix(175,133,density=1,generator=-10..10):P2:=RandomMatrix > (175,133,density=1,generator=-10..10): > pert_f:=expand(LinearAlgebra:-Transpose(Vx).P1.Vy):pert_g:=expand(Line > arAlgebra:-Transpose(Vx).P2.Vy):#two noise > Pr1:=(x+x^6+y*x^3+y^5+x^6*y^6+y+1)/k:Pr2:=(y^2+y*x^5+y^3+2*x^6*y^6+x+1 > )/k:# the two cofactors > Pho1,Pho2:=SRGB_Blurred(Ph,Pr1,Pr2,Pr1,Pr2,Pr1,Pr2,10^(-m)*pert_f,10^( > -m)*pert_g,10^(-m)*pert_f,10^(-m)*pert_g,10^(-m)*pert_f,10^(-m)*pert_g > ): > View([Ph,Pho1,Pho2]); > Write("../Result/Figure.2/TRGB_blur1.jpg",Pho1):Write("../Result/Figur > e.2/TRGB_blur2.jpg",Pho2): > SNR(Ph,Pr1,Pr2,Pr1,Pr2,Pr1,Pr2,10^(-m)*pert_f,10^(-m)*pert_g,10^(-m)*p > ert_f,10^(-m)*pert_g,10^(-m)*pert_f,10^(-m)*pert_g);#SNR 60.822648645074, 61.857719258128, 58.392126447783, 59.429851227112, 57.413700679915, 58.451406966468 > st:= time()-st; st := 34.234 > st:= time(): > e:=3: > Phoo,pm:=RGB_ImageDeconvolution(Pho1,Pho2,e):#deconvolutin from two > RGB blurred versions RGB_ImageDeconvolution: Before we compute gcd using computing time is st1 = 0.421 SD_ImageDeconvolution: Before we compute gcd using computing time is st1 = 0.125 Get_AB: the begin AB time is st = 0. BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0. degy = [2.37452566694656442, 0.0976198921563272982, 0.0373436233317549354, 0.0346246824003228830, 0.0110381753870861937, 0.00640585185585579829, 0.0000413591433495442387, 0.0000342645090748978804, 0.0000135774925521686452] BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0.016 degy = [0.562428933289872979, 0.0499984326655840834, 0.0176555676219299734, 0.0171069758052607747, 0.00418033078646753118, 0.00164703523022044344, 0.0000286695345455319968, 0.0000264188712633380941, -5 0.688019173100039850 10 ] Get_AB: the degree of GCD is degx = 169 degy = 127 st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.015 Get_AB: the first time cofactor's computing time is st1 = 0.359 Get_AB: the evaluation time 1D f and g is st1 = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.032 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.032 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.078 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the second time cofactor's computing time is st1 = 0.235 Ap2D_gcd: we get co-fator 1 using computing time is st1 = 0.610 SD_Dividen: we get Polynomials' coefficient matrix using computing time is st1 = 0. SD_Dividen: The first FFT time is st1 = 0.078 SD_Dividen: The second FFT time is st1 = 0.141 SD_Dividen: The divide time is st1 = 0.656 SD_Dividen: The inverse FFT time is st1 = 0.125 Ap2D_gcd: we get GCD by dividen using computing time is st1 = 1.140 Ap2D_gcd: we get gcd using computing time is st1 = 1.750 SD_ImageDeconvolution: After we compute gcd using computing time is st1 = 0.079 SD_ImageDeconvolution: Before we compute gcd using computing time is st1 = 0.109 Get_AB: the begin AB time is st = 0. BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0.015 degy = [2.65139253947366350, 0.109725232100177594, 0.0393058631649455745, 0.0354665838781609150, 0.0114134254344037296, 0.00665355156859307082, 0.0000559388729898395350, 0.0000465318776083335718, 0.0000179427567188062706] BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0.016 degy = [0.573578844828524614, 0.0538233033866897596, 0.0171218681585490890, 0.0167006133695656174, 0.00388891987443156992, 0.00155478468505093486, 0.0000405769096412267354, 0.0000373290899519196663, -5 0.961973785795128491 10 ] Get_AB: the degree of GCD is degx = 169 degy = 127 st = 0.047 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.015 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 Get_AB: the first time cofactor's computing time is st1 = 0.422 Get_AB: the evaluation time 1D f and g is st1 = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.032 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the second time cofactor's computing time is st1 = 0.187 Ap2D_gcd: we get co-fator 1 using computing time is st1 = 0.734 SD_Dividen: we get Polynomials' coefficient matrix using computing time is st1 = 0. SD_Dividen: The first FFT time is st1 = 0.078 SD_Dividen: The second FFT time is st1 = 0.110 SD_Dividen: The divide time is st1 = 0.578 SD_Dividen: The inverse FFT time is st1 = 0.125 Ap2D_gcd: we get GCD by dividen using computing time is st1 = 1.032 Ap2D_gcd: we get gcd using computing time is st1 = 1.766 SD_ImageDeconvolution: After we compute gcd using computing time is st1 = 0.078 SD_ImageDeconvolution: Before we compute gcd using computing time is st1 = 0.125 Get_AB: the begin AB time is st = 0. BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0.016 degy = [3.42233019799880367, 0.173444512776264909, 0.0777438574408452072, 0.0719218925710880946, 0.0222370219923988082, 0.0126238552238157210, 0.0000758041843559859024, 0.0000725073774347060908, 0.0000372530579990443597] BZ_ClGet_gcddegree: Getting degree using time is: st1 = 0. degy = [0.400567221119051464, 0.0422466701265212796, 0.0124923023677638092, 0.0120833490014682441, 0.00265089932965947070, 0.00108215846071823198, 0.0000384581357565477372, 0.0000338132978283316816, -5 0.821221476174151254 10 ] Get_AB: the degree of GCD is degx = 169 degy = 127 st = 0.047 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.016 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0.015 Get_AB: the first time cofactor's computing time is st1 = 0.421 Get_AB: the evaluation time 1D f and g is st1 = 0. BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.032 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.032 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the evaluation time 1D f and g is st1 = 0.031 BZ_Get_1Dcofactors: the cofactors' coeff time is st = 0. Get_AB: the second time cofactor's computing time is st1 = 0.188 Ap2D_gcd: we get co-fator 1 using computing time is st1 = 0.656 SD_Dividen: we get Polynomials' coefficient matrix using computing time is st1 = 0. SD_Dividen: The first FFT time is st1 = 0.156 SD_Dividen: The second FFT time is st1 = 0.110 SD_Dividen: The divide time is st1 = 0.578 SD_Dividen: The inverse FFT time is st1 = 0.140 Ap2D_gcd: we get GCD by dividen using computing time is st1 = 1.125 Ap2D_gcd: we get gcd using computing time is st1 = 1.781 SD_ImageDeconvolution: After we compute gcd using computing time is st1 = 0.078 > View([Ph,Phoo]);# the original and debluring version Initializing Java runtime environment. > #Write("../Result/Figure.2/TRGB_deblur.jpg",Phoo): > st:= time()-st;#the time is st := 6.468 > >