def image(self):
        try:
            # use OpenCV to capture a frame and store it in a numpy array
            stream = cv2.VideoCapture(self._previewURL())
            success, numpyImage = stream.read()

            if success:
                # use Image to save the image to a file, but actually save it
                # to a string
                image = Image.fromarray(numpyImage)
                output = StringIO.StringIO()
                image.save(output, format='PNG')
                str = output.getvalue()
                output.close()

                logging.info('GoProHero.image() - success!')
                return 'data:image/png;base64,'+base64.b64encode(str)
        except NameError:
            logging.warning('{}{} - OpenCV not installed{}'.format(
                Fore.YELLOW, 'GoProHero.image()', Fore.RESET))
        except __HOLE__ as e:
            logging.warning('{}{} - Pillow prereqs not installed: {}{}'.format(
                Fore.YELLOW, 'GoProHero.image()', e, Fore.RESET))

        # catchall return statement
        return False
dataset/ETHPy150Open joshvillbrandt/goprohero/goprohero/GoProHero.py/GoProHero.image