问题
I take a template
and sample 8 points from it (now 36). Each little dot is a mask and i take the average value from that little dotted area and i add them to a list.
It ends up looking something like these:
[203, 176, 160, 174, 185, 185, 152, 136, 131, 131, 131, 131, 131, 137, 144, 133, 131, 130, 130, 130, 131, 130, 139, 160, 168, 150, 141, 160, 186, 201, 209, 214, 216, 216, 216, 217]
[194, 207, 216, 217, 217, 217, 217, 217, 217, 216, 214, 170, 148, 159, 171, 175, 165, 136, 131, 131, 130, 131, 149, 170, 151, 132, 131, 131, 131, 131, 134, 169, 172, 141, 141, 172]
[131, 131, 131, 141, 171, 164, 133, 141, 178, 197, 213, 216, 216, 216, 217, 217, 217, 217, 217, 216, 175, 153, 163, 174, 183, 171, 142, 132, 130, 130, 131, 161, 170, 149, 131, 131]
[131, 131, 131, 131, 153, 151, 136, 130, 131, 131, 131, 130, 130, 150, 164, 149, 134, 145, 172, 195, 205, 215, 216, 217, 217, 217, 216, 216, 195, 161, 168, 179, 192, 171, 152, 131]
Its easier to visualize them with a Plot. The RED line refers directly to the 1st sad teenager who is standing upright. (also known as Zero degree position). I need to find someway of comparing a line or list to the RED line/list. This way i can figure out what rotation the other teenagers are at given that the RED line is the Zero.
The values are not the same but very close to each other and obviously the lines are just off shifted meaning that the images are rotated. Are there any functions i can call that would do this kind of thing or some way i could process these to give me the rotation? Thank you
来源:https://stackoverflow.com/questions/62987526/grabbing-values-from-masked-image-areas-opencv-python