Definition at line 78 of file video.py.
◆ __init__()
def var.video.VideoSynthBase.__init__ |
( |
|
self, |
|
|
|
size = None , |
|
|
|
noise = 0.0 , |
|
|
|
bg = None , |
|
|
** |
params |
|
) |
| |
Definition at line 79 of file video.py.
79 def __init__(self, size=None, noise=0.0, bg = None, **params):
81 self.frame_size = (640, 480)
83 self.bg = cv.imread(cv.samples.findFile(bg))
84 h, w = self.bg.shape[:2]
85 self.frame_size = (w, h)
88 w, h = map(int, size.split(
'x'))
89 self.frame_size = (w, h)
90 self.bg = cv.resize(self.bg, self.frame_size)
92 self.noise =
float(noise)
◆ isOpened()
def var.video.VideoSynthBase.isOpened |
( |
|
self | ) |
|
◆ read()
def var.video.VideoSynthBase.read |
( |
|
self, |
|
|
|
dst = None |
|
) |
| |
Reimplemented in var.video.Cube, and var.video.Book.
Definition at line 97 of file video.py.
97 def read(self, dst=None):
98 w, h = self.frame_size
101 buf = np.zeros((h, w, 3), np.uint8)
108 noise = np.zeros((h, w, 3), np.int8)
109 cv.randn(noise, np.zeros(3), np.ones(3)*255*self.noise)
110 buf = cv.add(buf, noise, dtype=cv.CV_8UC3)
◆ render()
def var.video.VideoSynthBase.render |
( |
|
self, |
|
|
|
dst |
|
) |
| |
◆ bg
var.video.VideoSynthBase.bg |
◆ frame_size
var.video.VideoSynthBase.frame_size |
◆ noise
var.video.VideoSynthBase.noise |
The documentation for this class was generated from the following file:
- repos_for_Dox/cFp_Zoo/HOST/vision/common/languages/python/var/video.py