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

Appearance settings

Commit c98ceb0

Browse filesBrowse files
committed
Create rgb.py
1 parent 63009e2 commit c98ceb0
Copy full SHA for c98ceb0

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Open diff view settings
Collapse file

‎opencv/image/rgb.py‎

Copy file name to clipboard
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
import cv2
3+
4+
def main():
5+
im = cv2.imread("test.jpg",0) # 画像をグレースケールで読み込み
6+
im = cv2.cvtColor(im, cv2.COLOR_GRAY2RGB) # グレースケール画像をRGB色空間に変換
7+
cv2.imshow("Show",im) # ウィンドウの表示
8+
cv2.waitKey(0)
9+
cv2.destroyAllWindows()
10+
11+
if __name__ == '__main__':
12+
main()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.