1 | initial version |
Hi! Without seeing your images, it's quite difficult to know which specific problem your images have. But I suggest you to resize images if they are too small, convert them to grayscale and normalize them.
You can also try to deblur (sharpen) your images using for instance Wiener filter. Unfortunately, there is no such function in opencv, so you will have to do it yourself. For instance, here is a small code which will sharpen your image:
//convert first your image to float to improve precision...
img.convertTo(imgTmp, CV_32F);
GaussianBlur(imgTmp, imgResult, cv::Size(0, 0), 3);
addWeighted(imgTmp, 1.5, imgResult, -0.5, 0, imgResult);
// convert back to 8bits gray scale
imgResult.convertTo(imgResult, CV_8U);