3
I’m trying to process an orthomosaic, the problem is that the image is too big, with other smaller maps I can process normally, but when I go to process a bigger map it from the error in converting RGB to HSV, but this error occurs because it failed to read the image so it is trying to convert an empty image, so the error.
this is the initial code and the error shown is in the conversion line from RGB to HSV...
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: Remembering that with smaller maps the code works, for this reason I believe that it can be some limit of memory allocation in the function cv2.imread.
Does anyone have any information about it? or knows how to increase the limit of memory allocation for reading image in openCV?
Thanks for the help, I ended up solving the problem by dividing the image into several parts. But I can’t say exactly the size limit for the operation.
– Victor Borba