Skip to content

Fix edge_detection.py sample for Python 3 - #13600

Merged
opencv-pushbot merged 1 commit into
opencv:3.4from
dkurt:fix_13576
Jan 9, 2019
Merged

opencv-pushbot merged 1 commit into
opencv:3.4from
dkurt:fix_13576

Conversation

@dkurt

@dkurt dkurt commented Jan 9, 2019

Copy link
Copy Markdown
Member

This pullrequest changes

resolves #13576

Comment thread samples/dnn/edge_detection.py Outdated
self.ystart = (inputShape[2] - targetShape[2]) / 2
self.xstart = (inputShape[3] - targetShape[3]) / 2
self.ystart = int((inputShape[2] - targetShape[2]) / 2)
self.xstart = int((inputShape[3] - targetShape[3]) / 2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use integer division instead (if inputs are integers too):
/ => //

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants