User Tools

Site Tools


pegasus_cam_cv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pegasus_cam_cv [2019/03/08 04:33] dwallacepegasus_cam_cv [2019/03/08 04:37] (current) dwallace
Line 36: Line 36:
  
 To start, we import necessary libraries, most important being the Aruco library. To start, we import necessary libraries, most important being the Aruco library.
 +\\ 
 <code python> <code python>
 import sys import sys
Line 43: Line 43:
 import aruco import aruco
 </code> </code>
 +\\ 
 The main loop with comments can be seen below: The main loop with comments can be seen below:
 +\\ 
 <code python> <code python>
 if __name__ == '__main__': if __name__ == '__main__':
Line 99: Line 99:
         ret, frame = cap.read()         ret, frame = cap.read()
 </code> </code>
 +\\ 
 This code should produce a result similar to the video below. This code should produce a result similar to the video below.
 +\\ 
 {{ youtube>aLAa_pvDLho?large }} {{ youtube>aLAa_pvDLho?large }}
 \\  \\ 
Line 108: Line 108:
  
 This program is made to detect faces in the frame using the Haar Cascades as the face classifier. The code is implemented in Python, and the full code with comments explaining the usage can be seen below: This program is made to detect faces in the frame using the Haar Cascades as the face classifier. The code is implemented in Python, and the full code with comments explaining the usage can be seen below:
 +\\ 
 <code python> <code python>
 import numpy as np import numpy as np
Line 163: Line 163:
 cv2.destroyAllWindows() cv2.destroyAllWindows()
 </code> </code>
- +\\  
-After implemtnign the code above, you should get results similar to the video seen below. +After implementing the code above, you should get results similar to the video seen below. 
 +\\ 
 {{ youtube>HBtBz4uqVCI?large }} {{ youtube>HBtBz4uqVCI?large }}
 \\  \\ 
Line 173: Line 173:
 This program is used to track a red ball within the frame of the stream. This color can be modified in the code for other applications. It should be noted that this code shows an alternative way of import the Pegasus Cam stream into OpenCV by using a parameter for the http stream on the command line. With the use of parameter files, this would allow for a "global" variable that contains the location of any Pegasus Cam streams on a network. The full code with comments explaining the usage can be seen below. This program is used to track a red ball within the frame of the stream. This color can be modified in the code for other applications. It should be noted that this code shows an alternative way of import the Pegasus Cam stream into OpenCV by using a parameter for the http stream on the command line. With the use of parameter files, this would allow for a "global" variable that contains the location of any Pegasus Cam streams on a network. The full code with comments explaining the usage can be seen below.
  
 +\\ 
 <code python> <code python>
 # USAGE # USAGE
Line 283: Line 284:
 cv2.destroyAllWindows() cv2.destroyAllWindows()
 </code> </code>
 +\\ 
 After implementing the code above, you should get results similar to the video below. After implementing the code above, you should get results similar to the video below.
 +\\ 
 {{ youtube>fWTrsr3X_y0?large }} {{ youtube>fWTrsr3X_y0?large }}
 \\  \\ 
pegasus_cam_cv.txt · Last modified: 2019/03/08 04:37 by dwallace