class_docstr: Class that performs gesture recognition on images.
class_docstr_tok: ["Class","that","performs","gesture","recognition","on","images","."]
docstr: Performs gesture recognition on the provided video frame.
  
  Only use this method when the GestureRecognizer is created with the video
  running mode.
  
  Only use this method when the GestureRecognizer is created with the video
  running mode. It's required to provide the video frame's timestamp (in
  milliseconds) along with the video frame. The input timestamps should be
  monotonically increasing for adjacent calls of this method.
  
  Args:
    image: MediaPipe Image.
    timestamp_ms: The timestamp of the input video frame in milliseconds.
    image_processing_options: Options for image processing.
  
  Returns:
    The hand gesture recognition results.
  
  Raises:
    ValueError: If any of the input arguments is invalid.
    RuntimeError: If gesture recognition failed to run.
docstr_tok: ["Performs","gesture","recognition","on","the","provided","video","frame",".","Only","use","this","method","when","the","GestureRecognizer","is","created","with","the","video","running","mode",".","Only","use","this","method","when","the","GestureRecognizer","is","created","with","the","video","running","mode",".","It","'s","required","to","provide","the","video","frame","'s","timestamp","(","in","milliseconds",")","along","with","the","video","frame",".","The","input","timestamps","should","be","monotonically","increasing","for","adjacent","calls","of","this","method",".","Args",":","image",":","MediaPipe","Image",".","timestamp_ms",":","The","timestamp","of","the","input","video","frame","in","milliseconds",".","image_processing_options",":","Options","for","image","processing",".","Returns",":","The","hand","gesture","recognition","results",".","Raises",":","ValueError",":","If","any","of","the","input","arguments","is","invalid",".","RuntimeError",":","If","gesture","recognition","failed","to","run","."]
code: def recognize_for_video(
      self,
      image: image_module.Image,
      timestamp_ms: int,
      image_processing_options: Optional[
          _ImageProcessingOptions
      ] = None,
  ) -> GestureRecognizerResult:
      """Performs gesture recognition on the provided video frame.
  
      Only use this method when the GestureRecognizer is created with the video
      running mode.
  
      Only use this method when the GestureRecognizer is created with the video
      running mode. It's required to provide the video frame's timestamp (in
      milliseconds) along with the video frame. The input timestamps should be
      monotonically increasing for adjacent calls of this method.
  
      Args:
        image: MediaPipe Image.
        timestamp_ms: The timestamp of the input video frame in milliseconds.
        image_processing_options: Options for image processing.
  
      Returns:
        The hand gesture recognition results.
  
      Raises:
        ValueError: If any of the input arguments is invalid.
        RuntimeError: If gesture recognition failed to run.
      """
      normalized_rect = self.convert_to_normalized_rect(
          image_processing_options, image, roi_allowed=False
      )
      output_packets = self._process_video_data(
          {
              _IMAGE_IN_STREAM_NAME: packet_creator.create_image(
                  image
              ).at(timestamp_ms * _MICRO_SECONDS_PER_MILLISECOND),
              _NORM_RECT_STREAM_NAME: packet_creator.create_proto(
                  normalized_rect.to_pb2()
              ).at(timestamp_ms * _MICRO_SECONDS_PER_MILLISECOND),
          }
      )
  
      if output_packets[_HAND_GESTURE_STREAM_NAME].is_empty():
          return GestureRecognizerResult([], [], [], [])
  
      return _build_recognition_result(output_packets)
  
imports: import dataclasses
  from typing import Callable, Mapping, Optional, List
  from mediapipe.framework.formats import classification_pb2
  from mediapipe.framework.formats import landmark_pb2
  from mediapipe.python import packet_creator
  from mediapipe.python import packet_getter
  from mediapipe.python._framework_bindings import image
  from mediapipe.python._framework_bindings import packet
  from mediapipe.tasks.cc.vision.gesture_recognizer.proto import gesture_recognizer_graph_options_pb2
  from mediapipe.tasks.python.components.containers import category
  from mediapipe.tasks.python.components.containers import landmark
  from mediapipe.tasks.python.components.processors import classifier_options
  from mediapipe.tasks.python.core import base_options
  from mediapipe.tasks.python.core import task_info
  from mediapipe.tasks.python.core.optional_dependencies import doc_controls
  from mediapipe.tasks.python.vision.core import base_vision_task_api
  from mediapipe.tasks.python.vision.core import image_processing_options
  from mediapipe.tasks.python.vision.core import vision_task_running_mode
label_desc: Use image node_id 4 for calling the GestureRecognizer obj's underlying member method code with example usage: obj.recognize_for_video(image, timestamp_ms, image_processing_options) and returns: _build_recognition_result, GestureRecognizerResult