So I'm wondering if it's possible for a website to be able A) access the mobile device's camera and B) have real time facial recognition capabilities? Essentially what Snapchat does, albeit much simpler, but in a web application opposed to a mobile application?
I already know the answer to (A), as found here: https://davidwalsh.name/demo/iphone-camera.php
And I even found an example that uses Amazon Rekognition, as found here: https://hackernoon.com/building-a-face-recognition-web-app-in-under-an-hour-345aa91487c
Only nuisance with the rekognition example I found was that it seems to take the picture AND THEN do the recognition, I'm looking more for something to do it while the camera is up (so you point the camera to someones face, and it does the magic there).
Disclaimer: I am not asking anyone to do any work for me here. I know I'm not providing any code samples, and that's because I'm just in the research phase and wanted to see if anyone here has any input on what I'm trying to achieve.
Something tells me this may not be possible, from my google searches I didn't quite find anything that I'm looking for, but close.
Related
I'm trying to program an application for an IP camera of mine. I want it to be able to take the IP address of the camera and detect motion (a change of a certain number of pixels in a certain space). I really have no idea how I'm going to go about this, and I can't find many tutorials. A lot of them are node.js, and the other ones use APIs or external libraries. I do not use APIs or any other external code. (I know it's a bit weird, but I have my reasons) I'm very sorry that this question probably wasn't the best, but I've been trying to find info on how to do this kind of thing and I can't find much on the web. Thanks in advance!
Edit: Some were confused as to whether I was using node.js. I'm using browser-based javascript.
You can use image moments to estimate motion between images.
Some CS reading about it ( or google it up ):
https://core.ac.uk/download/pdf/82353641.pdf
Event most basic moments will be sufficient for simple motion detection
Ages ago I developed open source project which also calculates moments ( in java )
https://sourceforge.net/projects/javaocr/
Even simple center of mass would be sufficient for simple motion detection ( higher order moments are necessary for pattern matching )
Also interesting reading would be on Hu moments
I needed to implement speech 'identification', ie. Guess if the person who is trying to login, is actually him/her, by matching his/her voice.
To consider the case, where the app doesn't recognize the person, but the user is himself trying to login, then he may bypass it with a pin, setup during initial settings.
I am using Python and Flask, to build the webapp, and included javascript in the question, so as to know of possible ways in it too.
Till now, i read about it from some sources, but i couldn't arrive at a possible solution, on stack overflow, as well as 'few' blog posts.
The best 'possible' solution i could arrive at was Cognitive Speech Services by Microsoft -
https://azure.microsoft.com/en-us/services/cognitive-services/speaker-recognition/
I also thought of recording the voice using the Recorder.js, and analyzing at the server end, but couldn't implement it.
So, i wanted a way to implement it on the web app, even a simple gist with a bit of code on using ms cognitive services (i did read pages of the documentation, but it didnt help much), or doing it by python will be helpful.
The documentation at https://learn.microsoft.com/en-us/azure/cognitive-services/speaker-recognition/home will be helpful. Note that there are clickthrough links to the API reference. It explains the high-level process (use “enrollment” to train).
We have speaker identification, which is distinguishing who is speaking from a group of known voices that you train with. You need to provide labelled data (meaning examples of a known speaker talking): see https://westus.dev.cognitive.microsoft.com/docs/services/563309b6778daf02acc0a508/operations/5645c3271984551c84ec6797.
or
Please follow the below link speech SDK samples.
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/
You can use batch transcription api and enable diarization.
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/batch-transcription
As #Ram pointed out that we can use the Microsoft Cognitive Services, we used the same to implement it.
First, we needed an API key from Microsoft for the Cognitive Speech Service (they give a 2 keys, and an endpoint for 7 days in a free trial, without any card, and another free version for a year maybe, with card details)
Get the API keys here : https://azure.microsoft.com/en-in/try/cognitive-services/?unauthorized=1
Then, i went through the documentation of Microsoft, but couldn't really be helped by it.
What helped was this : https://github.com/rposbo/speaker-recognition-api
I went through all files, and the 'needed' part was mainly in the speech-recognition-api-demo-core.js and the demo.html
First understand what it's really doing, then only you can implement it on your page.
That actually concludes the answer, since that's how it 'can' be implemented using Javascript.
Extra - https://github.com/AdityaGupta150/ProtoMain - We have used only the needed part of Robin posbo's code (you won't be able to just copy paste, first understand it), and implemented it, you can see that in templates/verification.html
I created a web app in node.js,express,angular and bootstrap and it had forms and everything so when i ran it on another device and the forms and zoom where all messed up. my question is how can we find out in which device my app is running say an iPad or a laptop and make changes accordingly
thanks,
Srihari
To recognize a device is not a good choice to go closer to the problem. There are too many. It is better to see whether the device supports the necessary functions. For this has been built https://modernizr.com/.
If you seem rather to be the problem that your application is not responsive. So the different resolutions does not adapt. May I suggest to learn something on the Web. https://www.smashingmagazine.com has mostly good articles to it.
Sorry I can not help you better, but without an example which does not go well, you can not get a better help.
My company purchased an old square reader, the seller claims it is unencrypted. We are trying to develop a web application that uses this reader. The reader is supposed to fire a hard return keypress event after registering a swipe - it has never done that (using javascript event listeners). The only time this reader does anything is using the iOS Square Register app - that app does recognize the reader and the swipe (though it does a terrible job, asking me to 'retry swipe faster' a few dozen times before registering a swipe)
The fact that it only works in the app leads me to believe that this is an encrypted reader. Is there any way to tell if this assumption is correct? Without taking it apart.
Also, any tips on troubleshooting this would also be appreciated.
Thanks
I think you're pretty lucky to even be able to detect anything at all with javascript event listeners as you seem to imply....
Imagine the privacy intrusions we'd have all over (maybe already) if javascript stealthily downloaded from a web site could gain access to your microphone and/or microphone jack as you want to do. It might be possible, but the phone 'ifrastructure' is definitely designed to 'resist' this.
I think you're going to have to write an app that installs with user permissions to access the devices you need - otherwise the mic jack device is unlikely to be available to you.
BTW, credit card stripes are encoded in 7 bit, so if you are getting a string that looks 'encrypted' examine the unaltered string as 7 bit and it'll start making sense.
Ideally what I was initially looking for is an implementation of the HTML5 Media Capture API with a polyfill rolling back to Flash, however, my research has concluded that the API is in its infancy and is yet to be taken up by any of the major vendors, and in addition to that, Flash means for doing what I need seem scarce.
I need to be able to take webcam input from a camera, show a live preview, record, and play back that recording, nothing more, no upload to server necessary, all local.
Are there any decent Flash solutions? Or other means of achieving this?
I have found a lot of references to Red5, to clarify, would that refer to this: http://www.red5-recorder.com? Is this really the tool to use or are there better alternatives?
I ended up using http://nimbb.com for this, the free version has some limitations but gives the basic functionality needed met my criteria for the project.
In addition to my needs it also allows users to upload recordings to the Nimbb website and share over social, which can't hurt!
I too am looking around for the same feature. The best I found was Open-Tok, they do all the work
http://www.tokbox.com/opentok/plugnplay#VideoMessages
My problem is my site is adult in nature, so the people recording the videos would more than likely be naked. This is against the terms of service for Open-Tok I do like their offering.