You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the title/subheading «Step 2: Choose what you want to play with», this code is supposed to «request your camera and track magenta, cyan and yellow colors that appear in front of it.»
However, nothing happens when I load this page in Firefox or Chrome.
Anyone?
Code:
<!doctype html>
<title>tracking.js - first tracking</title>
<script src="../build/tracking-min.js"></script>
<script>
var colors = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);
colors.on('track', function(event) {
if (event.data.length === 0) {
// No colors were detected in this frame.
} else {
event.data.forEach(function(rect) {
console.log(rect.x, rect.y, rect.height, rect.width, rect.color);
});
}
});
tracking.track('#myVideo', colors);
</script>
The text was updated successfully, but these errors were encountered:
@yegdynrs Thank you for your guide.However ,though I have change tracking.js with your advice ,things doesn't become better.The camera still can't work and the page of the first example is blank. I wonder if there anything that i need to do to solve the problem. Looking forward to your reply.
Under the title/subheading «Step 2: Choose what you want to play with», this code is supposed to «request your camera and track magenta, cyan and yellow colors that appear in front of it.»
However, nothing happens when I load this page in Firefox or Chrome.
Anyone?
Code:
<title>tracking.js - first tracking</title> <script src="../build/tracking-min.js"></script> <script> var colors = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);<!doctype html>
colors.on('track', function(event) {
if (event.data.length === 0) {
// No colors were detected in this frame.
} else {
event.data.forEach(function(rect) {
console.log(rect.x, rect.y, rect.height, rect.width, rect.color);
});
}
});
tracking.track('#myVideo', colors);
</script>
The text was updated successfully, but these errors were encountered: