[stdlib-371] New command unitnorm computes the pointwise Lp-norm in selected images.
Others:
[web-371] Added a new code sample “Rotating Diffusion-Limited Aggregation”, in the Gallery section of the G’MIC website.
[emacs-371] Created a gmic-mode.el file, that defines a G’MIC mode for Emacs : Automatic indentation and syntax coloring for G’MIC scripts.
Improvements / Modifications
Core functionalities:
[math-core-371] New pre-defined variables _0 and _1 which are vectors whose dimension is equal to the number of channels of the associated image, and whose values are all 0 or 1.
[math-core-371] Optimization of vector initializers, with smaller generated opcodes.
Bug fix:
[core-372] Fix UB in G’MIC interpreter, caused by trying to unlock a mutex that has not been locked before.
[core-371] Fix line drawing algorithm bug happening when specified line coordinates are very large (out-of-image), but a when portion of the line should be drawn anyway in the image.
[math-core-371] Variable $% were returning NaN in a single-iteration loop, when accessed through the math parser. Now returns 0 .
[math-core-371] Variable $var were returning 0 instead of NaN if $var was as a string rather than a number.
[math-core-371] Fix bug in SVD computation that was computing wrong singular values in some cases. That was affecting the functions svd() and eig().
(It’s equivalent to : $ gmic sp colorful 100%,100% eval.. "max(I>128)?++i(#-1,x,y,0,0); I" , but null costs nothing, while I takes one operation per pixel).
Yes, it would make sense.
What I do sometimes, to avoid putting I; at the end of the fill or eval expression, is add a begin(ret = vectors()) section at the beginning of the expression, then use ret as the very last item of the expression.
But null will simplify this.
@Reptorian , finally there are some changes concerning null.
It is replaced by _0 , which is a vector of 0 , having the size of the spectrum of the associated image. I’ve also added _1, that is the same but with 1s instead of 0s.
Haven’t tested much, but had to try the Marker preset, David and it works great. With a bit of Convolution stuff to bring some of the details back, the below is a result. Much improved over my actual capture. lol
Great job, Lyle!
Honestly, this filter is really becoming my favorite at the moment. It ultimately has relatively few parameters to adjust compared to the wide range of results it can produce.
From an algorithmic point of view, I find that truly remarkable
Yes, only a few hours after 3.7.1 was released, but I spotted an undefined behavior in the interpreter code, and I really wanted to fix this before any problems arose!
Really sorry about that.
I can’t keep this question out of my head, but do you think 0x$copies can be done in parallel? I think this would be a good idea to improve execution time code that use dictionary structure. Like imagine it can be done in parallel, and instead of low values, you can create 100000+ 0x0x0x0 without it being a bottle neck.