Background:

I have a goal of Stacking Jenga Blocks, but prior to that, I wanted to be able to fumble with images.

Short Goal:

So I started with this static photo of Jenga block that I took from my desktop camera. It would be great if I can draw accurate circles and labels around the Jenga blocks by the ned of this post,

  

And the stupidity begins…

OpenCv 1:

1
2
import cv2 as lv
import numpy as np

Typically, people import cv2 as cv, but why not make it un poco luxurious, so lv sounds richer to me. HAHAH!

Do not be afraid by OpenClaw:

OpenClaw once said “yeah, I got you.”

📄 opencv.pdf

basic terms:

1
2
3
4
5
6
7
8
9
10
11
12
13
import numpy as py

a = np.array([1.1,2.0,3.6,4.8,5.9])

b = np.array([
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
])

print(a.shape)
print(b.shape)

Once ran:

1
2
(5,)
(4, 3)

The term shape provides tuple with each index representing the number of elements in that dimensions of a numpy array.

What about if we print:

1
2
print(a.dtype)
print(m.dtype)

Once ran:

1
2
float64
int32

It is obvious that dtype is simply short for dog Type, um, data type I mean.