Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
1st July 2015, 19:32 | #1 | Link |
Registered User
Join Date: Jan 2013
Posts: 7
|
ShapeMask - Dynamically mask out bright shapes
If you're watching a lot of screen casts and recorded talks, and are as sick as I am of the over-use of white (console backgrounds, web pages, projections ...), then you may want to try out a plugin I created to mitigate that health hazard.
A compiled binary is available here. sha1: 5af5727b572b5e14bd32d1f8ee71d73522d41286 Source: github and there you also find the most readable version of the documentation, including example and screenshots. The plugin is a bit on the large side since it includes parts of OpenCV, a library that is ... challenging to prune. A note on the implementation. It could probably be optimized a bit more with AVX and some more SSE2, but as it stands it is sufficiently fast for my needs at least (getting about 350 fps with avsmeter). It does require a CPU that has SSE2 (I believe, don't have one without) as the CV bits were configured for utilizing that. Hopefully that won't be an issue as even the cheapest laptop has that instruction set nowadays.. Let me know if it crashes on you. If it does, then I've probably stripped CV down too much.. Last edited by joj; 1st July 2015 at 19:35. |
3rd July 2015, 23:09 | #2 | Link |
Registered User
Join Date: Jan 2013
Posts: 7
|
Issues
The envisioned benefit of this plugin over ordinary binarize masks is that it eliminates a lot of noise. However, being currently a purely spatial filter it has the drawback of not being able to differentiate background from foreground and this poses a problem in certain cases. Specifically it tends to perform badly when a shape changes form in particular ways, such as a subject connecting different body parts or when the camera captures only parts of objects, which may cause background to shine through "small holes",
What happens in those cases is that "new shapes" / objects are being created, and if they're too small for the specified threshold, then they're excluded from masking consideration. Example: The examples were created as follows: Code:
Overlay(Invert, mask=Binarize(190, upper=false)) Overlay(Invert, mask=ShapeMask(190, minarea=0.02))
If someone has any other ideas on how to deal with the shape distinction issue, I'd be glad to hear it. Last edited by joj; 4th July 2015 at 07:38. |
Thread Tools | Search this Thread |
Display Modes | |
|
|