HomeOfVapourSynthEvolution / VapourSynth-BM3D

BM3D denoising filter for VapourSynth
MIT License
113 stars 30 forks source link

What does the 'clip' means? #19

Open CSGrandeur opened 7 years ago

CSGrandeur commented 7 years ago

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?

msg7086 commented 7 years ago

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.

CSGrandeur commented 7 years ago

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

msg7086 commented 7 years ago

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.

CSGrandeur commented 7 years ago

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

mawen1250 commented 7 years ago

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