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 im2(): | |
image = Image.open('binarizada1.png') | |
imagen = image.load() | |
ancho,alto = image.size | |
print ancho | |
print alto | |
for a in range(ancho): | |
for b in range(alto): | |
color=(random.randint(0,255),random.randint(0,255),random.randint(0,255)) | |
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 im2(): | |
image = Image.open('binarizada2.png') #carca la imagen con convolucion y binarizada | |
imagen = image.load() | |
ancho,alto = image.size | |
total = ancho*alto | |
porcentaje = [] | |
centro = [] | |
contiene = 0 | |
print ancho | |
print alto |
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 | |
import ImageDraw | |
def im2(): | |
image = Image.open('binarizada2.png') #carca la imagen con convolucion y binarizada | |
imagen = image.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
from sys import argv | |
import random | |
import time | |
n=int(argv[1]) #recibe parametros n= longitud de cadena donde se busca | |
m=int(argv[2]) #recibe parametros m=longitud de patron a buscar | |
def generan(tam): #Funcion para generar patron o texto | |
x=[] #Variable para guardar el texto o patron a generar | |
for i in range(tam): |
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 Image | |
from sys import argv | |
import ImageDraw | |
TURN_LEFT, TURN_RIGHT, TURN_NONE = (1, -1, 0) | |
def turn(p, q, r): | |
return cmp((q[0] - p[0])*(r[1] - p[1]) - (r[0] - p[0])*(q[1] - p[1]), 0) | |
#distancias entre p y q |
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 sqrt, sin, cos, fabs | |
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
def circulos(): | |
ima1 = Image.open("vane2.jpg") | |
imagen = ima1.load() | |
radio = int(argv[1]) | |
ancho,alto = ima1.size | |
#frec = list() | |
frec = numpy.empty((ancho, alto)) #frecuecia en centros | |
#frec = [] | |
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
from Tkinter import * | |
from sys import argv | |
import math | |
import sys, string | |
cam = list() | |
codigos = list() | |
frec = list() | |
simbolos = {} | |
arbol_fin ='' |
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
from Tkinter import * | |
from sys import argv | |
import math | |
import sys, string | |
cam = list() | |
codigos = list() | |
frec = list() | |
simbolos = {} | |
arbol_fin ='' |
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 Image | |
from math import* | |
from time import* | |
import math | |
import random | |
import ImageDraw | |
#Aplica bfs | |
def im2(): | |
image = Image.open('binarizada.png') #carca la imagen con convolucion y binarizada |