Alternative interpolate method for smooth pixelation ?

Alexandre's icon

Hi,
I need to put a 2D float32 matrix of poor resolution, let's say 32*50, into a high resolution float32 matrix, using interpolation like in the picture attached below. (made with the jitter tutorial n°14)

...but i'd like to have more options over the interpolation : here the interpolation curve seem to be linear, i'd like smoother interpolation, even perhaps controling its curve, how could i do this simply ?

thanks,

263.Image_10.png
png
Joshua Kit Clayton's icon

The gaussian blurs on the GPU may be of interest to you. You can have a smaller input texture and larger output texture by using jit.gl.slab @dimscale or manually set the slab dimensions with @adapt 0.

Alexandre's icon

hm.. I might not be that much experienced with jitter, i think i missed something, what i get using jit.gl.slab looks like a linear interpolation too, see picture below. where am i wrong ?

Maybe there is a simple way to use jit.expr to do this ?

thanks,

265.Image_14.png
png
Joshua Kit Clayton's icon

Check out jit.gl.slab.gauss6x-example.maxpat as a starting point. Then consider smaller input to output dimensions, and using fewer blur operations. This should get you started. Sorry don't have time to make a specific example for using this for resizing. Maybe later this week.

Alexandre's icon

thanks, this sounds interesting !
i'm looking at it...