- refactored resolution
git-svn-id: http://moon:8086/svn/software/trunk/projects/opencv@334 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+5
-4
@@ -91,6 +91,7 @@ class MyRgbProcess(RgbProcess):
|
||||
if not self.isVisible:
|
||||
print ("Visible")
|
||||
self.isVisible = True
|
||||
print(maxLoc)
|
||||
img1_objects = cv2.rectangle(img1_objects,rect[0],rect[1],(255,0,0),1)
|
||||
errorX = float(x)-self.res[0]/2
|
||||
errorY = float(y)-self.res[1]/2
|
||||
@@ -126,8 +127,8 @@ if with_ev3:
|
||||
# Connect to brick
|
||||
with ev3.EV3() as brick:
|
||||
|
||||
videoSource = VideoSource(videoFile, (width,height,3), framerate)
|
||||
proc = MyRgbProcess('MyRgbProcess', (height, width, 3), 4, brick=brick)
|
||||
videoSource = VideoSource(videoFile, (width, height,3), framerate)
|
||||
proc = MyRgbProcess('MyRgbProcess', (width, height, 3), 4, brick=brick)
|
||||
videoSource.processorAdd(proc)
|
||||
videoSource.start()
|
||||
|
||||
@@ -136,8 +137,8 @@ if with_ev3:
|
||||
videoSource.stop()
|
||||
proc.stop()
|
||||
else:
|
||||
videoSource = VideoSource(videoFile, (width,height,3), framerate)
|
||||
proc = MyRgbProcess('MyRgbProcess', (height, width, 3), 4)
|
||||
videoSource = VideoSource(videoFile, (width, height,3), framerate)
|
||||
proc = MyRgbProcess('MyRgbProcess', (width, height, 3), 4)
|
||||
videoSource.processorAdd(proc)
|
||||
videoSource.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user