help: Can I get the binarized edges?

Ah yes, I forgot about this one!
I’m pretty sure that by not using shapeaverage but something more clever (finding predominant color as I’ve done in one of my previous try), this should work even better.
I’ll give a try today hopefully.

Yes, I think so.

Perhaps for @makkkraid and others, the solution can be deployed as an updated G’MIC-qt Vector Paint filter with an extra ‘preserve colors’ tick-box or some such, one to switch between the off-the-shelf shapeaverage blend mode and the color managing custom blend mode.

On the other hand, perhaps the custom blend mode can accommodate all current use cases as well, making the switch unnecessary. Vector Paint has a lovely, minimalist UI.

You won’t see me much in this play-pen for the next few days. Life calls. I’ve enjoyed reading the code developments and evolution, particularly @Reptorian 's. There’s raw tutorial stuff here.

I’m really afraid I can’t understand the technical replies.

the only thing what I can do is just reporting.
@Reptorian 's new Color Region filter is worked my actual texture example.

Thank you all wise men.

2 Likes

Looks like I managed to pull it off:

Left: Input.png
Middle: Without Stray Threshold
Right: With Stray Threshold

Artifact remains though that’s up to the user to manually fix it. Two iterations in two different layers with different mask will do that job. The second parameter I added determines which stray pixels gets indexed, so areas with thickness of 1 will be used to pixel another color in the surrounding region.

Time for me to push the change. Pushed. Final thing to do is to have users to have to option reduce reference image size for analysis of dominant color.

Edit: There’s still probably a way to remove some detection of stray pixels to further reduce artifacts with stray threshold.

EDIT:

Finally, I have solved it!

image

Erm, stray pixel removal seem to have issues on the example image provided by @makkkraid. I don’t know how to deal with that, but the idea of using a smaller image to create palette colors as a option might help solve this issue. Works on my gradient blob and davidblob cases.

EDIT:

By reducing the number of adjacent found color, I was able to make the example image provided by mentioned user work really well.

2 Likes

Have not read all the threads, so if someone already mentioned this, then my apologies, but if you just downsize your original then upsize with no smoothing (interpolation, disabled) you can get quite steppy results. Simple and effective. :slight_smile:

You lose a lot of precision that way. The point is to simplify images that are somewhat simple into the most basic level with minimal details loss. I do think there may be a iterative technique to build from that.

Yea; just tried that, Reptorian. Got some alright results using ministick without relief and also quantized color reduction but both those methods also introduced artifacting. Will have to think harder on this one, but looks like you got some good results, Reptorian. :slight_smile:

As a side, this is best I could do with quantized color reduction on top layer set to value. :slight_smile:

quantize

Also, GIMP use to have max color preset but looks like this was removed for whatever reason. I believe with max color, you can get rid of the transitional colors. We may never know. :slight_smile:

edit:

Surprisingly, Bilateral Smoothing gave a pretty good result. :slight_smile:

bilat

Another step done : I’ve added a new blending mode shapeprevalent in command blend that replaces each region of the blending layer by the most frequent color of the corresponding regions of the input image.

Will try to use this in cunjunction with fx_vector_painting later, to see what happens :slight_smile:

3 Likes

David, if it doesn’t work out, maybe look into my own algorithm at gmic-community and try to understand how it works? It does have the big issue of being slow and occasional image edge bug.

@David_Tschumperle
Thank you for the creation of the ‘shapeprevalent’ mode :o)


Here a test that uses this mode with the ‘foo’ function.

1 Like

@David_Tschumperle This new blend looks interesting indeed.
BTW, is there a page in the documentation which describes all the blend modes?

Should be here, https://gmic.eu/reference/list_of_commands.html#blending_and_fading, but @David_Tschumperle blend has two entries and doesn’t have a description currently. :thinking:

PS. I think a model documentation for blend modes is GIMP’s. https://docs.gimp.org/en/gimp-concepts-layer-modes.html If someone could write with that clarity, that would be great. :wink:

There’s also Krita Blending Mode. Some of which G’MIC has, but is missing from GIMP. - Blending Modes — Krita Manual 5.0.0 documentation

@afre @Reptorian

Yes, i’ve seen these pages already but never asked before.
Also, i never thought of looking at Gimp or Krita documentations to find info about G’mic. That’s some detective work hehe.
Thanks, i’ll take a look. Let’s close the off-topic section :wink:

Fixed, thanks for reporting this.

Yes. Last thing: Do note that blend algorithms may differ from app to app. If you are intrigued, read @Reptorian’s old messages on blending, or create a new thread to discuss it further.

On this, I fixed the image edge bug. So, I’ll just submit my solution as done. Can’t wait for David’s solution.

To have fun the same exercise using ‘shapeprevalent’ and finishing with ‘rep_color_region’ (which is very, very slow) :smiley: