1 | initial version |
According to the docu, equalizeHist doesn't change the image-format, however, the docu doesn't state if it works in-place or not, so please try it this way:
cv::Mat tmp;
equalizeHist(img_1, tmp);
img_1 = tmp;
Also note, that your image must be in grayscale - is that the case?
If this doesn't help, one other idea comes to my mind: Have you checked if you get keypoints from your equalized image at all? If not, descriptors_1 may get empty and you'll probably get such an error.
2 | No.2 Revision |
According to the docu, equalizeHist doesn't change the image-format, however, the docu doesn't state if it works in-place or not, so please try it this way:
cv::Mat tmp;
equalizeHist(img_1, tmp);
img_1 = tmp;
Also note, that your image must be in grayscale - is that the case?
If this doesn't help, one other idea comes to my mind: Have you checked if you get keypoints from your equalized image at all? If not, descriptors_1 may get will be empty and you'll probably get such an error.