How to read raw png from an array in python opencv?

后端 未结 6 570
感情败类
感情败类 2020-12-06 05:33

I\'m streaming a png image from my iPhone to my MacBook over tcp. The MacBook code is from http://docs.python.org/library/socketserver.html#requesthandler-objects. How can t

6条回答
  •  时光取名叫无心
    2020-12-06 06:09

    When you have to load from file, this simple solution does the job (tested with opencv-python-3.2.0.6):

    import cv2
    
    img = cv2.imread(somefile)
    

提交回复
热议问题