From 5c0d5ef2bd2bcf5fc528d146db014061d49b5dc0 Mon Sep 17 00:00:00 2001
From: Gonzalo Belcredi <gbelcredi@fing.edu.uy>
Date: Thu, 5 Nov 2020 16:36:03 -0300
Subject: [PATCH] Python 3 Update

---
 README.md    |  1 +
 bit2image.py | 10 +++++-----
 image2bit.py |  6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 261753e..7e4f455 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
 ### LABORATORIO INTEGRADOR
 
 Dependencias Python:
+ - Python 3 
  - Pillow (Python Imaging Library)
  - Numpy
 
diff --git a/bit2image.py b/bit2image.py
index 08a620c..d7c822c 100644
--- a/bit2image.py
+++ b/bit2image.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # 
-# Copyright 2019
+# Copyright 2020
 #   Author: Gonzalo Belcredi, gbelcredi@fing.edu.uy
 #   Instituto de Ingenieria Electrica, Facultad de Ingenieria,
 #   Universidad de la Republica, Uruguay.
@@ -104,8 +104,8 @@ image.show()
 if DECODE_IMAGE:
     peaks = get_sync_peaks(array_rx,sync_start)
     nr_images = len(peaks)
-    print "Se identificaron ", nr_images, " imágenes."
-    print "Indices de comienzo de imagen:", peaks
+    print("Se identificaron ", nr_images, " imágenes.")
+    print("Indices de comienzo de imagen:", peaks)
 
     for i in range(0,nr_images):
         if (peaks[i]+img_width*columnas) < len(array_rx):
@@ -126,5 +126,5 @@ if DECODE_IMAGE:
     img_rx.load()
 
     MSE, PSNR = get_PSNR(img,img_rx)
-    print "MSE: ", MSE
-    print "PSNR (dB): ", PSNR
\ No newline at end of file
+    print("MSE: ", MSE)
+    print("PSNR (dB): ", PSNR)
\ No newline at end of file
diff --git a/image2bit.py b/image2bit.py
index b98964e..27f5224 100644
--- a/image2bit.py
+++ b/image2bit.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # 
-# Copyright 2019
+# Copyright 2020
 #   Author: Gonzalo Belcredi, gbelcredi@fing.edu.uy
 #   Instituto de Ingenieria Electrica, Facultad de Ingenieria,
 #   Universidad de la Republica, Uruguay.
@@ -32,7 +32,7 @@ img.show()
 
 
 filas, columnas = data.shape
-print "filas: ", filas, ", columnas: ", columnas
+print("filas: ", filas, ", columnas: ", columnas)
 
 
 sync_start = [0,128,255]*10
@@ -56,7 +56,7 @@ framed_image.save('images/imagen_transmitida.png')
 
 
 filas, columnas = framed_data.shape
-print "filas (framed): ", filas, ", columnas (framed): ", columnas
+print("filas (framed): ", filas, ", columnas (framed): ", columnas)
 
 array = framed_data.flatten()
 array = array.astype('uint8')
-- 
GitLab