On Tue, 22 Mar 2005, Steven Boswell II wrote:
> Was that y4mblackfix? I thought the problem was
Not recently - that was a very early attempt that took the simplistic
(naive) approach mentioned below
> that it artifacted strangely, not that people weren't interested.
It did, some really dark scenes looked great, but then others looked
absolutely wretched.
> I ask because I've got one video in my collection
> that has a LOT of action in the almost-black
> areas, and I'm keen to fix the problem.
> What's the general idea -- if the luminance is
> less than a certain value, clamp the color to white?
That's the naive approach that produces really bad output. Some areas
become pure black in the middle of areas outside the threshold which
didn't get changed. Looks worse than leaving things alone.
I'm not sure if it's better to try and do areas within a frame (search
for groups of NxN pixels that are "dark") or make a pass over the
frame and if the frame as a whole is dark then more aggressively
median/average filter the entire frame. If entire frames are being
done it'd probably be good to have a gradual ramp up and taper off
processing to avoid abrupt changes in the filtering.
Since we don't see color well in the dark desaturating the dark areas
is something I've found to work well. In the "YUV" space I think that
means moving U and V closer to their midpoint of 128. Not sure if this
means that to desaturate by 50% you'd take move U and V 1/2 the
difference closer to 128 or not.
What I've got now is a dumb little program that searches for dark
groups and changes them to white so they show up and you can see which
areas would be filtered if the stub filter routines actually had some
code written. Sort of a 'yuvplay' that can be used to see what areas
meet the 'dark' criteria. If you'd like a copy to laugh at or use
as a template/startingpoint I could certainly do that.
Cheers,
Steven Schultz
-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
Mjpeg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users