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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st December 2004, 16:23   #21  |  Link
rfmmars
Registered User
 
Join Date: Feb 2004
Posts: 743
New VD filter

Take a look at this one.

http://neuron2.net/ipw-web/bulletin/...opic.php?t=593

richard
photorecall.net
rfmmars is offline   Reply With Quote
Old 31st December 2004, 17:21   #22  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
One thing I noticed with Graft's hue filter (Fdump's filter is based on it, since it used the same transformations) is the following:

Start with pure yellow (avs->blankclip). If you open the script in VDub, use Graft's hue filter and set the saturation to zero, you should get pure white. But you get R=G=B=234 instead. Perhaps it's because of the approximate transformations, perhaps there's an error in it. I really want to know how those transformations are derived.
Wilbert is offline   Reply With Quote
Old 1st January 2005, 03:13   #23  |  Link
fccHandler
Registered Jedi
 
Join Date: Jan 2003
Location: Georgia, U.S.A.
Posts: 734
Thank you for your work! It will be great having DG's Hue (with RGB support) ported to Avisynth.

BTW, I don't think removing the saturation from yellow makes it white. I'm thinking of a black and white TV show for instance. All the colors reduce to various shades of gray when the color is removed, but I would expect only pure white to actually stay white.
__________________
May the FOURCC be with you...
fccHandler is offline   Reply With Quote
Old 1st January 2005, 03:52   #24  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
Quote:
BTW, I don't think removing the saturation from yellow makes it white. I'm thinking of a black and white TV show for instance. All the colors reduce to various shades of gray when the color is removed,
Have a look at the diagram in

http://www2.ncsu.edu/scivis/lessons/...els2.html#hue.

Pure yellow (or green, blue, red, etc ...) has an value (lightness) of 1. This implies that reducing the saturation turns it into white.

Now, if the value is less than 1 (r=200,g=200,b=0 for example), then reducing the saturation turns it into grey.

some formulas:

http://en.wikipedia.org/wiki/HSV_color_space
http://www.easyrgb.com/math.php?MATH=M21#text21
Wilbert is offline   Reply With Quote
Old 1st January 2005, 04:58   #25  |  Link
fccHandler
Registered Jedi
 
Join Date: Jan 2003
Location: Georgia, U.S.A.
Posts: 734
Quote:
Originally posted by Wilbert
Pure yellow (or green, blue, red, etc ...) has an value (lightness) of 1. This implies that reducing the saturation turns it into white.
Ah, I see. Based solely on the diagram I must agree with you. But those diagrams and links are all about computer graphics. Maybe it works differently in the video world?

Honestly, "Hue" and "Value" (or "Intensity") I couldn't care less about. I only want the "Saturation" control. In my mind (not getting too technical), I've always thought about it like the "Color" knob on a TV set. You turn it up and colors bloom and people's faces turn red. You turn it down and it's just like watching a B&W set. The "saturation" slider in Donald Graft's filter seems to accomplish a similar effect for digital video, but is "saturation" really the proper term for it?

Just to confuse you more, here's something I noticed: Try desaturating the same BlankClip in VirtualDub, first using Donald's "H/S/I" filter, and then using VirtualDub's internal "HSV adjust" filter. The results are quite different.

Since DG is currently unavailable, perhaps you can ask Avery Lee if he has any thoughts on this.


EDIT:
Just thought of something else. IIRC in video there is the concept of colors being "NTSC safe." (There may also be a similar concept in PAL video.) A vectorscope is a device used to measure the color saturation of broadcast video, and determine if it is "safe" or not. The colors must fall within certain fixed boundaries. Therefore it may not be possible to represent "pure yellow" (or any other pure color) in the video world, i.e., it's always less than Value=1. Perhaps the VirtualDub filters are using formulas customized to reflect this concept...
__________________
May the FOURCC be with you...

Last edited by fccHandler; 1st January 2005 at 05:11.
fccHandler is offline   Reply With Quote
Old 1st January 2005, 12:13   #26  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by fccHandler
Since DG is currently unavailable,
This may be a bit offtopic, but is anybody else finding Donald's website to be AWOL?

