zden / face.haluska.sk

Geometric Photo Filter
14 stars 2 forks source link

request: optionally displayed "lines drawn" counter #2

Open stewie opened 10 years ago

stewie commented 10 years ago

suggesting "optional" b/c I realize that accessing the DOM to update the counter element is a relatively costly (slow) operation.

Counter var would increment continually, but element displaying "lines drawn: ____" would remain hidden (and empty) until user click button requesting count display. Another click would hide the counter element, and updating its innerHTML would be suspended.

The "future" blurb on the page states that you are interested in developing a "playback" feature for the app. With this request, I'm pointing out that playback begs (in addition to source image plus drawing parameters) a record of "how long the drawing operations progressed" in terms of number of lines drawn. Working with various images, I've noticed a "diminishing returns" effect ~~ earlier lines drawn wind up being overdrawn. Once the drawing details are fairly well filled in, changes resulting from continued drawing are barely noticeable. (In fact, without zooming, it becomes difficult to gauge whether drawing is still underway, or has stalled/completed.)

I can envision several "neato" scenarios which would be possible if controlled playback could be achieved. (um, semi-controlled. A degree of randomness exists in the generative drawing.) A game / contest might have players competing to identify "what IS it? What's portrayed in the image?" -- timed trials and high scores... or collaborative real-time chatting and guessing while the image progresses. Also, given a base set of images, it might be interesting to study (age-based and other demographic factors) which protoimages are more easily (quickly) recognizeable.

As a related request/suggestion: The "Save Image" command could generate an output filename based on concatenated "sourceimagename_" + counter + "lines.png"

zden commented 10 years ago

Of course, 'save script' operation would store parameters and how many steps these parameters were used. It would be sort of simple 'timeline script'. But I was not planning to store how many lines were drawn in each step. That would work automatic I guess. I would offer ability to set the same random seed for each frame so when applied on several video-footage images the same sequence of random pixels would be 'fired' to the algo so images would not "shake" much. Please look at this video which was created with this filter ( https://www.youtube.com/watch?v=z7kajB5pM_s ). If you feel like collaborating on psychological studies game or something less serious, we can discuss that. How did you mean it with line count? In replay script mode, script whould hold the ending step. User could choose also less steps. But not generally counting number of used lines/rectangles/triangles/circles... But I plan also to use this filter in sort of 'vector video format' so then I'll save exact coordinates for each geometric element. But that is somehow a different story.

stewie commented 10 years ago

The visual effect created in the video you linked to reminded me of http://mattdesl.github.io/impressionist/app/

Video post-production is a wonderful usage of you application, but I'm simply interested in the still image generative drawing and oekaki-like playback potential.

The counter feature(s) you've described, in the context of achieving automated playback... whoosh, accomplishing that would probably be well beyond my grasp. Discussing this has led me to realize that I was mixing apples and cats ~~ on one hand, wanting to recreate repeatable playback from a given seed... but, on the other hand, wanting to grant the user freedom to alter/tinker with the controls during each playback run.

For the counter, I achieved my simplistic goal by creating a span element to display the count, and incrementing the counter {plus updating the innerHTML of the span} from within animate_paint(). Within the if(painting_restart...) conditional, I added a line to reset my counter to zero. Also, needed to track the state of the pause/play toggle. Now, each time I perform a screen capture, the parameters in effect as well as a count of "how long I allowed it to progress" are evident. (I do mean "screen" capture, including the UI, vs just exporting the canvas pixel data).

zden commented 10 years ago

Stewie I have seen /impressionist/app and as well I like works of Sergio Albiac, sure all those things you have seen in life alter your ideas and lead you to some experiments like this one.

If there is such demand for 'counter' I'll add it. I felt as well to have it there. But then UI in this app needs some redesign, some sort of "Advanced" options. Also 'perform N steps only' would be nice. So the play/paint process will be stopped after N-steps automatically. That would also be automatic for 'script replay' as script would hold that information.

Did you try gif-maker as well, when you talk about screen capture?