mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
Fix edge_detection.py sample for Python 3
This commit is contained in:
parent
71aee662bd
commit
62199df815
@ -27,8 +27,8 @@ class CropLayer(object):
|
|||||||
batchSize, numChannels = inputShape[0], inputShape[1]
|
batchSize, numChannels = inputShape[0], inputShape[1]
|
||||||
height, width = targetShape[2], targetShape[3]
|
height, width = targetShape[2], targetShape[3]
|
||||||
|
|
||||||
self.ystart = (inputShape[2] - targetShape[2]) / 2
|
self.ystart = (inputShape[2] - targetShape[2]) // 2
|
||||||
self.xstart = (inputShape[3] - targetShape[3]) / 2
|
self.xstart = (inputShape[3] - targetShape[3]) // 2
|
||||||
self.yend = self.ystart + height
|
self.yend = self.ystart + height
|
||||||
self.xend = self.xstart + width
|
self.xend = self.xstart + width
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user