wagtail / Willow

A wrapper that combines the functionality of multiple Python image libraries into one API
https://willow.wagtail.org/
BSD 3-Clause "New" or "Revised" License
273 stars 53 forks source link

Reshaping Feature Array #56

Closed trumpet2012 closed 7 years ago

trumpet2012 commented 7 years ago

From OpenCV 1 to OpenCV 2/3 there is an additional array wrapping each of the feature points. So in OpenCV 1 two feature points of [20, 40] and [30,50] would have been returned as

[
     [20,40], 
     [30, 50]
]

With the switch to numpy they were being returned as

[
     [
         [20,40]
     ], 
     [
         [30, 50]
     ]
]

Added tests to verify the values of the features/facial points to catch this in the future.

kaedroho commented 7 years ago

Looks good, thanks again!