SimpleCV Jpeg Streamer 仅适用于本地主机
SimpleCV Jpeg Streamer only works with local host
当我 运行 以下 python 代码并连接到 chrome localhost:8080 时,我可以看到我的相机,但如果我尝试连接到 TheComputersIP:8080 在同一网络上的另一台设备上 chrome 我无法连接,只是得到错误连接被拒绝。我不确定如何修复它,我们将不胜感激(脚本正在 windows 上 运行 使用 PyCharm)。
from SimpleCV import *
w=640/2
h=480/2
cam = Camera(0,{"width":w,"height":h})
disp =Display()
js = JpegStreamer(8080,0.01)
print(js.url())
print(js.streamUrl())
while disp.isNotDone():
img = cam.getImage()
img.show()
img.save(js)
解决了现在只是改了:
js = JpegStreamer(8080,0.01)
至:
js = JpegStreamer("0.0.0.0:8080",0.01)
当我 运行 以下 python 代码并连接到 chrome localhost:8080 时,我可以看到我的相机,但如果我尝试连接到 TheComputersIP:8080 在同一网络上的另一台设备上 chrome 我无法连接,只是得到错误连接被拒绝。我不确定如何修复它,我们将不胜感激(脚本正在 windows 上 运行 使用 PyCharm)。
from SimpleCV import *
w=640/2
h=480/2
cam = Camera(0,{"width":w,"height":h})
disp =Display()
js = JpegStreamer(8080,0.01)
print(js.url())
print(js.streamUrl())
while disp.isNotDone():
img = cam.getImage()
img.show()
img.save(js)
解决了现在只是改了:
js = JpegStreamer(8080,0.01)
至:
js = JpegStreamer("0.0.0.0:8080",0.01)