File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
cscore-intermediate-vision Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1414import cv2
1515import numpy as np
1616
17- from cscore import CameraServer
17+ from cscore import CameraServer as CS
1818
1919
2020def main ():
21- cs = CameraServer .getInstance ()
22- cs .enableLogging ()
21+ CS .enableLogging ()
2322
24- camera = cs .startAutomaticCapture ()
23+ camera = CS .startAutomaticCapture ()
2524
2625 camera .setResolution (320 , 240 )
2726
2827 # Get a CvSink. This will capture images from the camera
29- cvSink = cs .getVideo ()
28+ cvSink = CS .getVideo ()
3029
3130 # (optional) Setup a CvSource. This will send images back to the Dashboard
32- outputStream = cs .putVideo ("Rectangle" , 320 , 240 )
31+ outputStream = CS .putVideo ("Rectangle" , 320 , 240 )
3332
3433 # Allocating new images is very expensive, always try to preallocate
3534 img = np .zeros (shape = (240 , 320 , 3 ), dtype = np .uint8 )
You can’t perform that action at this time.
0 commit comments