Log in

View Full Version : Fun with Video Scopes


trevlac
14th March 2004, 05:12
Hi,

I've had trouble knowing what to do with many of the lovely filters that are available. So, I made a vdub plugin that shows a bunch of charts of the video so I can measure/see the effect of filters like levels. I've included histograms, a waveform monitor, a vectorscope, and a scanner for 'non legal' composite signals.

I just reworked the thing so it could be called from avisynth. So, I thought I'd post here. It of course only works in RGB, but it's for seeing, not changing, so colorspace conversions should not be a big issue.

The plugin is here (http://trevlac.us/colorCorrection/clrtools.vdf). Below is an avs usage function.


# Arguments:
# mode: 0=Histograms, 1=Show Hot Pixels, 2=Video Channels,
# 3=Waveform Monitor, 4=Vectorscope
#
# (input Characteristic args mainly used for luma calcs)
# NTSC vs PAL
# stdDef (601) vs hiDef (709)
# rng255 vs rng219 (Pick rng255=false if you want luma black=0)
#
# (show channels used in modes 0,2,3)
# luma,red,green,blue
#
# hotFixMode: 0=turn hot pixels black, 1=lower intensity, 2=lower saturation
# showWFMgrid: turn it off to see better.


function VD_clrtools(clip clip, int "mode",
\ bool "NTSC", bool "stdDef", bool "rng255",
\ bool "luma", bool "red", bool "green", bool "blue",
\ int "hotFixMode", bool "showWFMgrid")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\clrtools.vdf", "_VD_clrtools")

return clip._VD_clrtools(default(mode,0),0,0,
\ default(NTSC,true)?1:0,0,
\ default(stdDef,true)?1:0,
\ default(rng255,true)?1:0,
\ default(luma,true)?1:0,
\ default(red,true)?1:0,
\ default(green,true)?1:0,
\ default(blue,true)?1:0,
\ default(hotFixMode,0),
\ default(showWFMgrid,true)?1:0)
}


#Example Usage:

avisource("my.avi", pixel_type="RGB32")

#Luma Histogram Only
VD_clrtools(mode=0,red=false,green=false,blue=false)

#Luma Waveform Monitor
#VD_clrtools(mode=3,red=false,green=false,blue=false)

#Vectorscope
#VD_clrtools(mode=4)

rfmmars
14th March 2004, 05:53
Many thanks for your plug-in and hard work.

richard
photorecall.net

Arachnotron
15th March 2004, 14:03
:cool: :cool: :cool: :cool: :cool: :cool: :cool:

BloodyRipper
8th February 2005, 14:27
the link doesn't want to work...can anybody supply a mirror?

Arachnotron
8th February 2005, 15:01
Try this one:

http://www.trevlac.us/colorCorrection/clrtools.vdf

(it's the www that makes the difference)

[edit] Spoke to soon!! Hey trev, your domain is gone!!

signal
2nd April 2007, 00:13
Is there a way to use this filter in a capture preview mode (possibly in vdub)?

I'd like to fine tune my analog capture setup (i.e. adjust color/brightness/etc) before capturing.

Thanks

Arachnotron
6th April 2007, 11:15
This receipe is straight from trevlac. Make sure you use a recent ffdshow build and the latest colortools version.

For Live DV feed Very Happy But should work for other sources.

Using
- VirtualVCR
- ffdshow
- my vdub scope
- avisynth script


1) Set ffdshow to decode DV as said in this thread

http://forum.doom9.org/showthread.php?t=80215&highlight=ffdshow+dv

2) Make avisynth script to use colortools as said here

http://forum.doom9.org/showthread.php?t=72634&highlight=vectorscope+avisynth

3) Change sample script to not use avisource and add a converttorgb32() at start, and a flipvertical() at end.

4) Startup vvcr capture preview (or another directshow cap app)

5) Check avisynth config setting in ffdshow decoder and load the script


Since my device is not DV, I used graphedit and attached the fddshow filter to the preview pin of the capture device.

It was a while back when I did this, so the details are a bit fuzzy by now. Prototyping in graphedit gives you a better grip on which conversions are happening along the chain.