Perl: the Markov chain saw | |
PerlMonks |
Re^2: Cannot Set Image Pixel to a Random Colour using GDby ozboomer (Friar) |
on Dec 25, 2022 at 10:35 UTC ( [id://11149079]=note: print w/replies, xml ) | Need Help?? |
As I said, I'm admittedly pretty vague on GD... so I was just having a go with the tools I know about. Convert::Color was something I'd not come across in my explorations... so that's been added to the toolkit. I'm pretty new at manipulating graphics (beyond simply getting size information and calling ffmpeg and similar CLI tools from within my code)... so I'm feeling my way a lot.. Further down the track, I'm trying to see if I can automatically 'tidy-up' some 100s (or 1000s) of smaller images so they all 'look' the same.. without going to the hassle of trying to learn about 'computer vision', OpenCV and such unless I really have to... particularly when I can conceive of a simpler way, even if it's slower or 'inelegant'(!). I've modified the suggested code a bit so it works on my system (and I can understand it a bit more easily):-
Initially, I'm thinking about looking at (relative) luminance as a measure that I can try and match between images... so this code is only a step in the whole process.
In Section
Seekers of Perl Wisdom
|
|