# How to use opencv for sub-pixel edge detection

**URL:** <https://forum.opencv.org/t/how-to-use-opencv-for-sub-pixel-edge-detection/19562>\
**Category:** Python\
**Created:** [December 18, 2024, 10:31am UTC](https://forum.opencv.org/t/how-to-use-opencv-for-sub-pixel-edge-detection/19562 "2024-12-18T10:31:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbcuaischo](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hbcuaischo](https://forum.opencv.org/u/hbcuaischo)\
**Post date:** [December 18, 2024, 10:31am UTC](https://forum.opencv.org/t/how-to-use-opencv-for-sub-pixel-edge-detection/19562/1 "2024-12-18T10:31:28Z")

</div>

![83101](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/d/d14693c11d90aa14694e7697ad650054477441a4.png)

The object I want to detect is a circular hole. I use the Canny function and the HoughCircles function to find its edge contour, but this is a pixel-level contour. Is there any way to get the sub-pixel level contour?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 19, 2024, 10:05am UTC](https://forum.opencv.org/t/how-to-use-opencv-for-sub-pixel-edge-detection/19562/2 "2024-12-19T10:05:15Z")

</div>

[crosspost](https://meta.stackoverflow.com/a/266159) or maybe a fellow student asked this too?

[https://stackoverflow.com/staging-ground/79293027](https://stackoverflow.com/staging-ground/79293027)

(staging ground)

---

<div class="post-metadata">

**Author:** ![hbcuaischo](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hbcuaischo](https://forum.opencv.org/u/hbcuaischo)\
**Post date:** [December 20, 2024, 1:49am UTC](https://forum.opencv.org/t/how-to-use-opencv-for-sub-pixel-edge-detection/19562/3 "2024-12-20T01:49:19Z")

</div>

Yes, I first raised this question on this forum, but no one answered me 😞 😞 😞
