Random Image loader from folder every x seconds
hello,
i am new here and returning to max after a few years break, so everything is a little new now and getting slowly back into it.
i am preparing an installation for this saturday and having some questions.
outline of the project:
1. take automatically pictures of faces from a camera, save them with ascending filenumber to a folder.
done in vvvv, all good and working!
2. in max, randomly take 1 images from that folder every x seconds, (maybe 30 or so),analyze it for where the eyes and mouth are, then warp it to a demo-face size, then run through a few effects and map them on a real oversized face already built.
an extra would be, to split them horizontally in 4 parts forehead/eyes/nose/mouth, so you could combine different eyes with mouths and so on.
any help to where to get started would be very much appreciated.
specially on the first part, how to check this folder every time a new file gets added and then how to randomly pick 4 images out of that folder.
thx a lot
for the analysis, you want to use the cv.jit package, probably cv.jit.faces. searching the forum will yield plenty of info on these.
for folder query, hook a qmetro up to a folder object, and the right output to a change object. whenever the count changes, you know a new file was added, and you also know how many files are there, and if you've named them sequentially you know what the most recent file is. use that count to randomly generate some numbers, and use the folder output to select those files, sending them to a jit.matrix or jit.movie for display.
hi,
got at least the last part with the random generation done, but whatever i use, be it jit.matrix or jit.movie, i am not getting any images displayed.
here the patch so far:
how do i generate the 5 images, so basically the last one and the four randomly generated ones?
thx a lot
ok,
kinda figured that part out like this:
maybe there is a better way, but so far happy, now i would like to analyze each picture for positioning of eyes, mouth etc, to be able to compose them over each other, but only the respective part like eyes on eyes and so on, any ideas?
thx