parameters: (base64str)
return_statement: return img
docstring: Read image from base64 string
docstring_summary: Read image from base64 string
docstring_tokens: Read image from base64 string
function: def read_img_base64(base64str):
      """Read image from base64 string
      """
      #check if contains javascript
      image_data = re.sub('^data:image/.+;base64,', '', base64str)\
          .decode('base64')
  
      nparr = np.fromstring(image_data, np.uint8)
      img = cv2.imdecode(nparr, cv2.IMREAD_COLOR)\
          .astype(np.float32)
      return img
function_tokens: def read_img_base64 ( base64str ) : #check if contains javascript image_data = re . sub ( '^data:image/.+;base64,' , '' , base64str ) . decode ( 'base64' ) nparr = np . fromstring ( image_data , np . uint8 ) img = cv2 . imdecode ( nparr , cv2 . IMREAD_COLOR ) . astype ( np . float32 ) return img