# Why opencv cannot detect 10x8 chessboard, but 9x6, 8x8 is working find

**URL:** <https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950>\
**Category:** Uncategorized\
**Created:** [April 25, 2023, 4:31pm UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950 "2023-04-25T16:31:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chong\_yoe\_yat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chong_yoe_yat/32/7761_2.png) [@chong\_yoe\_yat](https://forum.opencv.org/u/chong_yoe_yat)\
**Post date:** [April 25, 2023, 4:31pm UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/1 "2023-04-25T16:31:48Z")

</div>

ret, corners = cv2.findChessboardCorners(gray, chessboard\_size, None)

![chessboard_10x8](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/8/859345fa6bfe49a69fba64912a12dad2a0ffd65d.png)

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [April 26, 2023, 4:54am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/2 "2023-04-26T04:54:56Z")

</div>

no idea, why it does not find your 10x8 board there,

however, if you want to use it for calibration or similar,  
it needs one odd and one even side, like 9x6, 11x8, etc. to avoid symmetry problems  
(rotate your board 90°, 180° , and you’ll see !)

---

<div class="post-metadata">

**Author:** ![chong\_yoe\_yat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chong_yoe_yat/32/7761_2.png) [@chong\_yoe\_yat](https://forum.opencv.org/u/chong_yoe_yat)\
**Post date:** [April 26, 2023, 4:56am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/3 "2023-04-26T04:56:45Z")

</div>

understood, now I using 9x6 just wondering how this happen.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [April 26, 2023, 4:59am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/4 "2023-04-26T04:59:36Z")

</div>

> [@chong\_yoe\_yat](#):
>
> ![chessboard_10x8](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/8/859345fa6bfe49a69fba64912a12dad2a0ffd65d.png)

just try to ‘mark the image’ here, and you see, it does not have any white borders !  
you need a ‘quiet zone’ , \>= 1 square size around it

---

<div class="post-metadata">

**Author:** ![chong\_yoe\_yat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chong_yoe_yat/32/7761_2.png) [@chong\_yoe\_yat](https://forum.opencv.org/u/chong_yoe_yat)\
**Post date:** [April 26, 2023, 5:14am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/5 "2023-04-26T05:14:31Z")

</div>

ok, it works!

 ![10x8_detected](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/5/5112469c2d325fc42b264f7cafa5eb140a9ae1e9.png)

---

<div class="post-metadata">

**Author:** ![chong\_yoe\_yat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chong_yoe_yat/32/7761_2.png) [@chong\_yoe\_yat](https://forum.opencv.org/u/chong_yoe_yat)\
**Post date:** [April 26, 2023, 5:15am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/6 "2023-04-26T05:15:02Z")

</div>

![8x8_detected](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/c/c455a949e7a5cf7034876fcf71743aac255f7211.png)  
interestingly 8x8 is able to do it, anything different in math?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [April 26, 2023, 5:18am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/7 "2023-04-26T05:18:27Z")

</div>

> [@chong\_yoe\_yat](#):
>
> interestingly 8x8 is able to do it,

sure, it will _find_ the grid.  
the maths problems arise, if you try to derive the _pose_ from it, later

---

<div class="post-metadata">

**Author:** ![chong\_yoe\_yat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chong_yoe_yat/32/7761_2.png) [@chong\_yoe\_yat](https://forum.opencv.org/u/chong_yoe_yat)\
**Post date:** [April 26, 2023, 5:30am UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/8 "2023-04-26T05:30:11Z")

</div>

thank you for prompt help. I try understand the algorithm

---

<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:** [April 26, 2023, 12:12pm UTC](https://forum.opencv.org/t/why-opencv-cannot-detect-10x8-chessboard-but-9x6-8x8-is-working-find/12950/9 "2023-04-26T12:12:48Z")

</div>

there must be white (blank paper) around the pattern.

only internal nodes count.

your first picture counts as 9 by 7.
