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
Th
So you don't know which one of them is the correct one, and you want to choose the correct one? Or you have a ground truth image that you can compare the input with? Because if you know how the correct image looks like, you can just do a simple subtraction between the images and find the erroneous one. So I don't think that's the question.
So, in the case you have two images and you have to determine which one is correct, do you know the type of the error? It is always a "patch" added on the image? Is it always rectangle or it can also be blended with the background image?
One idea would be to cut the image in parts and do histogram analysis for every one of them, but it will only work if the original image is quite constant and the patched object differs a lot from the background.
Maybe you can do edge detection on the image and then try to detect straight lines (Hough line detection can do that) so that you can search for a rectangular shape. (If you have the lines as a result then the algorithm for finding a rectangle is independent of the shape and size of the rectangle. You only check the line direction)
If you can describe with more details what are the restrictions of your error objects, maybe we can think of a better idea.