Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: f3ce094394
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 705 Bytes
import json
from remotecv.utils import logger
class ResultStore:
def __init__(self, redis): = redis
def to_dict(self, points):
result = {
'x': points[0] + (int(points[2]) / 2),
'y': points[1] + (int(points[3]) / 2),
'height': int(points[2]),
'width': int(points[3]),
'origin': ''
result['z'] = result['width'] * result['height']
return result
def store(self, key, points):
points_map = [self.to_dict(point) for point in points]
logger.debug("Points found: %s" % str(points_map))"thumbor-detector-%s" % key, json.dumps(points_map))
Jump to Line
Something went wrong with that request. Please try again.