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: Calculate Fourier signature from input polygon.
  
  Args:
        polygon (ndarray): The input polygon.
        fourier_degree (int): The maximum Fourier degree K.
  Returns:
        fourier_signature (ndarray): An array shaped (2k+1, 2) containing
            real part and image part of 2k+1 Fourier coefficients.
docstr_tok: ["Calculate","Fourier","signature","from","input","polygon",".","Args",":","polygon","(","ndarray",")",":","The","input","polygon",".","fourier_degree","(","int",")",":","The","maximum","Fourier","degree","K.","Returns",":","fourier_signature","(","ndarray",")",":","An","array","shaped","(","2k+1",",","2",")","containing","real","part","and","image","part","of","2k+1","Fourier","coefficients","."]
code: def cal_fourier_signature(self, polygon, fourier_degree):
      """Calculate Fourier signature from input polygon.
  
      Args:
            polygon (ndarray): The input polygon.
            fourier_degree (int): The maximum Fourier degree K.
      Returns:
            fourier_signature (ndarray): An array shaped (2k+1, 2) containing
                real part and image part of 2k+1 Fourier coefficients.
      """
      resampled_polygon = self.resample_polygon(polygon)
      resampled_polygon = self.normalize_polygon(resampled_polygon)
  
      fourier_coeff = self.poly2fourier(
          resampled_polygon, fourier_degree
      )
      fourier_coeff = self.clockwise(fourier_coeff, fourier_degree)
  
      real_part = np.real(fourier_coeff).reshape((-1, 1))
      image_part = np.imag(fourier_coeff).reshape((-1, 1))
      fourier_signature = np.hstack([real_part, image_part])
  
      return fourier_signature
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 12 for calling the FCENetTargets obj's underlying member method code with example usage: obj.cal_fourier_signature(polygon, fourier_degree) and returns: fourier_signature