Skip to content

Commit

Permalink
allow resize to be no
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Jul 5, 2019
1 parent f93d6f6 commit 77ec681
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions hook/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def append_suffix(filename, token):
if not g.polygons:
g.polygons.append({'name': 'full_image', 'value': [(0, 0), (oldw, 0), (oldw, oldh), (0, oldh)]})
g.logger.debug('No polygon area specfied, so adding a full image polygon:{}'.format(g.polygons))
if g.config['resize']:

if g.config['resize'] != 'no':
g.logger.debug('resizing to {} before analysis...'.format(g.config['resize']))
image1 = imutils.resize(image1, width=min(int(g.config['resize']), image1.shape[1]))
if image2 is not None:
Expand Down
2 changes: 1 addition & 1 deletion hook/zmes_hook_helpers/alpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def detect(self,object):
g.logger.debug ('ALPR JSON: {}'.format(response))

rescale = False
if g.config['resize']:
if g.config['resize'] != 'no':
img = cv2.imread(filename)
img_new = imutils.resize(img, width=min(int(g.config['resize']), img.shape[1]))
oldh,oldw,_ = img.shape
Expand Down
2 changes: 1 addition & 1 deletion hook/zmes_hook_helpers/common_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

'resize':{
'section': 'general',
'default': '1600',
'default': 'no',
'type': 'string'
},
'delete_after_analyze':{
Expand Down

0 comments on commit 77ec681

Please sign in to comment.