Skip to content
Snippets Groups Projects
Commit 5c0d5ef2 authored by Gonzalo Belcredi's avatar Gonzalo Belcredi
Browse files

Python 3 Update

parent cb54d70d
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
### LABORATORIO INTEGRADOR
Dependencias Python:
- Python 3
- Pillow (Python Imaging Library)
- Numpy
......
#!/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
#!/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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment