code: def _filter_image(image, min_scale, max_scale, mode):
      response = np.zeros(
          (image.shape[0], image.shape[1], max_scale - min_scale + 1),
          dtype=np.float64,
      )
  
      if mode == "dob":
          # make response[:, :, i] contiguous memory block
          item_size = response.itemsize
          response.strides = (
              item_size * response.shape[1],
              item_size,
              item_size * response.shape[0] * response.shape[1],
          )
  
          integral_img = integral_image(image)
  
          for i in range(max_scale - min_scale + 1):
              n = min_scale + i
  
              # Constant multipliers for the outer region and the inner region
              # of the bi-level filters with the constraint of keeping the
              # DC bias 0.
              inner_weight = 1.0 / (2 * n + 1) ** 2
              outer_weight = 1.0 / (12 * n**2 + 4 * n)
  
              _censure_dob_loop(
                  n,
                  integral_img,
                  response[:, :, i],
                  inner_weight,
                  outer_weight,
              )
  
      # NOTE : For the Octagon shaped filter, we implemented and evaluated the
      # slanted integral image based image filtering but the performance was
      # more or less equal to image filtering using
      # scipy.ndimage.filters.convolve(). Hence we have decided to use the
      # later for a much cleaner implementation.
      elif mode == "octagon":
          # TODO : Decide the shapes of Octagon filters for scales > 7
  
          for i in range(max_scale - min_scale + 1):
              mo, no = OCTAGON_OUTER_SHAPE[min_scale + i - 1]
              mi, ni = OCTAGON_INNER_SHAPE[min_scale + i - 1]
              response[:, :, i] = convolve(
                  image, _octagon_kernel(mo, no, mi, ni)
              )
  
      elif mode == "star":
          for i in range(max_scale - min_scale + 1):
              m = STAR_SHAPE[STAR_FILTER_SHAPE[min_scale + i - 1][0]]
              n = STAR_SHAPE[STAR_FILTER_SHAPE[min_scale + i - 1][1]]
              response[:, :, i] = convolve(image, _star_kernel(m, n))
  
      return response
  
file_path: scikit-image/skimage/feature/censure.py
imports: import numpy
  from scipy.ndimage import maximum_filter, minimum_filter, convolve
  from ..transform import integral_image
  from .corner import structure_tensor
  from ..morphology import octagon, star
  from .censure_cy import _censure_dob_loop
  from ..feature.util import FeatureDetector, _prepare_grayscale_input_2D, _mask_border_keypoints
  from .._shared.utils import check_nD
label_desc: Use image node_id 1 for calling a global function with example usage: _filter_image(image, min_scale, max_scale, mode) and returns: response