Quote:
Not Found
The requested URL / was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.31 Server at neuron2.net Port 80
np: Autechre - Maphive 6.1 (EP7)
Leak is offline   Reply With Quote
Old 1st January 2005, 14:32   #27  |  Link
BruceL
Registered User
 
BruceL's Avatar
 
Join Date: May 2002
Location: The nearest ski slope
Posts: 125
@Leak
I am getting the same as you at all my neuron2 links. Sure hope he is OK and his site is just experiencing a short term technical problem.
BruceL is offline   Reply With Quote
Old 2nd January 2005, 10:26   #28  |  Link
State of Mind
Registered User
 
Join Date: Apr 2004
Posts: 105
Fcchandler, would it be too much trouble for you to post some screenshots of unfiltered DV and enhanced DV in your case? I am interested in seeing the difference in color levels.
State of Mind is offline   Reply With Quote
Old 2nd January 2005, 15:40   #29  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
I'm so confused

Regarding Graft's hue filter. The saturation setting does the following. Setting it to one leaves the rgb clip untouched, and setting it to zero sets the rgb clip to (r,g,b)=(y,y,y) where y is the luminance (as in yuv). In [0,1] it just performs a linear interpolation (and linear extrapolation outside [0,1]).

Normally we have y = 0.299*r + 0.587*g + 0.114*b, but they use a gamma-corrected version: y = 0.3086*r + 0.6094*g + 0.0820*b (don't know yet where these numbers are coming from ...).

http://www.sgi.com/misc/grafica/matrix/index.html

What I don't understand is, how is this related to the saturation in the hsv color format? I guess there's no relation? Setting the saturation to zero results in (r,g,b) = (V,V,V) with V = max(r,g,b) and setting it to one the (r,g,b) may or may not change.

Last edited by Wilbert; 2nd January 2005 at 17:47.
Wilbert is offline   Reply With Quote
Old 2nd January 2005, 19:40   #30  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
@fccHandler,

First test version:

http://www.wilbertdijkhof.com/Hue_v10.zip

It should produce identical results.

I also want to look at the hue implementation of the internal vdub hsi filter. Adjusting hue is implemented correctly here.

Last edited by Wilbert; 16th October 2011 at 09:42.
Wilbert is offline   Reply With Quote
Old 2nd January 2005, 21:19   #31  |  Link
fccHandler
Registered Jedi
 
Join Date: Jan 2003
Location: Georgia, U.S.A.
Posts: 734
Quote:
Originally posted by State of Mind
Fcchandler, would it be too much trouble for you to post some screenshots of unfiltered DV and enhanced DV in your case? I am interested in seeing the difference in color levels.
If you have VirtualDub and Donald Graft's Hue/Saturation/Intensity filter, you can make your own screenshots. The only parameter I'm changing is the saturation. Even at 83% the difference is visually subtle, but it can be objectively measured with trevlac's excellent "Color Tools" filter (in vectorscope mode).
__________________
May the FOURCC be with you...
fccHandler is offline   Reply With Quote
Old 2nd January 2005, 21:33   #32  |  Link
fccHandler
Registered Jedi
 
Join Date: Jan 2003
Location: Georgia, U.S.A.
Posts: 734
Quote:
Originally posted by Wilbert
First test version:

http://www.geocities.com/wilbertdijkhof/Hue_v10.zip

It should produce identical results.
Great work! I'm sure I'll be testing this later today.

Just to be complete, I noticed that the original H/S/I filter GUI has a checkbox "Preserve luma on hue change," but I don't see that option in the docs of your version.

Quote:
I also want to look at the hue implementation of the internal vdub hsi filter.
I looked at it. But typical of Avery, it's so heavily optimized as to be incomprehensible to mere mortals.
__________________
May the FOURCC be with you...
fccHandler is offline   Reply With Quote
Old 2nd January 2005, 22:02   #33  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,293
Quote:
Just to be complete, I noticed that the original H/S/I filter GUI has a checkbox "Preserve luma on hue change," but I don't see that option in the docs of your version.
I still have to add this option
Wilbert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.