# Path: src/DroneVision/DroneVision_src/imgProcessing/frameTools/frameTools.py
# def GetShape(frame):
# 	'''
# 	 @brief Get shape of frame, regardless of depth dimension.
# 
# 	 @param frame 
# 	 
# 	 return (height, width)
# 	'''
# 	return frame.shape[:2]


import cv2
			import pyqtgraph as pg
from src.DroneVision.DroneVision_src.imgProcessing.frameTools.frameTools import GetShape
		return flag_reset

	def AddPQImagePlot(self, key_tag):
		'''
		 @brief Add image plot
		
		 @param key_tag
		'''
		self.AssertPQImageInititalized()
		self.__img_items[key_tag] 	= self.__pg.ImageItem(name=key_tag)
		self.__view_boxes[key_tag] 	= self.__pg.ViewBox(name=key_tag)
		self.__view_boxes[key_tag] 	= self.__win.addViewBox()
		self.__view_boxes[key_tag].addItem(item=self.__img_items[key_tag])

	def UpdatePQImage(self, frame, key_tag, process_events=True, rotate=True, autoDownsample=True):
		'''
		 @brief Plot image in real-time

		 @param frame
		 @param key_tag (also frame title)
		 @param process_events (True/False for processing new events (plotting new data))
		 @param rotate (True/False for rotating the image so that it is shown properly. (default=True))
		 @param autoDownsample (True/False (default=True))
		'''
		if not(self.__win_open):
			self.InitPQImage(title=self.__title)
		self.AssertPQImageInititalized()
		if not(key_tag in self.__img_items):
			self.AddPQImagePlot(key_tag)
		if rotate:

# Path: src/DroneVision/DroneVision_src/imgProcessing/frameTools/frameTools.py
# def GetShape(frame):
# 	'''
# 	 @brief Get shape of frame, regardless of depth dimension.
# 
# 	 @param frame 
# 	 
# 	 return (height, width)
# 	'''
# 	return frame.shape[:2]


# Path: src/DroneVision/DroneVision_src/hardware/PyQtImage.py
import cv2
			import pyqtgraph as pg
from src.DroneVision.DroneVision_src.imgProcessing.frameTools.frameTools import GetShape

		return flag_reset

	def AddPQImagePlot(self, key_tag):
		'''
		 @brief Add image plot
		
		 @param key_tag
		'''
		self.AssertPQImageInititalized()
		self.__img_items[key_tag] 	= self.__pg.ImageItem(name=key_tag)
		self.__view_boxes[key_tag] 	= self.__pg.ViewBox(name=key_tag)
		self.__view_boxes[key_tag] 	= self.__win.addViewBox()
		self.__view_boxes[key_tag].addItem(item=self.__img_items[key_tag])

	def UpdatePQImage(self, frame, key_tag, process_events=True, rotate=True, autoDownsample=True):
		'''
		 @brief Plot image in real-time

		 @param frame
		 @param key_tag (also frame title)
		 @param process_events (True/False for processing new events (plotting new data))
		 @param rotate (True/False for rotating the image so that it is shown properly. (default=True))
		 @param autoDownsample (True/False (default=True))
		'''
		if not(self.__win_open):
			self.InitPQImage(title=self.__title)
		self.AssertPQImageInititalized()
		if not(key_tag in self.__img_items):
			self.AddPQImagePlot(key_tag)
		if rotate:

			width, height = GetShape(frame)