Ask Your Question

Revision history [back]

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

click to hide/show revision 2
No.2 Revision

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

Here is the result I got for the image above

image description

image description

image description

click to hide/show revision 3
No.3 Revision

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

Here is the result I got for the image above

image description

image description

image description

click to hide/show revision 4
No.4 Revision

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Here is the result I got for the image above

image description

image description

image description

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Here is the result I got for the image above

image description

image description

image description

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Here is the result got for the image above

image description

image description

image description

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.html

You can use OpenCV contour processing to achieve the result. You may need to do the following on the input image.

  • Smooth image to remove the noise
  • Threshold the image to process contour
  • FindContours to get all contour
  • Get moment and Centroid of the contour
  • Calculate centre using moment.

This Blog post explain how the above can achieve.

Here is the result got for the image above

image description

image description

image description

Reference: https://sourcecodezoneseven.blogspot.com/2019/05/opencv-contour-and-centroid-using.htmlhttps://scode7.blogspot.com/2019/05/opencv-contour-and-centroid-using.html