I recently started using imageclassifier() in p5js but when opened using mobile i.e Localhost .It dosent open camera should i be using a different method or some config is required.
Asked
Active
Viewed 197 times
1 Answers
1
The imageClassifier() is probably used for webcams only and it's configured that way. But smartphones have one pair of cameras. So I don't think imageClassifier() would work on smartphones.
When I tried to do it, it throws an DOMException error.
According to Oracle: DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).
Link: https://docs.oracle.com/cd/E79994_01/tuxedo/docs1222/xmlparser/html/apiDocs/classDOMException.html
In short, imageClassifier() can't access your phones front or back camera.

AbrarShahriar
- 153
- 8