I'm trying to render an orthomosaic, the problem is that the image is too large, with other smaller maps I can handle normally, but when I will render a map it greater than the error in the conversion from RGB to HSV, but this error occurs because it could not read the image soon it is trying to convert an empty image, so the error.
This is the initial code and the error displayed is in the RGB to HSV conversion line ...
import cv2
import numpy as np
imageName = "mapa.tif"
imagem = cv2.imread(imageName,cv2.IMREAD_COLOR)
hsv = cv2.cvtColor(imagem, cv2.COLOR_BGR2HSV)
error:
OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3959
Note: Remember that with smaller maps the code works, so I think there might be some memory allocation limit on the cv2.imread function.
Does anyone have any information on this? or do you know how to increase the memory allocation limit for image reading in openCV?