code: def run(self, preview_frames_num=0):
      img_HD_prev = None
      frames_num = (
          preview_frames_num
          if 0 < preview_frames_num < self.m_frames
          else self.m_frames
      )
  
      print("frames_num: %d, running evaluation..." % frames_num)
      for idx in range(1, frames_num + 1):
          ret, frame = self.cap.read()
          if ret:
              frame = cv2.resize(frame, self.out_size)
              img_HD = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
              img_HD = np.array(img_HD / 255.0, dtype=np.float32)
  
              if img_HD_prev is None:
                  img_HD_prev = img_HD
  
              syneth, _, _ = self.synthesize(img_HD, img_HD_prev)
              result = np.array(
                  255.0 * syneth[:, :, ::-1], dtype=np.uint8
              )
              self.video_writer.write(result)
              if self.is_show:
                  show_img = np.concatenate([frame, result], 1)
                  h, w = show_img.shape[:2]
                  show_img = cv2.resize(
                      show_img, (720, int(720 / w * h))
                  )
                  cv2.imshow("preview", show_img)
                  k = cv2.waitKey(1)
                  if (k == 27) or (
                      cv2.getWindowProperty("preview", 0) == -1
                  ):
                      self.video_writer.release()
                      cv2.destroyAllWindows()
                      break
              print("processing: %d / %d ..." % (idx, frames_num))
  
              img_HD_prev = img_HD
  
          else:
              self.video_writer.release()
              cv2.destroyAllWindows()
              break
  
file_path: PaddleHub/modules/video/Video_editing/SkyAR/skyfilter.py
imports: import os
  import cv2
  import paddle
  import numpy
  from .skybox import SkyBox
label_desc: Use image node_id 3 for calling the SkyFilter obj's underlying member method code with example usage: obj.run(preview_frames_num) without return types