python opencv cv2.imdecode()関数(メモリ内のバッファから画像を読み取る)



Python Opencv Cv2 Imdecode Function



from cv2.__init__.py

def imdecode(buf, flags): # real signature unknown restored from __doc__ ''' imdecode(buf, flags) -> retval . @brief Reads an image from a buffer in memory. Read the image from the buffer in memory. . . The function imdecode reads an image from the specified buffer in the memory. If the buffer is too short or . contains invalid data, the function returns an empty matrix ( Mat::data==NULL ). The function imdecode reads the image from the specified buffer in the memory. If the buffer is too short or contains invalid data, the function returns an empty matrix (Mat :: data == NULL). . . See cv::imread for the list of supported formats and flags description. . . @note In the case of color images, the decoded images will have the channels stored in **B G R** order. For color images, the decoded image will have channels stored in ** B G R ** order. . @param buf Input array or vector of bytes. Input array or byte vector. . @param flags The same flags as in cv::imread, see cv::ImreadModes. ''' pass