doutangkao2789 2017-08-11 05:18
浏览 97
已采纳

如何将从PHP中的网络摄像头捕获的图像发送到Python

I am capturing an image from PHP script from webcam and I want to send it to python script so that I can use OpenCV feature homography functions on it. How can I send an image using exec command in PHP and pass that image to cv2.imread() function in python?

Thanks.

  • 写回答

1条回答 默认 最新

  • dougaoshang0237 2017-08-17 18:25
    关注

    Well, I believe that if you want to use cv2.imread you need to have a file, because one of the parameters is a file name and that is going to make everythins slower and resource consuming. I think that what you want to use is cv2.imdecode (similar to imread by in memory), in which case you only need to turn your image into the correct type of stream, a numpy array for example.

    I would also consider to process everything on python at once if you want to take in account performance.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向