title: Zernike moments error on irregular shapes?
body: <p>When I call <code>mahotas.features.zernike_moments</code> on certain images containing very irregular shapes I get the following error:</p>
  
  <pre><code>fv = mahotas.features.zernike_moments(mask, cv2.minEnclosingCircle(cnt)[1], degree=8)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python37\lib\site-packages\mahotas\features\zernike.py", line 59, in zernike_moments
      c0,c1 = center_of_mass(im)
  ValueError: too many values to unpack (expected 2)
  </code></pre>
  
  <p>It works on simple shapes like below:</p>
  
  <p><a href="https://i.stack.imgur.com/cCT0l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cCT0l.png" alt="enter image description here"></a></p>
  
  <p>But I get the error on the below image with the following code. Any idea what I am doing wrong?</p>
  
  <p><a href="https://i.stack.imgur.com/HqcXO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HqcXO.jpg" alt="enter image description here"></a></p>
  
  <pre><code>penStrokes = np.array(penStrokes)
  peri = cv2.arcLength(penStrokes, True)
  approx = cv2.approxPolyDP(penStrokes, 0.02 * peri, True) 
  mask = np.zeros((frame.shape[0], frame.shape[1], 1), dtype='uint8')
  cv2.drawContours(mask, [approx], -1, (255,), -1)
  cnt = cv2.findContours(mask.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)[1][0]
  cv2.imshow('mask', mask)
  
  
  # Determine shape from zernike moments
  fv = mahotas.features.zernike_moments(mask, cv2.minEnclosingCircle(cnt)[1], degree=8)
  print(fv)
  </code></pre>
  
  <p><strong>Edit</strong> It seems if I resize the mask to 500 pixels wide the code works? Does mahotas have a minimum size the shape needs to be?</p>