Commit 8c52c034 authored by Michael Murtaugh's avatar Michael Murtaugh

initial thinking, cc cleanup

parent 22b9b307
......@@ -9,3 +9,21 @@ machines/install
* 10.9.8.3: archive.html (previously search.html)
* 10.9.8.2: collage.html
Generalised Features
------------------------
* settings ...
{ 'features': [
[
{'name': 'faces', 'cascade': 'haarcascade_frontalface_default.xml', 'color': '255,255,0', 'width': 2},
{'name': 'eyes', 'cascade': haarcascade_frontalface_default.xml', 'color': '255,255,0', 'width': 2}
],
{'name': 'bodies', 'cascade': haarcascade_frontalface_default.xml', 'color': '255,255,0', 'width': 2}
]
}
* scripts/getfaces => getfeatures
* collect all feature groups (in hierarchy)
* cascadecollage.js
facecount => featurecount
process_frame & draw_faces
* archive: generalize to iterators for all named feature groups
* scripts/waitforface => waitforfeature
......@@ -354,33 +354,6 @@ function cascadecollage (opts) {
}, onend);
/*
function next () {
if (order.length == 0) {
return;
}
var o = order.shift(),
f;
if (o.feature == "face") {
f = archive.next_face();
collage_faces.push(f);
} else {
f = archive.next_eye();
collage_eyes.push(f);
}
console.log("MATCH", o, "to", f);
// record / draw archive frame with feature box
var output = "frames/archive"+zeropad(archive_frames.length, 4)+".jpg";
mkarchiveframe(f.path, f.rect, f.feature == "face" ? "blue" : "green", output, function () {
archive_frames.push(output);
setTimeout(next, opts.collage_match_time);
if (opts.archiveframe) {
opts.archiveframe.call(that, output, o, f);
}
});
}
next();
*/
}
},
......@@ -515,29 +488,6 @@ function cascadecollage (opts) {
return n;
}
/*
function mkgif (paths, output, delay, reverse, onend) {
// convert -loop 0 -delay 500 output/archive* archive.gif
var args = ["-loop", "0", "-delay", delay],
cmd;
paths.forEach(function (x) { args.push(x) });
if (reverse) {
for (var i=paths.length-2; i>=0; i--) {
args.push(paths[i]);
}
}
args.push(output);
cmd = spawn("convert", args);
// cmd.stderr.setEncoding("utf8");
cmd.on("close", function (code) {
console.log("mkgif (convert) returned", code);
// if (code == 0)
onend.call(this);
})
}
*/
function mkwebm (paths, output, framerate, reverse, onend) {
// convert -loop 0 -delay 500 output/archive* archive.gif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment