Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Am getting NULL without setting an error on cv2.imwrite

Here is the full error cv2.imwrite(fx,Out_File_Path,[int(cv2.IMWRITE_JPEG_QUALITY), 90]) SystemError: <built-in function="" imwrite=""> returned NULL without setting an error

cv2.imshow("",YOLO_image) Works fine

print(type(YOLO_image))
print(YOLO_image.dtype)

Gives

<class 'numpy.ndarray'=""> uint8

cv2.imwrite(fx,Out_File_Path,[int(cv2.IMWRITE_JPEG_QUALITY), 90]) and cv2.imwrite(fx,Out_File_Path) both generate the error message shown above.

Windows 10 Pro CV2 Ver 4.20

Am getting NULL without setting an error on cv2.imwrite

Here is the full error error:

cv2.imwrite(fx,Out_File_Path,[int(cv2.IMWRITE_JPEG_QUALITY), 90])
SystemError: <built-in function="" imwrite=""> function imwrite> returned NULL without setting an error

error

cv2.imshow("",YOLO_image) cv2.imshow("",YOLO_image) Works finefine.

print(type(YOLO_image))  
print(YOLO_image.dtype)

print(type(YOLO_image))
print(YOLO_image.dtype)
Gives:

Gives

<class 'numpy.ndarray'>
uint8

<class 'numpy.ndarray'=""> uint8

cv2.imwrite(fx,Out_File_Path,[int(cv2.IMWRITE_JPEG_QUALITY), 90]) 90]) and cv2.imwrite(fx,Out_File_Path) cv2.imwrite(fx,Out_File_Path) both generate the error message shown above.

Windows 10 Pro CV2 Ver 4.20