Displaying empty pyplot
This commit is contained in:
@@ -153,7 +153,20 @@ class SlamShow(object):
|
|||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
|
|
||||||
# Rotate image 270 degrees
|
# If we have a new figure, something went wrong (closing figure failed)
|
||||||
|
if self.figid != id(plt.gcf()):
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Redraw current objects without blocking
|
||||||
|
plt.draw()
|
||||||
|
|
||||||
|
# Refresh display, setting flag on window close or keyboard interrupt
|
||||||
|
try:
|
||||||
|
plt.pause(.01)
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Rotate image 270 degrees
|
||||||
#wid,hgt = cv.GetSize(self.image)
|
#wid,hgt = cv.GetSize(self.image)
|
||||||
#mapMatrix = cv2.getRotationMatrix2D((wid/2,hgt/2), 270, 1.0)
|
#mapMatrix = cv2.getRotationMatrix2D((wid/2,hgt/2), 270, 1.0)
|
||||||
#cv.WarpAffine(self.image, self.image, cv.fromarray(mapMatrix))
|
#cv.WarpAffine(self.image, self.image, cv.fromarray(mapMatrix))
|
||||||
@@ -165,7 +178,6 @@ class SlamShow(object):
|
|||||||
key = cvdisplay()
|
key = cvdisplay()
|
||||||
return key if key > -1 else None
|
return key if key > -1 else None
|
||||||
|
|
||||||
|
|
||||||
def waitkey(self, action):
|
def waitkey(self, action):
|
||||||
|
|
||||||
print('Hit any key to %s ...' % action)
|
print('Hit any key to %s ...' % action)
|
||||||
|
|||||||
Reference in New Issue
Block a user