1''*_*1'' 5 opencv image-processing
我正在尝试使用形态学关闭操作使图像均匀亮,作为自适应阈值的前奏.我的方法是在关闭操作后将图像中的每个像素除以该像素的值,然后进行标准化:
Imgproc.GaussianBlur(sudokuImage, sudokuImage, new Size(5,5), 0);
Mat kernel = Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(11,11));
Imgproc.morphologyEx(image, closedImage, Imgproc.MORPH_CLOSE, kernel);
Core.divide(image, closedImage, image);
Core.normalize(image, image, 0, 255, Core.NORM_MINMAX);
Run Code Online (Sandbox Code Playgroud)
结果如下:

我希望最终的图像不那么褪色,更像下面的图像(使用看起来像这篇文章中相同的方法获得).我怎么能做到这一点?

| 归档时间: |
|
| 查看次数: |
1814 次 |
| 最近记录: |