iterate(image, feature_extractor, feature_vector) -> bounding_box

    Scales the given image, and extracts features from all possible bounding boxes.

    For each of the sampled bounding boxes, this function fills the given pre-allocated feature vector and yields the current bounding box.

    **Parameters:**

    ``image`` : array_like(2D)
      The given image to extract features for

    ``feature_extractor`` : :py:class:`FeatureExtractor`
      The feature extractor to use to extract the features for the sampled patches

    ``feature_vector`` : :py:class:`numpy.ndarray` (1D, uint16)
      The pre-allocated feature vector that will be filled inside this function; needs to be of size :py:attr:`FeatureExtractor.number_of_features`

    **Yields:**

    ``bounding_box`` : :py:class:`BoundingBox`
      The bounding box for which the current features are extracted for

def iterate(self, image, feature_extractor, feature_vector):
    """iterate(image, feature_extractor, feature_vector) -> bounding_box

    Scales the given image, and extracts features from all possible bounding boxes.

    For each of the sampled bounding boxes, this function fills the given pre-allocated feature vector and yields the current bounding box.

    **Parameters:**

    ``image`` : array_like(2D)
      The given image to extract features for

    ``feature_extractor`` : :py:class:`FeatureExtractor`
      The feature extractor to use to extract the features for the sampled patches

    ``feature_vector`` : :py:class:`numpy.ndarray` (1D, uint16)
      The pre-allocated feature vector that will be filled inside this function; needs to be of size :py:attr:`FeatureExtractor.number_of_features`

    **Yields:**

    ``bounding_box`` : :py:class:`BoundingBox`
      The bounding box for which the current features are extracted for
    """
    for scale, scaled_image_shape in self.scales(image):
      # prepare the feature extractor to extract features from the given image
      feature_extractor.prepare(image, scale)
      for bb in self.sample_scaled(scaled_image_shape):
        # extract features for
        feature_extractor.extract_indexed(bb, feature_vector)
        yield bb.scale(1./scale)