VapourSynth-BM3D icon indicating copy to clipboard operation
VapourSynth-BM3D copied to clipboard

What does the 'clip' means?

Open CSGrandeur opened this issue 7 years ago • 5 comments

I want to use this BM3D algorithm in python. I used the 'mvsfunc' and feed the function with ndarray(in numpy). The function returns "TypeError: BM3D: "input" must be a clip!"

How can I use it to process an image?

CSGrandeur avatar Nov 01 '16 04:11 CSGrandeur

I'm not quite sure about what you are doing here, but basically you should feed it with a VapourSynth Clip. If you have no idea what VapourSynth or a Clip is, please refer to here. You can also try to port this VapourSynth plugin into Python, if you want to use it outside of VapourSynth.

msg7086 avatar Nov 01 '16 05:11 msg7086

Thanks for reply. I find that I didn't know VapourSynth before. Maybe I need the 'vsimagereader' for it to access images. https://github.com/chikuzen/vsimagereader

CSGrandeur avatar Nov 01 '16 09:11 CSGrandeur

You would also need something to fetch the output from VapourSynth. Usually we use x264 or x265 to produce a video, and I've never tried to produce an image from that.

msg7086 avatar Nov 01 '16 14:11 msg7086

Thank you. Perhaps I may also try some other libraries.

CSGrandeur avatar Nov 01 '16 14:11 CSGrandeur

For reading image in VapourSynth, you can try this: http://forum.doom9.org/showthread.php?t=173633 There's also an ImageMagick Writer-Reader (http://www.vapoursynth.com/doc/plugins/imwri.html#imwri), though it is not recommended.

Alternatively, VapourSynth do provide an interface for raw access to the frame data: http://www.vapoursynth.com/doc/pythonreference.html#raw-access-to-frame-data

mawen1250 avatar Nov 02 '16 13:11 mawen1250