Skip to content

Instantly share code, notes, and snippets.

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
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()
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
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])
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
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
import sys,pygame
import sys, pygame
import Image
from math import*
from time import*
import math
import random
def main():
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:
import sys, pygame
import Image
from math import*
from time import*
import math
import random
def im2():
image = Image.open('binarizada1.png')
@vane90
vane90 / binariza.py
Last active December 13, 2015 22:18
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 ()