If so, they don’t require user input at all. Should they belong to the argument list?
2. It would be great if we could get a rgb2pca and pca2rgb, though I don’t know if that is meaningful or useful. If anything, it would be an educational demonstration on how to get to and back from 3 PCA components.
3. I guess the input for PCA manipulation isn’t limited to RGB. It could be any number of channels, right? Does the number of input channels correspond to the number of PCA components we get? Or could we decompose the input image to any number of components, sort of like split_details?
Apologies for asking so many questions, especially when many of you are busy people. I hope I don’t tempt you away from your important work.
The nice thing of the G’MIC “Mixer [PCA]” filter is that you also can shift and rotate (the color distribution) in 3 directions. That isn’t possible with the imageJ plugin.
This G’MIC mixer is useful in images that have a narrow color distribution, like faded images or images with color cast. With help from the PCA you now have the right directions within the color distribution to work with. So now, I don’t have to think about RGB or AB, that’s extreme helpful for lazy people like me . In this PCA directions now you can shift in case of color cast (second slider) and widen the color distribution (first slider) to have more color-contrast between the opposites of the PCA direction. With the third slider you can rotate the color distribution around one of the PCA “axes”. The other two PCA opposites will rotate, not the colors on the axis. Therefore it seems a little bit strange, but with this in mind, it is more easy to work with.
You can also use this mixer to make the color distribution smaller (with first slider). Then there will be less color contrast within the PCA axis . You can also shift with second slider to color grade your image.
I hope this information is useful. If it is wrong on some places, other people here can correct my information.
@garagecoder, just to thank you again for your wonderful noise_poissondisk command. That’s my new favorite weapon in my arsenal. I use it all the time, it’s so convenient to get a random spatial sampling uniformly distributed like this !
I was thinking of a different method entirely which involves splitting the channels but this might work. The Matlab code does seem a little tricky for me to understand though. I can sort out the if and for stuff just fine but I’m unfamiliar with matrices in G’MIC. map looks like it’s initially a two-dimensional matrix of zeros and I have no idea how it works. The stuff in the if structure is also difficult for me to understand. I also have no idea how vectorN works.
Mind you, I’ve found an extension of Cubehelix which allows for interpolation between any two different colours. It’s quickly becoming something that I don’t think that I can do because of how much technical stuff it requires.
@bazza me encataria hablar contigo, veo tus trabajos y es muy interesante lo que haces. he intentado entender un poco como crear la diferencia entre los gsec para crear el gpos. Cualquier ayuda o tip seria muy util para mi. muchisimas gracias de antemano.
parece que lo genera usando algun tipo representación de un “flow” es como una transformación de una imagen a la otra. logre crear una versión usando deepmatch y deepflow no es igual, pero da buen resultado, pense que gmic podria hacer algo así.
Following up with my exploration of gradient_normhere and here…
As I am having fun with G’MIC, I have been noticing that the appearance of gradient_norm heavily depends on the size (and contents) of the image.
This is a problem because what works for a small image won’t work for a large one. E.g., when I apply the same command to PlayRaw images, it doesn’t work because I have been playing with G’MIC sample images, which tend to be much smaller and more idealized.
One approach might be to resize the image. Take sample flower for example. The difference between #1 and #2 is that I doubled the size of #2 before applying gradient_norm and shrinking it back to size. (Actually, #1 vs #2 of flower might not be the best example; it still looks okay.)
With this strategy, I am able to thin the outline. So, I now know that I can manipulate the width of the outline by doing this. However, the details and intensities change resulting a different effect on the image, and this would compound as you chain more commands.
Hmm, I am attempting to understand how G’MIC can create pattern, and it is my understanding that patterns can be defined by x-pixel, and y-pixel as well as width, and height. I am attempting to generate this pattern - https://forums.getpaint.net/topic/3691-vibrato-ymd080223/?_fromLogin=1 , but however, user-defined function is not getting me the answer I need. I am using user-defined function in order to understand how that works first.
However, I did found a cool idea, but it would require symmetrizing and the smooth modulo operation I just implemented for Krita.
Leaving this here for future reference : (x - y)/i * (x - i)/i * (x + i)/i * (y - i)/i * (y + i)/i
EDIT: I realize I could use solidify filter approach instead to recreate vibrato. I think a lot of effect from the paint.net forum can be recreated with the help of solidify feature. I think I might create a thread just for that task.
Also, I really could use a way to assume the center of the image is 0 in G’MIC user-defined. Wow, this is hard, but learning…
K3DSurf to G’MIC
that means, for x is replaced by (x-w/2)/w, and y is replaced by (y-h/2)/h
And to get to -pi, pi coordinate for G’MIC, the end equation is:
cos(((x-w/2)/w) * pi * 2 * ((y-h/2)/h) * pi * 2)
Are there two questions here? It’s a little hard for me to decipher what you’re asking at the beginning!
The question about input coordinates - if I had to convert some formula based on -1 to 1 domain, I would probably define another variable or vector first and work with that to simplify readability, e.g.
f "X=(x/w-.5)*2; Y=(y/h-.5)*2; cos(X*Y)"
Just to restate what you probably already know: g’mic coords in a fill use 0 <= x < w, so quite often you need to convert to -1 to 1 or 0 to 1.