Ask Your Question

Revision history [back]

Two steps are needed to succeed

  1. Calculate contours using the findContours function.
  2. Calculate the moments using the moments function, which gives you the mass center of your black pixels.