Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53a727f

Browse files
committed
img[y, x]
1 parent 7843b74 commit 53a727f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎ch01-关于OpenCV/OpenCV图像坐标系_test.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
cv2.imshow('src', img)
2828
cv2.moveWindow('src', 0, 0)
2929

30+
# read color values at position y, x
31+
y = 100
32+
x = 50
33+
(b, g, r) = img[y, x]
34+
# print color values to screen
35+
print('bgr:',b,g,r)
36+
3037
#先行后列
3138
img[100:100 + logo.shape[0], 300:300 + logo.shape[1]] = logo[:, :, 0:3]# 两张图片的shape不一样
3239
# img[10:10+logo.shape[0],30:30+logo.shape[1],:]=logo[:,:,0:3]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /