ValueError: no standard masks exist for given bitdepth with alpha
mtahiue opened this issue · 0 comments
mtahiue commented
Hello
I've been using docker image to test simplecv
I fall on this issue
ValueError: no standard masks exist for given bitdepth with alpha
this is an example code throwing this issue
different other codes throws the same with draw()
i had the same issue on ipython notebook and on console output
CODE (for ipython notebook)
from SimpleCV import Image, Color, Display
disp = Display(displaytype='notebook')
# load an image from imgur
img = Image('http://i.imgur.com/lfAeZ4n.png')
# use a keypoint detector to find areas of interest
feats = img.findKeypoints()
# draw the list of keypoints
feats.draw(color=Color.RED)
# show the resulting image.
img.show()
# apply the stuff we found to the image.
output = img.applyLayers()
# save the results.
output.save(disp)
OUTPUT
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-048a7f1780dc> in <module>()
8 feats = img.findKeypoints()
9 # draw the list of keypoints
---> 10 feats.draw(color=Color.RED)
11 # show the resulting image.
12 img.show()
/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/Features/Features.pyc in draw(self, color, width, autocolor, alpha)
94 f.draw(color=color,width=width,alpha=alpha)
95 else:
---> 96 f.draw(color=color,width=width)
97
98 def show(self, color = Color.GREEN, autocolor = False,width=1):
/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/Features/Detection.pyc in draw(self, color, width)
1343
1344 """
-> 1345 self.image.dl().circle((self.x,self.y),self._r,color,width)
1346 pt1 = (int(self.x),int(self.y))
1347 pt2 = (int(self.x+(self.radius()*sin(radians(self.angle())))),
/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/ImageClass.pyc in dl(self, index)
6455
6456 """
-> 6457 return self.getDrawingLayer(index)
6458
6459
/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/ImageClass.pyc in getDrawingLayer(self, index)
6440 """
6441 if not len(self._mLayers):
-> 6442 layer = DrawingLayer(self.size())
6443 self.addDrawingLayer(layer)
6444 try:
/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/DrawingLayer.pyc in __init__(self, (width, height))
49 self.width = width
50 self.height = height
---> 51 self._mSurface = pg.Surface((width, height), flags = pg.SRCALPHA)
52 self._mDefaultAlpha = 255
53 self._mClearColor = pg.Color(0, 0, 0, 0)
ValueError: no standard masks exist for given bitdepth with alpha