cleanup
This commit is contained in:
parent
85d9e1be28
commit
7ba9aded0c
1 changed files with 7 additions and 11 deletions
|
@ -12,9 +12,9 @@ erreur = np.ones((len(imCol[:,0]), len(imCol[0,:]), 3))
|
|||
|
||||
imRed = imCol[:,:,0]
|
||||
imGreen = imCol[:,:,1]
|
||||
imBlue = imCol[:,:,2];
|
||||
imBlue = imCol[:,:,2]
|
||||
|
||||
iterationsGlobales = 5
|
||||
iterationsGlobales = 30
|
||||
iterations = 20
|
||||
|
||||
#RED
|
||||
|
@ -65,6 +65,7 @@ for x in range(iterationsGlobales):
|
|||
|
||||
erreur[:,:,1] = imGreen - np.dot(FF,np.transpose(GG))
|
||||
imRecons[:,:,1] = np.dot(FF,np.transpose(GG))
|
||||
|
||||
#BLUE
|
||||
|
||||
# compress
|
||||
|
@ -91,23 +92,18 @@ erreur[:,:,2] = imBlue - np.dot(FF,np.transpose(GG))
|
|||
imRecons[:,:,2] = np.dot(FF,np.transpose(GG))
|
||||
|
||||
|
||||
imRecons = imRecons*255
|
||||
|
||||
imRecons = imRecons-100
|
||||
imRecons = imRecons*2
|
||||
imRecons = imRecons/255
|
||||
#erreur = erreur/255
|
||||
#imRecons = np.round(imRecons, 4)
|
||||
|
||||
|
||||
imRecons = np.round(imRecons, 1)
|
||||
# plot
|
||||
plt.figure(dpi=1200)
|
||||
plt.figure(dpi=300)
|
||||
|
||||
|
||||
plt.subplot(1, 2, 1)
|
||||
plt.axis('off')
|
||||
|
||||
plt.title("Title", fontdict=None, loc='center', pad=None)
|
||||
plt.title("Original", loc='center', pad=None)
|
||||
plt.imshow(imCol, interpolation = "nearest")
|
||||
|
||||
|
||||
|
@ -119,7 +115,7 @@ plt.imshow(imCol, interpolation = "nearest")
|
|||
|
||||
plt.subplot(1, 2, 2)
|
||||
plt.axis('off')
|
||||
plt.title("Title", fontdict=None, loc='center', pad=None)
|
||||
plt.title("Compressed", fontdict=None, loc='center', pad=None)
|
||||
plt.imshow(imRecons, interpolation = "nearest")
|
||||
plt.show()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue