wed.chaptors.title_call module¶
This submodule contains a set of functions for editing the following image:
- class wed.chaptors.title_call.TitleCallEditor(upper_text: str = '水曜日', middle_text: str = 'の', lower_text: str = 'ダウンタウン', ttfontname: str = '/Users/iwasakishuto/Github/portfolio/Wed-Downtown-OP/data/fonts/MODI_memoir/memoir-square.otf', expansion_time: int = 10)[source]¶
Bases:
wed.chaptors.base_editor.BaseWedOPEditor
- POSITIONS = {'lower': {'fontsize': 50, 'positions': [(130, 200), (195, 200), (260, 200), (330, 200), (400, 200), (465, 200)], 'timings': [440, 443, 447, 450, 456, 460]}, 'middle': {'fontsize': 20, 'positions': [(310, 162)], 'timings': [430]}, 'upper': {'fontsize': 50, 'positions': [(195, 120), (295, 105), (390, 120)], 'timings': [400, 410, 420]}}¶
- edit(frame: numpy.ndarray[Any, numpy.dtype[numpy.uint8]], pos: int, span: int = 20) → numpy.ndarray[Any, numpy.dtype[numpy.uint8]][source]¶
Edit the image if it is an assigned chapter (
pos
)- Parameters
frame (npt.NDArray[np.uint8]) – Current frame (BGR image) in the video.
pos (int) – Current position in the video.
- Returns
Edited frame.
- Return type
npt.NDArray[np.uint8]