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: Perform Fourier transformation to generate Fourier coefficients ck
  from polygon.
  
  Args:
      polygon (ndarray): An input polygon.
      fourier_degree (int): The maximum Fourier degree K.
  Returns:
      c (ndarray(complex)): Fourier coefficients.
docstr_tok: ["Perform","Fourier","transformation","to","generate","Fourier","coefficients","ck","from","polygon",".","Args",":","polygon","(","ndarray",")",":","An","input","polygon",".","fourier_degree","(","int",")",":","The","maximum","Fourier","degree","K.","Returns",":","c","(","ndarray","(","complex",")",")",":","Fourier","coefficients","."]
code: def poly2fourier(self, polygon, fourier_degree):
      """Perform Fourier transformation to generate Fourier coefficients ck
      from polygon.
  
      Args:
          polygon (ndarray): An input polygon.
          fourier_degree (int): The maximum Fourier degree K.
      Returns:
          c (ndarray(complex)): Fourier coefficients.
      """
      points = polygon[:, 0] + polygon[:, 1] * 1j
      c_fft = fft(points) / len(points)
      c = np.hstack(
          (c_fft[-fourier_degree:], c_fft[: fourier_degree + 1])
      )
      return c
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 10 for calling the FCENetTargets obj's underlying member method code with example usage: obj.poly2fourier(polygon, fourier_degree) and returns: c