For me, the kernel idea stems from following a contour. See Blur by Color, a yet-to-be-reconstituted tutorial. Scroll down to " 4. Following Contours".
Rough outline of an idea. Start with a simple line drawing:
Goal: a field of specific impulses (2 channel image). Each impulse encodes the sine and cosine of an orientation angle. Harness this to orient a tile sprite (a chip in the overall mosaic).
Derive this orientation from -structuretensors which detects edges and calculates orientations. Something like:
This carries the rough idea through a field of impulses encoding orientation angles that align with edges originally found by -structuretensors. Sorry: don’t have the bit on rendering tiles. `Tis a working day and meetings are coming up. Binning this field-of-impulses image out into 5 degree increments for fifteen separate binary [0,1] impulse image channels, then, for each, convolving over the impulses with a suitably rotated tile texture, then summing or otherwise blending the fifteen channel images into the output is the follow-up outline. -structuretensors tends to make colorwheel like structures; the centers of these colorwheels are points where tiling can be awkward. A mosaic artist would probably drop a chip over the point and call it a day.
It’s hard to beat di Blasi’s java app for rendering these. I managed to come close with G’MIC as you know, Diego, but still I’ll admit I like di Blasi’s Java app output more. Someone re-compiled to allow higher rez for me and I shared that compile jar file (guy deleted his profile and I have no way to attribute him doing this for me, unfortunately) at link below.
Sylvie, I suppose you ran the ‘Yobeatz/mosaic’ python as standalone (it’s Python3).
Do you think it’s possible to derive from that a Gimp Python filter?
(Gimp I guess is still using 2.7).
Thanks, but are you saying that it could be called from inside a gimp plug-in written in python? (just to be more specific: with something similar to a call of another plug-in?)
<offtopic warning>
Hand drawn. Inspired by 3Blue1Brown’s But what is a Fourier Series? The trick to the game is to make a line drawing, but not lift the pencil from start to end - and not cross the path. Transform that single curve line drawing to its spectral equivalent, where each spectral point furnishes the size and initial angular position of a wheel, and whether the wheel rotates clockwise or counterclockwise. Except for the root, on the origin, the center of each wheel coincides with the end of the single radial spoke of the parent. Each wheel of the so-constituted wheels-within-wheels mechanism rotates at some integral multiple frequency of the root, that multiple coinciding with the wheel’s spectral coordinate. Clockwise or counterclockwise stems from whether the spectral point coordinate is above or below the Nyquist frequency. So positioned, the wheels-within-wheels ‘mechanism’ also draws the contiguous line when it is set in motion - the last wheel has a pen attached, rather than another wheel.
It is a lot of silly fun, draws the connection (literally) between the temporal and spectral domains - and was rendered with Python - not G’MIC
</offtopicwarning>
Think I’m free for the rest of the day. Maybe I can finish the thought on this mosaic tiling game…
A G’MIC implementation; lighting/shading model borrowed from Fingerpaint. Need to give some thought to keeping tile aspect ratio more-or-less constant. Annotated code to go to Tutorial Fragments, but not tonight (Sunday evening, N. American East Coast). Time to walk the puppy.
Thank you for the reminder, Sylvie. I frequently overlook Various →Custom Code backdoor in the QT plugin.
Always fun to see how other people approach a visualization, such as tiling and how your samj_Mosaic_A plays its game. It is a curious pleasure, considering that we both started from bits of ceramics plastered to walls, seeing the two approaches. You don’t think like me - and that, I think, is a very good thing. Such is the way to a colorful world.
gtutor_tileit has taken another turn - the last until I do the tutorial on it. Have fun.
Would you Sylvie try to create a “Testing” filter utilizing the last Gary’s development of tileit which seems to work on the colours of the source image?
It would be nice… (you did an interesting “Various” user flow with the previous version, which worked on a B/W source and created a green/blue outcome)