Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Sofa
- import SofaOR
- import cv2
- def createScene(node):
- node.createObject('RequiredPlugin',name='AcquisitOR')
- node.createObject('RequiredPlugin',name='ProcessOR')
- node.createObject('RequiredPlugin',name='SofaORCommon')
- input = node.createObject('VideoGrabber', name="input", videoFile="videoTest.mp4", async="false")
- input.init()
- img_numpy = SofaOR.mat_as_numpy(input.img)
- cv2.flip(img_numpy, 1)
- node.createObject('FrameViewer', name="viewer", img="@input.img")
- return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement