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

Add png mask file #10

Open
lyazide opened this issue Jan 3, 2024 · 1 comment
Open

Add png mask file #10

lyazide opened this issue Jan 3, 2024 · 1 comment

Comments

@lyazide
Copy link

lyazide commented Jan 3, 2024

Hi, Very nice work and I am impressed by the result on this small RK3588 Sbc. What would be the simplest way to add a png mask.png file to perform the detecting only in the unmaked area and display the final result on the full video?

@leafqycc
Copy link
Owner

leafqycc commented Jan 4, 2024

The simplest method is to modify the draw function of line 161 under func.py. The cv2.rectangle function is used in the loop to check the drawing of the box body. The top left vertex of the box body is drawn as (top, left), and the bottom right vertex is (right, bottom). You only need to determine whether the vertex or the box is within the mask range, and if it is, contine enters the next loop without drawing the check box. Or you can try to copy an image of the current frame, and then paint mask.png as a full black overlay so that it cannot be detected, and then use the detection results of the overwritten image to paint the original frame image

Hi, Very nice work and I am impressed by the result on this small RK3588 Sbc. What would be the simplest way to add a png mask.png file to perform the detecting only in the unmaked area and display the final result on the full video?

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