app.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:smart-monitor-system 作者: MostafaBalata 项目源码 文件源码
def gen2():
#    from PIL import Image
#    import io
    import cv2
    #im = Image.fromarray(A)
    while True:
        frame = get_frame()
    frame = cv2.imencode('.jpg', frame)[1].tostring()


#        print type(frame),frame
#   frame = Image.fromarray(frame)
#   frame = frame.tostring()
#   print(type(frame), frame)
#   yield (frame)
        yield (b'--frame\r\n'
               b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号