Пример #1
0
	def postfetch(self, percept, percept_data):
		"""
		This method can be overridden to alter or use the percept's data or metadata once it has been fetched from the data store, but before the algorithm begins running. If you override this method, be sure to call it before your implementation, as this is where OpenCV parses the image.

		:param dict percept: percept metadata
		:param file percept_data: percept data
		:return: percept data
		:rtype: :py:class:`numpy.ndarray`

		.. NOTE::

			Be sure to return the data when you're done.
		"""
		return ImageOps.decode(percept_data)
Пример #2
0
    def postfetch(self, percept, percept_data):
        """
		This method can be overridden to alter or use the percept's data or metadata once it has been fetched from the data store, but before the algorithm begins running. If you override this method, be sure to call it before your implementation, as this is where OpenCV parses the image.

		:param dict percept: percept metadata
		:param file percept_data: percept data
		:return: percept data
		:rtype: :py:class:`numpy.ndarray`

		.. NOTE::

			Be sure to return the data when you're done.
		"""
        return ImageOps.decode(percept_data)
Пример #3
0
 def test_imageops_decode():
     ops = ImageOps(kConfig)
     result = ops.decode(constants.kExampleImageFile)
     assert result.shape == constants.kExampleImageDimensions
Пример #4
0
	def test_imageops_decode():
		ops = ImageOps(kConfig)
		result = ops.decode(constants.kExampleImageFile)
		assert result.shape == constants.kExampleImageDimensions