Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何定义检测线 #8

Open
ZALCR7 opened this issue Sep 13, 2022 · 4 comments
Open

请问如何定义检测线 #8

ZALCR7 opened this issue Sep 13, 2022 · 4 comments

Comments

@ZALCR7
Copy link

ZALCR7 commented Sep 13, 2022

我使用本地视频的时候无法出现检测线,我尝试更改检测线的四个参数,但是仍然没有出现检测线,请问您我应该如何解决?
image

@owo12321
Copy link
Owner

我使用本地视频的时候无法出现检测线,我尝试更改检测线的四个参数,但是仍然没有出现检测线,请问您我应该如何解决? image

你这图片左上角那个num下边的蓝线就是检测线,你应该把它弄到下边来。线的起点终点坐标在count.py的第36行设定,四个参数分别是[x1, y1, x2, y2]

@ZALCR7
Copy link
Author

ZALCR7 commented Sep 14, 2022

谢谢!这个问题解决了。请问大佬如何设置选中框的粗细,以及如何将车辆框边上的数字改为bus,car等呢?谢谢了

@owo12321
Copy link
Owner

谢谢!这个问题解决了。请问大佬如何设置选中框的粗细,以及如何将车辆框边上的数字改为bus,car等呢?谢谢了

count.py第186行cv2.rectangle()函数中最后一个参数就是框的粗细,单位是像素
框边上的数字并不是表示种类,而是序号,比如假设视频里到这一帧共识别出了9辆车,左上角的数字就是这辆车的序号(1~9)表示第几辆车。
如果你想改的话,在count.py第184行的label改成你想要的字符串,但这样所有的框都会变成一样的内容

@ZALCR7
Copy link
Author

ZALCR7 commented Sep 14, 2022

已解决,谢谢大佬了!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants