def do_GET(self, relativePath):
''' Devuelve el estado de las bolas en formato JSON '''
if relativePath.startswith(”ballStatus/”):
(mode, numBall) = relativePath.split(”/”)
for num in range(1, max_balls + 1):
strPath=”/home/pi/emg30/ballStatus%s”, num
with open(strPath) as f:
ball_status[] = f.read()
out =json.dumps(”[’Balls’ : ball_status[] ]”)
return (200, out, M_PLAIN)
def find_circles(gray):
''' Codigo para buscar circulos en una imagen '''
circles = cv2.HoughCircles(gray, cv2.cv.CV_HOUGH_GRADIENT, 1.3,
20, np.array([]), param1=20,
param2=40, minRadius=35,
maxRadius=45)[0]
for pos, c in enumerate(circles[:2]) :
cv2.circle(sketch,(c[0], c[1]), c[2], (0,255,0), 2)
cv2.putText(sketch, ”Bola %s” % pos, (c[0] + c[2], c[1] c[2] ),
cv2.FONT_HERSHEY_DUPLEX, 1.0,(0,255,0))
def main_services():
application = tornado.web.Application([
(r"/image", image_handler),
(r"/image_processed", image_processed_handler),
(r"/image_data", image_data_handler),
(r"/image_virtual", image_virtual_handler),
])
if __name__ == "__main__":
application.listen(7777)
tornado.ioloop.IOLoop.instance().start()
| Mercado objetivo | Tamaño | Penetración | Clientes | Horas/mes | Precio/hora | Ingresos totales |
|---|---|---|---|---|---|---|
| Museos | 500 | 1.0 % | 5 | 20 | 12 | 1.200 |
| Centros de enseñanza | 7.611 | 0.9 % | 70 | 8 | 10 | 5.600 |
| Colegios | 7.401 | 0.8 % | 60 | 4 | 10 | 2.400 |
| Universidades | 210 | 0.5 % | 1 | 4 | 10 | 40 |
| Total | 9.240 |
Contacto: gustavo.martin@opendeusto.es