如何找到错误图像? [英] How to find the error image?

查看:118
本文介绍了如何找到错误图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的图像处理有问题,但我不知道如何解决。



我有2张图片:
- Pic 1:)。其原因在于,如果不包含人工补丁,最终的彩绘图像更有可能与修复前的图像相似。因此,坏图像是在修复过程之后具有较大差异的图像。为此,您再次计算两个案例中的修复图像和原始图像之间的绝对差异。然后在绝对差值> 0的区域中使用一些度量。在这个例子中,灰度强度的虚拟和给出了没有矩形的图像的424454和另一个的758366。



这是绘画中的蒙面图像,绘制的好图像,修复的坏图像以及灰度各自的绝对差异:




I've got a problem with image processing, but I don't know how to solve it.

I have 2 pictures: - Pic 1: http://goo.gl/BBxVl - Pic 2: http://goo.gl/X0VFW

The pic 2 actually express the pic 1 but it was covered by the object. I am writing a program using matlab code to define that: If the picture is a the fulfilled (perfect) one, I will "imshow" it. But if there are any errors with the picture, the program will show the notice board for the user.

Until this time, I still can not solve it because I don't know where to begin; I also don't have any definition about the shape and the color of the object that cover the picture.

解决方案

My idea also starts with the absolute difference between both images. The issue here is that you might get a lot of regions that weren't modified at all, due to compression and the inner working of some file formats (like jpg). For instance, here are two sample images and the binary difference between them to highlight every modified point, although I only manually modified the visible rectangles. In the non-binary difference you hardly notice all these points, but they are there. A threshold solves the problem here, I played with the value 20:

Now, to determine which of the images is the "good" one, I used an inpainting algorithm (you can find one such implementation at http://www.cc.gatech.edu/~sooraj/inpainting/). The reasoning for this is that the final in-painted image is more likely to resemble the image before inpainting if it does not contain the artificial patches. So, the "bad" image is the one with greater difference after the inpainting process. For this, you calculate again the absolute difference, now between the inpainted image and the original one for both cases. Then use some measure in the regions with absolute difference > 0. A dummy sum of the intensities in grayscale, in this example, gives 424454 for the image without the rectangles and 758366 for the other one.

Here is the masked image for in-painting, the "good" image inpainted, the "bad" image inpainted, and the respective absolute differences in grayscale:

这篇关于如何找到错误图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