Hey Aienn hows it goin!?

To be honest I don't think this is doable without some custom patches. Loading the images into a structure is quite easy (http://himiko.dnsalias.net/twiki/bin/view/Main/QuartzComposer#Reading_Images_from_a_directory ), and so is getting the average picture brightness (simple way is to resize to 1x1 and read the pixel value), but the problems I see are: - you cant save XML or text files. So either use a custom patch, or send the output as OSC to something else and that saves the data - so this one is not a deal breaker. - JS patches cannot read pixel info, or resize images. So to resize all the images, and read the pixel data, you would need to use the iterator patch, but this cannot send information outside of itself (back to the main branch). So you would need a custom patch which reads a struct of images and returns a struct of brightnesses which you can then pass onto JS for sorting. But if you're going to write that much as a custom patch, you might as well do the sorting there as well!

Maybe there are workarounds these problems I mention, but I personally think this task would be done much easier in something like processing.org...


Memo (Mehmet S. Akten)

www.memo.tv

[EMAIL PROTECTED]
+44 (0) 7958 783 832
+44 (0) 20 8123 9986

29 Ironworks
Dace Rd
London E3 2NX, UK


On 3 Aug 2008, at 10:10, aienn wrote:

hello fellow listers,
a friend of mine (who is quite far from QC business) asked me how to sort an arbitrary amount of still shots (say, a folderful of hundred .jpegs) based on how bright the actual image is, ascending or descending from the darkest picture to the brightest one

I guess this could be done in QC, and quite fast. now, I'm not a novice in QC but not an expert either, so if some of you QC gurus have a few minutes to give me a conceptual advice, I think I'll be able to hack together such a composition very quickly

I guess first of all I download all the images in a folder into structure, then I traverse the structure elements and average out L value of every image (but exactly would I like to average out a picture's L value? any hints towards exact patch names in QC?), then I make a fairly basic JS sorting algorhythm and then yet again I'm at a loss how do I output a sorted structure to disk (some, ugh, XML or text file?)

your advice would be appreciated!

a.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/memo%40memo.tv

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to