示例#1
0
lc = video.LightCorrectMS()
lc.source(0,vid)
man.add(lc)

of = video.OpticalFlowLK()
of.source(0,vid)
of.source(1,lc,2)
man.add(of)

rf = video.RenderFlow(4.0)
rf.source(0,of)
man.add(rf)


winIn = video.ViewCV('Input')
winIn.move(0,0)
winIn.source(0,vid)
man.add(winIn)

winOF = video.ViewCV('Optical Flow')
winOF.move(vid.width()+5,0)
winOF.source(0,rf)
man.add(winOF)


if len(sys.argv)>1: # Any parameter and we save the output.
  cg = video.CombineGrid(2,1)
  cg.source(0,vid)
  cg.source(1,rf)
  man.add(cg)
示例#2
0
                  dest='start',
                  help='Frame to start playback on',
                  metavar='FRAME',
                  default=0)

(options, args) = parser.parse_args()
if len(args) != 1:
    parser.print_help()
    sys.exit(1)

inFN = args[0]

# Build the node tree...
man = video.Manager()

p = video.Play(inFN)

fc = video.FrameCrop(p, options.start)
man.add(fc)

rw = video.RenderWord(video.five_word_colours)
rw.source(0, fc)
man.add(rw)

winWord = video.ViewCV('Words')
winWord.source(0, rw)
man.add(winWord)

# go...
man.run()
示例#3
0
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.



import video



man = video.Manager()

vid = video.ReadCV('test.avi')
man.add(vid)

dein = video.DeinterlaceEV()
dein.source(0,vid)
man.add(dein)

out1 = video.ViewCV('Deinterlaced')
out1.source(0,dein)
out1.move(0,0)
man.add(out1)

man.run()
示例#4
0
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import video

man = video.Manager()

vid = video.ReadCV('test.avi')
man.add(vid)

ref = video.Reflect(False, True)
ref.source(0, vid)
man.add(ref)

out = video.ViewCV('test.avi')
out.source(0, ref)
man.add(out)

man.run()
示例#5
0
man = video.Manager()

vid = video.ReadCV('test.avi')
man.add(vid)

lc = video.LightCorrectMS()
lc.source(0, vid)
man.add(lc)

diff = video.RenderDiff(100.0)
diff.source(0, vid)
diff.source(1, lc, 3)
man.add(diff)

out1 = video.ViewCV('Current')
out1.source(0, vid)
out1.move(0, 0)
man.add(out1)

out2 = video.ViewCV('Current corrected to previous')
out2.source(0, lc, 3)
out2.move(vid.width() + 5, 0)
man.add(out2)

out3 = video.ViewCV('Difference')
out3.source(0, diff)
out3.move(vid.width() * 2 + 10, 0)
man.add(out3)

示例#6
0
man.add(fw)

mr = video.RenderMask(bgColour=(0.0, 0.0, 1.0))
mr.source(0, cm)
mr.source(1, vid)
man.add(mr)

rf = video.RenderFlow(1.0)
rf.source(0, mf)
man.add(rf)

rw = video.RenderWord()
rw.source(0, fw)
man.add(rw)

winIn = video.ViewCV('Input')
winIn.move(0, 0)
winIn.source(0, vid)
man.add(winIn)

winFore = video.ViewCV('Foreground')
winFore.move(0, vid.height() + 50)
winFore.source(0, mr)
man.add(winFore)

winOF = video.ViewCV('Optical Flow')
winOF.move(vid.width() + 5, 0)
winOF.source(0, rf)
man.add(winOF)

winWord = video.ViewCV('Words')