This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, sys, os | |
from pygame.locals import * | |
from sys import argv | |
import Image | |
def pixel(): | |
ima = argv[1] | |
im = Image.open(ima) | |
imagen=im.load() | |
ancho, alto = im.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, sys, os # Importe pygame para la creacion de la ventana | |
#from pygame.locals import * | |
from sys import argv # Importe para tabajar con argumentos | |
import Image #Importe para trabajar con Image (PIL) | |
#Convierte la imagen en escala de grises | |
def pixel(): | |
ima = argv[1] | |
im = Image.open(ima) | |
imagen=im.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, sys, os # Importe pygame para la creacion de la ventana | |
from PIL import Image #Importar para trabajar con modulo Image de (PIL) | |
from sys import argv # Importe para tabajar con argumentos | |
#Convierte la imagen en escala de grises | |
def pixel(): | |
ima = argv[1] | |
im = Image.open(ima) | |
imagen=im.load() | |
ancho, alto = im.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,pygame | |
import Image | |
from sys import argv | |
from math import* | |
import numpy | |
import time | |
import math | |
def main(): | |
ima,ancho,alto,vecino_n= pixel(argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,pygame | |
import Image | |
#from sys import argv | |
from math import* | |
#import numpy | |
from time import* | |
import math | |
def main(): | |
pygame.init() # Inicializa pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,pygame | |
import Image | |
#from sys import argv | |
from math import* | |
#import numpy | |
from time import* | |
import math | |
def main(): | |
pygame.init() # Inicializa pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,pygame | |
import sys, pygame | |
import Image | |
from math import* | |
from time import* | |
import math | |
import random | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bfs(image,color,a,b): | |
imagen=image.load() | |
ancho,alto=image.size | |
original = imagen[a,b] | |
c=[] | |
xs=[] | |
ys=[] | |
c.append((a,b)) | |
n = 0 | |
while len(c) > 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, pygame | |
import Image | |
from math import* | |
from time import* | |
import math | |
import random | |
def im2(): | |
image = Image.open('binarizada1.png') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,pygame | |
import Image | |
from math import* | |
from time import* | |
import math | |
def main(): | |
pygame.init() | |
screen = pygame.display.set_mode((300,300)) | |
imagen1 = binariza () |
OlderNewer