I’m getting into creating lightshows. This would be very helpful to me
I would like to scan for ONE color in a photo and
have its pixel LOCATIONS listed in a PARTICULAR way. Three words given emphasis; these are the main aspects—it seems easy on the surface, but it gets really tricky for me to explain. Please excuse how it’s a little fragmented at times. I have done my best and really-really will appreciate the how-to for this. I would be willing to pay a fee for someone to guide me through this, but I thought it might be easier than I think, and so here I am. Thank you!!!
Now, how I’d want this to be and how I think it might be processed…:
-
Import photo.
[I just downloaded Python; I don’t even know how to do that yet!]
Will this photo need to be in a specific folder? grr, sorry, I’m a baby lol. -
Add color wanted to be scanned. HTML Notation, eg. ecff16.
-
Given the Y-axis rows and X-axis columns of pixels, a number can be
associated with each row and column; the output of one location of a pixel, for example, may then be output as “Y32/X10”.
It may not be necessary to include the Y and X, but I would like to have it an option.
The output being “Y32/X10” or simply “32/10”. -
Now for the scanning pattern and output format (tricky to explain).
I would like to set a scanning pattern.
This pattern will always be the same, so maybe established once and called upon
when needed?
The pattern is Zig-Zag…:
A. Always start the scan with Y1/X1 pixel.
B. Scan DOWN Column X1 to its last pixel.
The output will read the matches in the order found, such as:
“Y3/X1,Y6/X1,Y23/X1,Y45/X1,end”
(Note numbers in succession, 3, 6, 23, 45, yep)
—Important to have each Column read as one line.
—Important to have commas between.
—Important to be able to assign a word or phrase to appear at the end of each line.
C. The scan will proceed from the BOTTOM of X2 and scan UP
to the very TOP pixel of X2 Column. A new line created for X2. So far,
we have this:
Y3/X1,Y6/X1,Y23/X1,Y45/X1,end
Y44/X2,Y35/X2,Y22/X2,Y12/X2,Y3/X2,end
D. The scan then proceeds with the TOP pixel of X3, scanning DOWN,
proceeding as from the very start; hence the Zig-Zag pattern.
Y3/X1,Y6/X1,Y23/X1,Y45/X1,end
Y44/X2,Y35/X2,Y22/X2,Y12/X2,Y3/X2,end
Y5/X3,Y8/X3,Y34/X3,Y44/X3,end
…so on, to the very last pixel, which may be at the TOP or BOTTOM,
depending on if the number of Columns is even or odd.
And that’s it
I thought a “Batch” process might be possible, which might be
very useful; requiring a few extra Commands.
A. Enter a LIST of colors, such as:
“ecff16, 51496a, 496a4b” so on, would not be so many at a time.
B. Somehow have the output read which color each output list refers to;
maybe at the top, then a line space, such as:
"ecff16
Y3/X1,Y6/X1,Y23/X1,Y45/X1,end
Y44/X2,Y35/X2,Y22/X2,Y12/X2,Y3/X2,end
…
51496a
Y6/X1,Y24/X1,Y52/X1,Y65/X1,end
Y56/X2,Y43/X2,Y20/X2,Y13/X2,Y4/X2,end
…
so on
The program will start from the first color, scan, proceed to the next, scan, then to the next, in order, successively, automatically, like magic
C. The resulting lists can be exported into a txt file? hmmm
Now that’s just being greedy! haha
And THAT would be totally IT!
At this point, I notice many peripheral packages that I may need to import. I’m just getting familiar, but ready for work! I will read every single word here offered; I will do my best to piece it all together to the whole. Thank you so so much for any guidance.