- What happens if the filename specified in
cv2.imwrite
already exists?
- An error is raised
- The existing file is overwritten
- A new file is created
- None of the above
- What type of errors can occur when using
cv2.imread
?
- File not found error
- Unsupported image format error
- Permission denied error
- All of the above
- What is the difference between
cv2.IMREAD_COLOR
andcv2.IMREAD_GRAYSCALE
?
-
cv2.IMREAD_COLOR
reads the image as a grayscale image, whilecv2.IMREAD_GRAYSCALE
reads the image as a color image. -
cv2.IMREAD_GRAYSCALE
reads the image as a grayscale image, whilecv2.IMREAD_COLOR
reads the image as a color image. - There is no difference between
cv2.IMREAD_COLOR
andcv2.IMREAD_GRAYSCALE
- None of the above
- What is the purpose of the
cv2.cvtColor()
function?
- To convert an image from one color space to another.
- To resize an image.
- To crop an image.
- To apply a filter to an image.
- What is the return type of
plt.imshow()
of Matplotlib?
- Matplotlib Image object
- NumPy array
- PIL Image object
- None of the above