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

how to get frame around object in live video feed #38

Open
manish199957 opened this issue Mar 29, 2020 · 4 comments
Open

how to get frame around object in live video feed #38

manish199957 opened this issue Mar 29, 2020 · 4 comments

Comments

@manish199957
Copy link

what will change in the .py files??

@manish199957 manish199957 changed the title get frame around object in live video feed how to get frame around object in live video feed Mar 29, 2020
@RuffaloLavoisier
Copy link

Hello, you can separate the streaming portion based on whether it is detected or not.

@RuffaloLavoisier
Copy link

This code will help.

def gen(camera):
    while True:
        # read from camera
        frame, found_obj = camera.get_object(model)  # detect ?

        if found_obj:
            frame_Real = frame  # detect frame
        else:
            frame_Real = camera.get_frame()  # just frame

        yield (b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' + frame_Real + b'\r\n\r\n')

@AchiliesX
Copy link

Where to include this code...
In the main.py file or the camera.py file
Also in which section ...

@RuffaloLavoisier
Copy link

RuffaloLavoisier commented Jul 20, 2022

Hi there 😊 @AchiliesX
Maybe, in main.py

frame = camera.get_frame()

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

3 participants