
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
jquery.facedetection
Advanced tools
A jQuery plugin to detect faces on images, videos and canvases.
A jQuery/Zepto plugin to detect faces on images, videos and canvases to get theirs coordinates.
Importante note: This plugin uses an algorithm by Liu Liu.
Website and demo here:
http://facedetection.jaysalvat.com/
Download the plugin with the method of your choice.
Download the last release manually
Or install it with Bower.
bower install jquery.facedetection
Or install it with NPM.
npm install jquery.facedetection
Include jQuery and the plugin.
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="path/to/dist/jquery.facedetection.min.js"></script>
Set a picture with some faces in your HTML page.
<img id="picture" src="img/face.jpg">
Apply the plugin to this image and get the face coordinates.
<script>
$('#picture').faceDetection({
complete: function (faces) {
console.log(faces);
}
});
</script>
Returns an array of found faces object:
interval — Interval (default 4)
minNeighbors — Minimum neighbors threshold which sets the cutoff level for discarding rectangle groups as face (default 1)
confidence — Minimum confidence (default null)
async — Async mode if Worker available (default false). The async mode uses Workers and needs the script to be on the same domain.
grayscale — Convert to grayscale before processing (default true)
complete — Callback function trigged after the detection is completed
complete: function (faces) {
// ...
}
error — Callback function trigged on errors
error: function (code, message) {
// ...
}
FAQs
A jQuery plugin to detect faces on images, videos and canvases.
The npm package jquery.facedetection receives a total of 150 weekly downloads. As such, jquery.facedetection popularity was classified as not popular.
We found that jquery.facedetection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.