0
$\begingroup$

this is my first question here so I am not sure if it is a valid one.

I am currently facing a mathematical problem that is not so hard to solve, but given the accuracy i need in the results I would like to ask for the best approach.

I have a 6 x 6 Matrix of "vectors" (each has an x and y value that shows me where that area is pointing to). These values ARE related. I get this matrix through image processing so that I know the expected result pattern.

I am looking to identify one of 2 possible patterns. The first pattern is when all the values point to the same direction, and the second one is when the middle is 0 and the edges point away from the middle or towards the middle.

What would be the best approach for this?

Right now I am dividing the matrix into sectors of 2x2 and getting the averages, then perform a series of conditions like if 7 of the 9 sectors have the same direction then my whole matrix is pointing in that direction (first pattern). If the average of of all sectors is close to 0 then its the second pattern.

Am I doing the right thing? Is there a mathematically elegant way to do this?

Thanks in Advance.

(I can provide drawings if what I explain here is too confusing)

Edit: The discarding part has to do with the fact that the matrix is built from image processing, and because of this some of these values tend to get unreasonable results, right now I am not adjusting the direction but I am just limiting the magnitude to reduce the noise.

  • 0
    The title says find the mean, but the question says find the pattern. Please edit one or the other so they cohere. Also, "discarting" is not a word. Maybe you mean "discarding", or maybe you mean "discounting". You could edit that, too, please.2012-06-22
  • 0
    Oh sorry, I am actually a little confused in how to define this problem, because it could be found with the mean (since its all reduced to where all the values are pointing in general) what is this considered a mean or a pattern recognition problem?2012-06-22

1 Answers 1