forked from huangxin/ailai
28 lines
585 B
Python
28 lines
585 B
Python
#!/usr/bin/env python
|
||
# -*- coding: utf-8 -*-
|
||
'''
|
||
# @Time : 2024/9/5 14:57
|
||
# @Author : hjw
|
||
# @File : camera_coordinate_dete_test.py.py
|
||
'''
|
||
import time
|
||
|
||
from camera_coordinate_dete_img import Detection
|
||
import cv2
|
||
|
||
detection = Detection()
|
||
|
||
while True:
|
||
t1 = time.time()
|
||
ret, img, xyz, nx_ny_nz, box = detection.get_position()
|
||
if ret==1:
|
||
print('xyz点云坐标:', xyz)
|
||
print('nx_ny_nz法向量:', nx_ny_nz)
|
||
img = cv2.resize(img,(720, 540))
|
||
cv2.imshow('img', img)
|
||
cv2.waitKey(1)
|
||
t2 = time.time()
|
||
print(t2-t1)
|
||
|
||
|