class_docstr: The post process for SAST.
docstr: Estimate sample points number.
docstr_tok: ["Estimate","sample","points","number","."]
code: def estimate_sample_pts_num(self, quad, xy_text):
      """
      Estimate sample points number.
      """
      eh = (
          np.linalg.norm(quad[0] - quad[3])
          + np.linalg.norm(quad[1] - quad[2])
      ) / 2.0
      ew = (
          np.linalg.norm(quad[0] - quad[1])
          + np.linalg.norm(quad[2] - quad[3])
      ) / 2.0
  
      dense_sample_pts_num = max(2, int(ew))
      dense_xy_center_line = xy_text[
          np.linspace(
              0,
              xy_text.shape[0] - 1,
              dense_sample_pts_num,
              endpoint=True,
              dtype=np.float32,
          ).astype(np.int32)
      ]
  
      dense_xy_center_line_diff = (
          dense_xy_center_line[1:] - dense_xy_center_line[:-1]
      )
      estimate_arc_len = np.sum(
          np.linalg.norm(dense_xy_center_line_diff, axis=1)
      )
  
      sample_pts_num = max(2, int(estimate_arc_len / eh))
      return sample_pts_num
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import numpy
  from .locality_aware_nms import nms_locality
  import paddle
  import cv2
  import time
label_desc: Use image node_id 9 for calling the SASTPostProcess obj's underlying member method code with example usage: obj.estimate_sample_pts_num(quad, xy_text) and returns: sample_pts_num