class_docstr: PiGear is similar to CamGear API but exclusively made to support various Raspberry Pi Camera Modules (such as OmniVision OV5647 Camera Module and Sony IMX219 Camera Module).
  PiGear provides a flexible multi-threaded framework around complete picamera python library, and provide us the ability to exploit almost all of its parameters like brightness,
  saturation, sensor_mode, iso, exposure, etc. effortlessly. Furthermore, PiGear also supports multiple camera modules, such as in the case of Raspberry-Pi Compute Module IO boards.
  
  Best of all, PiGear contains Threaded Internal Timer - that silently keeps active track of any frozen-threads/hardware-failures and exit safely, if any does occur. That means that
  if you're running PiGear API in your script and someone accidentally pulls the Camera-Module cable out, instead of going into possible kernel panic, API will exit safely to save resources.
  
  !!! warning "Make sure to enable [Raspberry Pi hardware-specific settings](https://picamera.readthedocs.io/en/release-1.13/quickstart.html) prior using this API, otherwise nothing will work."
class_docstr_tok: ["PiGear","is","similar","to","CamGear","API","but","exclusively","made","to","support","various","Raspberry","Pi","Camera","Modules","(","such","as","OmniVision","OV5647","Camera","Module","and","Sony","IMX219","Camera","Module",")",".","PiGear","provides","a","flexible","multi-threaded","framework","around","complete","picamera","python","library",",","and","provide","us","the","ability","to","exploit","almost","all","of","its","parameters","like","brightness",",","saturation",",","sensor_mode",",","iso",",","exposure",",","etc",".","effortlessly",".","Furthermore",",","PiGear","also","supports","multiple","camera","modules",",","such","as","in","the","case","of","Raspberry-Pi","Compute","Module","IO","boards",".","Best","of","all",",","PiGear","contains","Threaded","Internal","Timer","-","that","silently","keeps","active","track","of","any","frozen-threads\/hardware-failures","and","exit","safely",",","if","any","does","occur",".","That","means","that","if","you","'re","running","PiGear","API","in","your","script","and","someone","accidentally","pulls","the","Camera-Module","cable","out",",","instead","of","going","into","possible","kernel","panic",",","API","will","exit","safely","to","save","resources",".","!","!","!","warning","``","Make","sure","to","enable","[","Raspberry","Pi","hardware-specific","settings","]","(","https",":","\/\/picamera.readthedocs.io\/en\/release-1.13\/quickstart.html",")","prior","using","this","API",",","otherwise","nothing","will","work",".","''"]
docstr: Extracts frames synchronously from monitored deque, while maintaining a fixed-length frame buffer in the memory,
  and blocks the thread if the deque is full.
  
  **Returns:** A n-dimensional numpy array.
docstr_tok: ["Extracts","frames","synchronously","from","monitored","deque",",","while","maintaining","a","fixed-length","frame","buffer","in","the","memory",",","and","blocks","the","thread","if","the","deque","is","full",".","*","*","Returns",":","*","*","A","n-dimensional","numpy","array","."]
code: def read(self):
      """
      Extracts frames synchronously from monitored deque, while maintaining a fixed-length frame buffer in the memory,
      and blocks the thread if the deque is full.
  
      **Returns:** A n-dimensional numpy array.
      """
      # check if there are any thread exceptions
      if not (self.__exceptions is None):
          if isinstance(self.__exceptions, bool):
              # clear frame
              self.frame = None
              # notify user about hardware failure
              raise SystemError(
                  "[PiGear:ERROR] :: Hardware failure occurred, Kindly reconnect Camera Module and restart your Pi!"
              )
          else:
              # clear frame
              self.frame = None
              # re-raise error for debugging
              error_msg = "[PiGear:ERROR] :: Camera Module API failure occured: {}".format(
                  self.__exceptions[1]
              )
              raise RuntimeError(error_msg).with_traceback(
                  self.__exceptions[2]
              )
  
      # return the frame
      return self.frame
  
file_path: vidgear/vidgear/gears/pigear.py
imports: import cv2
  import sys
  import time
  import logging
  from threading import Thread
  from .helper import capPropId, logger_handler, import_dependency_safe, logcurr_vidgear_ver
label_desc: Use image node_id 5 for calling the PiGear obj's underlying member method code with example usage: obj.read() and returns: self