Help us understand the problem. What is going on with this article?

opencvのcvtColorで遊んでみた

More than 1 year has passed since last update.

画像にはRGBやグレースケール、HSVなどいろいろな形式?で表せる。
それを一発でそれぞれに変換できるopencvのcvtColorなるもので、わが大学の世界一おいしい学食を変換して遊んでみた。

元画像がこれ(RGB)

グレースケール

img = cv2.imread('butamiso.jpg')
img_gs = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

めっちゃ趣でた

YCrCb

img_ycrcb = cv2.cvtColor(img, cv2.COLOR_BGR2YCrCb)

ゴミみたい

HSV

img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)

カビが生えたみたい

XYZ

img_xyz = cv2.cvtColor(img, cv2.COLOR_BGR2XYZ)

とにかくやばい。宇宙人が食べていそう。

まとめ

特に意味のないことをやっていた。
この中で使うのってグレースケール変換くらいなのかな?

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away