Forums > Jitter

high quality matrix scaling?

April 22, 2014 | 10:48 am

hi,
i’m wondering what is the visually highest quality way to scale an incoming video from 1920×1080 to 1280×720 px (at about 25fps).

as far as i know (and from what i see) jit.qt.grab and matrix to matrix conversion only use linear scaling which results in a rather bad quality, even if interpolation is switched on.
in my search i stumbled as well over jit.resamp, jit.mxform2d and jit.rota and i wonder: would any of these perform better (with what setting)?

last remark: in this case i would prefer this to happen on the cpu (not gpu) since after scaling down i am writing the video to a harddrive so in case of gpu-resampling i’d need to readback…

any help is appreciated a lot!
k

  • This topic was modified 4 months by  karl krach.

April 23, 2014 | 2:47 am

have you tryed [cv.jit.resize] ?

the helpfile says:
This object uses bicubic interpolation to resize a matrix. This will yield more accurate smaller matrices than simply using jit.matrix

best,
yonfell


April 23, 2014 | 2:37 pm

hey,
thanks for your input!
i just tested cv.jit.resize but actually it does not do much better then the native interp-flag…
i mean, i test this against the resizing capabilities of photoshop which is definitely not fair but still…
are there any other options?

if anyone should be interested, my test patch is attached, the test footage i used i uploaded to here (save to same location as patch):

https://sslsites.de/go.bildsignal.de/xchange/max-graphicsquality.zip

best
k

– Pasted Max Patch, click to expand. –

April 24, 2014 | 4:54 am

mhm.
i now tried with a gpu-rescaler (including readback), the visual quality of the scaling is really nice, see patch below.

i build this on the basis of "jit.gl.render-tomatrix.maxpat" but frankly speaking i did not really understand everything going on in there… can this still be tweaked for better performance?
because it works nicely when run like in the patch below but if i integrate this into (my much larger) main patch, the performance drops steeply…

or, is there any altogether different option to get this visual quality without going to the gpu in the first place?

or: can anyone recommend a cheap hardware hdmi-videoscaler which can convert 1080i50 to 720p25?

thanks for input!!!
k

ps. another thing i do not understand: when implementing my gpu-rescaler in my big patch, gpu memory and core utizilation are only about 50% (according to the apple opengl driver monitor), the patch however slows down to about 16fps and cpu wait for gpu shoots up… anyone any guess what’s the bottleneck?

– Pasted Max Patch, click to expand. –

`

  • This reply was modified 4 months by  karl krach.

April 24, 2014 | 7:27 am

spaghetti tomatrix … $8 & prepend tip


April 24, 2014 | 8:21 am

er, what?


May 3, 2014 | 1:05 pm

just to sum up: i ended up buying a hardware (hdmi-) rescaler which just does the job.
i got a really cheap one from a brand called "ligawo" and i actually can quite recommend this little box since it is only about the tenth of the price of it’s competitors and the quality is still quite good, it even converts 1080i50 to 720p50 properly (@ 50fps).
best
k


Viewing 7 posts - 1 through 7 (of 7 total)