Guest User

Untitled

a guest
Jun 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. ```
  2. # coding:utf-8
  3.  
  4. import cv2
  5.  
  6. img = cv2.imread(p)
  7. img.dtype = 'uint8'
  8. img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
  9. img.tofile(p + '.bin')
  10. cv2.imwrite(p + '.jpg', img)
  11. ```
  12. opencv读取图片采用的顺序是BGR
Add Comment
Please, Sign In to add comment