auduno / clmtrackr

Javascript library for precise tracking of facial features via Constrained Local Models
MIT License
6.51k stars 1.16k forks source link

facial recognition is not working on iOS (image) #103

Closed ferchhho closed 5 years ago

ferchhho commented 7 years ago

I am developing a cross-platforms project (Phonegap) and I try to integrate the clmtrackr but it not responding appropriately on iOS devices but android it is.

Verifying the problem I found that the native method of JS (getImageData()) is crashing the flow app.

var imageData = work_ctx.getImageData(0, 0, w, h);

SalRocco commented 7 years ago

Same problem here, also on iOS Safari

auduno commented 7 years ago

WebRTC and getUserMedia is not supported in current versions of iOS, so I think this is the issue you're running into. It will however be supported in iOS 11 which is due to be released this fall.

ghost commented 7 years ago

This is correct. With the major updates this fall for iOS and macOS the browsers will implement the needed functions. So it is just a matter of time and we have to be patient.

ryansit commented 7 years ago

You can now test on Safari 11 easily with https://developer.apple.com/safari/technology-preview/

But you need to update the clmtrackr code to handle the newer navigator.mediaDevices.getUserMedia

auduno commented 7 years ago

I'll have a look at updating clmtrackr examples with support for navigator.mediaDevices.getUserMedia over the next weeks.

auduno commented 7 years ago

The examples in dev branch are now using navigator.mediaDevices.getUserMedia, so should hopefully work fine on iOS once iOS11 is out.