opencv: fix motion box translation

This commit is contained in:
Koushik Dutta
2023-03-29 17:25:24 -07:00
parent b29d793178
commit 9d8a1353c0
4 changed files with 5 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/opencv",
"version": "0.0.72",
"version": "0.0.74",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/opencv",
"version": "0.0.72",
"version": "0.0.74",
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
}

View File

@@ -36,5 +36,5 @@
"devDependencies": {
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.0.72"
"version": "0.0.74"
}

View File

@@ -252,5 +252,5 @@ class OpenCVPlugin(DetectPlugin):
def convert_to_src_size(point):
return point[0] * scale, point[1] * scale
mat = np.ndarray((height, width, self.pixelFormatChannelCount), buffer=buffer, dtype=np.uint8)
detections = self.detect(mat, settings, detection_session, (width, height), convert_to_src_size)
detections = self.detect(mat, settings, detection_session, (videoFrame.width, videoFrame.height), convert_to_src_size)
return detections

View File

@@ -5,4 +5,4 @@ Pillow>=5.4.1; sys_platform != 'linux' or platform_machine != 'x86_64'
pillow-simd; sys_platform == 'linux' and platform_machine == 'x86_64'
imutils>=0.5.0
# not available on armhf
opencv-python; sys_platform != 'linux' or platform_machine == 'x86_64'
opencv-python; sys_platform != 'linux' or platform_machine == 'x86_64'