Python to c++ non-continuous image issue
MichalDN opened this issue · 2 comments
Hello, I have been running into this issue, not sure if I am doing something wrong, or misunderstood the capabilities of your libraries.
on python side following is run:
img2 = cv2.imread('testImg.png',cv2.IMREAD_COLOR)
img3Test = img2[:,:,1]
detector2.showImage(img3Test)
On c++ side this is run
.def("showImage", &PYARobustChessboardDetector::showImage)
void showImage(cv::Mat mat) {
cv::imshow("Mat", mat);
cv::waitKey(0);
cv::destroyAllWindows();
}
if I enforce continuousness
res4 = detector2.processImage(np.ascontiguousarray(img3Test))
It is as expected
I assume your libraries are properly linked, as I would expect error be thrown when I try to load Mat from python, without support.
Though to be fair as I write this, you claim continuous data support, not contiguous so this issue may be outside of the scope of the project.
Hi,
You are right, non contiguous support is out of the scope of the library.
However, I just added an exception, with a nice error message: c1622d6
Could you please try it and tell me if it does work also on your side?
Shame :)
The code compiled and exception worked once I added the missing namespace in front of ssize_t. See pull request, where I added it.