irotopo
Ex Member
Re: save and display frame from webcam
Reply #2 - Nov 11th , 2007, 12:40pm
thanks fjen !! this is very clever! i will explain better my situation (because i did't do it well), perhaps i can get a bit more help.. complete description: there is a pc monitor with a webcam ("running constantly"), when you approach to it a sensor will detect you presence and activate a "saveframe" to capture a jpg image of your face, then your photo will be display fullscreen in the monitor, then an animation to reduce the photo and place it in the bottom of the screen... photos will be acumulating in a reticular array. I have different parts of the script: - the one from jmyron to "run" the webcam - the "saveframe" actions to save a jpg image in to the sketch folder. This is now provitionally activated with the click of the mouse (i expect to do it with a sensor signal from "arduino"). - the "loadimage" actions to load and display the image in the screen. - the animation and placement of the image my problem is their "asemblage in one script". specific problem: to work with jmyron the webcam is displayied in size(320,240), I can save the frame (no problem), but then to load it down and display it (full screen) it's probably needed to stop the webcam, setup again the window (in full screen size).. ? (i think that the constant "running" of the webcam is not leting me to make the rest). diagram: running webcam - sensor or mouse signal - save frame - stop web cam - setup, load and display image - animation and placement of image. conclution: i don't know how to stop the web cam, make the rest and restart again the web cam. notes: I don't actually need to see the webcam live display, I would rather have a full screen window showing the arrenge of photos. (the display of the photo full screen and then it's placement and acumulation). sorry for this long explanation, i asume that forums ara not ment to be use this way, but I am lost. probably there is a easiest way to do it, I have read this in other discution: "I think your solution might be to copy the webcam input to a image castmember and display that on screen while constantly refreshing. At the moment you want to capture the webcam visual, stop refreshing and copy the image castmember to a new castmember. In this way you will always have the image on screen directly, while still be able to keep on viewing the webcam input after capturing. " that sounds grate but I don undertand quite well what is a "castmember" and how to use it. thanks !!!!