class_docstr: Generate the ground truth targets of FCENet: Fourier Contour Embedding
  for Arbitrary-Shaped Text Detection.
  
  [https://arxiv.org/abs/2104.10442]
  
  Args:
      fourier_degree (int): The maximum Fourier transform degree k.
      resample_step (float): The step size for resampling the text center
          line (TCL). It's better not to exceed half of the minimum width.
      center_region_shrink_ratio (float): The shrink ratio of text center
          region.
      level_size_divisors (tuple(int)): The downsample ratio on each level.
      level_proportion_range (tuple(tuple(int))): The range of text sizes
          assigned to each level.
docstr: Resample n points on a line.
  
  Args:
      line (ndarray): The points composing a line.
      n (int): The resampled points number.
  
  Returns:
      resampled_line (ndarray): The points composing the resampled line.
docstr_tok: ["Resample","n","points","on","a","line",".","Args",":","line","(","ndarray",")",":","The","points","composing","a","line",".","n","(","int",")",":","The","resampled","points","number",".","Returns",":","resampled_line","(","ndarray",")",":","The","points","composing","the","resampled","line","."]
code: def resample_line(self, line, n):
      """Resample n points on a line.
  
      Args:
          line (ndarray): The points composing a line.
          n (int): The resampled points number.
  
      Returns:
          resampled_line (ndarray): The points composing the resampled line.
      """
  
      assert line.ndim == 2
      assert line.shape[0] >= 2
      assert line.shape[1] == 2
      assert isinstance(n, int)
      assert n > 0
  
      length_list = [
          norm(line[i + 1] - line[i]) for i in range(len(line) - 1)
      ]
      total_length = sum(length_list)
      length_cumsum = np.cumsum([0.0] + length_list)
      delta_length = total_length / (float(n) + 1e-8)
  
      current_edge_ind = 0
      resampled_line = [line[0]]
  
      for i in range(1, n):
          current_line_len = i * delta_length
  
          while (
              current_edge_ind + 1 < len(length_cumsum)
              and current_line_len
              >= length_cumsum[current_edge_ind + 1]
          ):
              current_edge_ind += 1
  
          current_edge_end_shift = (
              current_line_len - length_cumsum[current_edge_ind]
          )
  
          if current_edge_ind >= len(length_list):
              break
          end_shift_ratio = (
              current_edge_end_shift / length_list[current_edge_ind]
          )
          current_point = (
              line[current_edge_ind]
              + (line[current_edge_ind + 1] - line[current_edge_ind])
              * end_shift_ratio
          )
          resampled_line.append(current_point)
      resampled_line.append(line[-1])
      resampled_line = np.array(resampled_line)
  
      return resampled_line
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 3 for calling the FCENetTargets obj's underlying member method code with example usage: obj.resample_line(line, n) and returns: resampled_line