Skip to content

Motionanalysis

Auto-generated documentation for musicalgestures._motionanalysis module.

area

[find in source code]

def area(motion_frame, height, width):

centroid

[find in source code]

def centroid(image, width, height):

Computes the centroid and quantity of motion in an image or frame.

Arguments

  • image np.array(uint8) - The input image matrix for the centroid estimation function.
  • width int - The pixel width of the input video capture.
  • height int - The pixel height of the input video capture.

Returns

  • np.array(2) - X and Y coordinates of the centroid of motion.
  • int - Quantity of motion: How large the change was in pixels.