2017-09-14

解决:SSL certificate problem unable to get local issuer certificate

网络抽风。GIT连不上,于是挂上代理





git config --global http.proxy 127.0.0.1:8087








解决办法:





git config --global http.sslVerify false





参考资料:

2017-09-10

解决: OpenCV error: (-215)

error: (-215) src.checkVector(2, CV_32F) == 4 && dst.checkVector(2, CV_32F) == 4 in function getPerspectiveTransform

正确的代码示例如下:

[python]
import cv2
import numpy as np

img = cv2.imread('original.jpg',0)

src = np.array([[50,50],[450,450],[70,420],[420,70]],np.float32)
dst = np.array([[0,0],[299,299],[0,299],[299,0]],np.float32)

ret = cv2.getPerspectiveTransform(src,dst)
print ret
[/python]

error: (-215) p.checkVector(2, CV_32S) >= 0 in function polylines

正确的代码示例如下:


[python]
source_pts = np.array([[280,700],[560,480],[760,480],[1120,700]])
cv2.polylines(test_img, source_pts, True, [255,0,0])
[/python]



参考资料:
[1]
[2]Geometric Image Transformations
[3]

Ubuntu SSR setting

使用electron-ssr客户端 https://github.com/shadowsocksrr/electron-ssr 设置proxy