python+opencv程序定做、代写、代写opencv程序、代写socket python作业

python+opencv程序定做、代写、代写opencv程序、代写socket python作业
我需要一个python+opencv程序,具体要求是本机自己摄像头拍一张照(如命名kk.jpeg)后,利用socket把kk传给服务器(另一台电脑),服务器对图片进行处理后生成一张图片如命名gg,jpeg,然后服务器再把图片gg回传给本机。
因为对图片处理我可以自己写,所以我想请你们帮忙设计一个程序:把一张本机摄像头截取的图片(kk.jpg)用socket传给另一个电脑后电脑自动将指定目录的一张图片(gg.jpg)回传给本机.
截图程序:
import cv2
import numpy as np
import pickle
import matplotlib.pyplot as plt
import socket
import os
import sys
import struct

cap = cv2.VideoCapture(0)
index = 0
while True:
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('p'):
cv2.imwrite("kk.jpg", frame)
index = index + 1
if cv2.waitKey(1) & 0xFF == ord('q'):
break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindohttp:
//www.daixie0.com/contents/3/1326.htmlws()

猜你喜欢

转载自www.cnblogs.com/fsnh/p/8998385.html