Finding region of interest with a known pattern
I want to do some image processing on two photos of the same object taken x amount of time apart and likely from varying angles and light. Fortunately there is a well defined region of interest in the photo indicated by a white square with a black cross (+) through the region. See the image below.
In both photos I want to find and crop the ROI then perform a perspective transform.
I'm not new to opencv, but i'm no expert either. I was hoping to start a discussion about the best way to find the ROI given its simple shape. My initial idea was to use some sort of high pass filter with a kernel that looked like this:
k = [0 1 0
1 1 1
0 1 0]
But I have not used any similar methods like this before and I have a feeling this would fail if the ROI was not exactly square in the initial image. I also considered using contours with an algorithm to find that specific shape, as well as feature matching. I am sure there are better methods though, can someone please enlighten me :)
if you could add some pictures, I am sure that this would simplify your problem description and help us to provide you some advice/solution.
Sure thing, added the photo :)