Segmentation fault on wrong image type gradient operation
A segmentation fault occurs in this case
>>> import cv2
>>> import pylena as pln
>>> img = cv2.imread("some/path/to/jpg/img")
>>> img2 = cv2.cvtColor(img, cv2.COLOR_RGB2Lab)
>>> se = pln.morpho.make_structuring_element_2d("rect", 5, 5)
>>> out = pln.morpho.gradient(img2, se)
Segmentation fault (core dumped)
It looks like the case the image is not supported is not handled.
Thanks to Théo BERGUIG for reporting this issue.