gmHappy

从不敢夜郎自大,但也不至于妄自菲薄,只是想做一个靠本事吃饭的手艺人

Object of type 'ndarray' is not JSON serializable

Object of type 'ndarray' is not JSON serializable import numpy as np import json arr=np.asarray([345,45]) result={'name':'test','num':ar} json....

2019-02-28 17:28:16

阅读数 470

评论数 0

MTCNN 人脸检测

demo.py import cv2 from detection.mtcnn import MTCNN # 检测图片中的人脸 def test_image(imgpath): mtcnn = MTCNN('./mtcnn.pb') img = cv2.imread(img...

2019-02-28 14:29:51

阅读数 448

评论数 0

python 中PIL.Image和OpenCV图像格式相互转换

PIL.Image转换成OpenCV格式: import cv2 from PIL import Image import numpy   image = Image.open("plane.jpg") image.show() img = cv2.cvtC...

2019-02-21 15:45:59

阅读数 495

评论数 0

python OpenCV视频的读取及保存

import cv2 cap = cv2.VideoCapture('rtsp://admin:hik12345@192.168.3.160/Streaming/Channels/1') fourcc = cv2.VideoWriter_fourcc(*'XVID') # fps = cap....

2019-02-21 15:42:36

阅读数 444

评论数 0

提示
确定要删除当前文章?
取消 删除