Comments (9)
It can be done, but not yet with the jQuery plugin. I think that adding an option called "selection" that allows to restrict the search window might be the answer to your question - what do you think?
from js-objectdetect.
absolutely, I have tried to run it on a standalone image, but it can not working on multiple faces with in the same source image. I just nested the detection of the face, and run a eye detect on the whole image/video and I get wrong data when connected to a video... but I will try again today ( it works with static images).
as I said: performance on the second stage object detection has to work on a ROI and not on the whole image... that way performance is improved and I can detect eyes within a face and not only with in whole image.
I was thinking to copy the face in a canvas and make the eye-detector work on the copied portion of the image... but I am too novice to do it... I need to research it further. I am not too sure performance wise it would be good, but functionally, I would get what I need, just as you proposed a selection to work with.
thisis what I managed to get working so far, but as I said it works only on whole images
<title>Image Example</title><script src="js/objectdetect.js"></script>
<script src="js/objectdetect.frontalface.js"></script>
<script src="js/objectdetect.eye.js"></script>
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script src="js/jquery.objectdetect.js"></script>
<script>
$(window).load(function() {
$("#face").objectdetect("all", { classifier: objectdetect.frontalface }, function(face) {
$("<div />", {
"css": {
"border": "2px solid #00FF00",
"position": "absolute",
"left": ($("#face").offset().left + face[0][0]) + "px",
"top": ($("#face").offset().top + face[0][1]) + "px",
"width": face[0][2] + "px",
"height": face[0][3] + "px"
}
}).appendTo("body");
//detect_eyes
$("#face").objectdetect("all", {classifier: objectdetect.eye}, function(eyes) {
$("<div />", {
"css": {
"border": "2px solid #F00",
"position": "absolute",
"left": ($("#face").offset().left + eyes[0][0]) + "px",
"top": ($("#face").offset().top + eyes[0][1]) + "px",
"width": eyes[0][2] + "px",
"height": eyes[0][3] + "px"
}
}).appendTo("body");
$("<div />", {
"css": {
"border": "2px solid #F00",
"position": "absolute",
"left": ($("#face").offset().left + eyes[1][0]) + "px",
"top": ($("#face").offset().top + eyes[1][1]) + "px",
"width": eyes[1][2] + "px",
"height": eyes[1][3] + "px"
}
}).appendTo("body");
});
});
});
</script>
Image
from js-objectdetect.
This weekend I added the possibility to specify a ROI / selection using the jQuery plugin:
$("#face").objectdetect("all", {classifier: objectdetect.frontalface}, function(faces) {
for (var i = 0; i < faces.length; ++i) {
$(this).highlight(faces[i], "red");
$(this).objectdetect("all", {classifier: objectdetect.eye, selection: faces[i]}, function(eyes) {
for (var j = 0; j < eyes.length; ++j) {
$(this).highlight(eyes[j], "blue");
}
});
}
});
For a complete example, have a look at https://github.com/mtschirs/js-objectdetect/blob/master/examples/example_image.htm
from js-objectdetect.
impressive, but fails on chrome and firefox, tested on opera works well
from js-objectdetect.
sorry, fails only on chrome due to a dom security issue
tested on fx and opera 12 works
from js-objectdetect.
When running the examples from your local system and not via webserver, Chrome needs to be started with the --allow-file-access-from-files flag. Or try http://mtschirs.github.com/js-objectdetect/examples/example_image.htm instead.
from js-objectdetect.
Does this code for ROI/selection by mtschris works on video?
from js-objectdetect.
I dont see why not, it works on a canvas after all
On Sat, 2013-03-23 at 02:22 -0700, samjones wrote:
Does this code for ROI/selection by mtschris works on video?
—
Reply to this email directly or view it on GitHub.
from js-objectdetect.
It can be done, but not yet with the jQuery plugin. I think that adding an option called "selection" that allows to restrict the search window might be the answer to your question.
Is there any such option of providing 'selection' in js (without jquery)?
Also I can't find any reference to the functions used in example, any links on that will be very helpful.
from js-objectdetect.
Related Issues (20)
- Objectdetect not working at all
- Custom classifier not working. HOT 1
- License HOT 1
- objectdetect.mouth.js HOT 1
- neck detection HOT 1
- not working after custom style change HOT 1
- False positives HOT 1
- Face detection with Pre-recorded video stream HOT 1
- Measuring activity using js-objectdetect
- Mouth/smile detector not working? HOT 8
- hand gesture sdk HOT 2
- noise detections > real detections HOT 12
- hand detection - with rotated hand HOT 4
- [Enhancement] Add package.json
- Mismatch between gh-pages & master files
- Create a new classifier HOT 2
- Consider adding library size to performance comparison
- No Documentation of JSDoc found HOT 1
- Tracking slow in FireFox only
- WebRTC not available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-objectdetect.