{"id":2335,"date":"2024-05-19T17:44:51","date_gmt":"2024-05-19T16:44:51","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=2335"},"modified":"2024-05-19T17:44:51","modified_gmt":"2024-05-19T16:44:51","slug":"demo-live-opencv-non-local-means-denoising","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/2335","title":{"rendered":"Demo: Live OpenCV Non-local Means Denoising"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">On occasion I hooked <a href=\"https:\/\/docs.opencv.org\/4.x\/d5\/d69\/tutorial_py_non_local_means.html\">OpenCV Non-local Means Denoising<\/a> to the Media Foundation camera capture test application already meantioned in previous posts. It is the regular, non-CUDA implementation wrapped into <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/win32\/medfound\/media-foundation-transforms\">Media Foundation Transform<\/a> so that it could be plugged directly into <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/win32\/api\/mfcaptureengine\/\">Media Foundation Capture Engine<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Original implementation is taken from non-realtime denoised and hence the question is how good it is for real time video. Unforutunately, it appears to be rather slow. Essentially, it is a Media Foundation wrapper over&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fastNlMeansDenoisingColoredMulti(..., ..., 1, 3, ...);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230; with minimal temporal window of three frames sliding one by one. OpenCV implementation could obviosuly be better too, but probably the most efficient improvement would be to take advantage of CUDA variant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, anyway, the demo is here, to see how slow it is for live&#8230;<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-5f02bbba-41f3-4b56-9213-d32330ae9aea\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2024\/05\/Capture-20240519-1813e30034d6634871abade94d7f6e7b820621ea.zip\">Capture-20240519-1813e30034d6634871abade94d7f6e7b820621ea<\/a><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2024\/05\/Capture-20240519-1813e30034d6634871abade94d7f6e7b820621ea.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-5f02bbba-41f3-4b56-9213-d32330ae9aea\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>On occasion I hooked OpenCV Non-local Means Denoising to the Media Foundation camera capture test application already meantioned in previous posts. It is the regular, non-CUDA implementation wrapped into Media Foundation Transform so that it could be plugged directly into Media Foundation Capture Engine. Original implementation is taken from non-realtime denoised and hence the question&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/2335\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[639,424,638,486],"class_list":["post-2335","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-denoise","tag-media-foundation","tag-opencv","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=2335"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2335\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=2335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=2335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=2335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}