こんにちは。Heavy metal is very very healthyです。ナビタイムジャパンでAIやコンピュータビジョンを用いた研究開発を担当しています。 この記事では、PythonとOpenCVでコンピュータビジョンを使った画像から信号機の色を認識する手法を紹介したいと思います。
OpenCVで任意の色を抽出する処理についてまとめました。 ・Python 3.7 「HSV」は、色相(Hue)、彩度(Saturation)、明度(Value)の3つの成分からなる色空間です。 ・色相 (H): 色の種類(赤青緑など) ・彩度 (S): 色の鮮やかさ。 ・明度 (V) : 色の明るさ。 照明条件が変わっ ...
#Construct masks for the three colours, then perform a series of dilations and erosions to remove small areas left in the mask green_mask = cv2.inRange(hsv, greenLower, greenUpper) green_mask = ...
OpenCV's interactive GUI receives inputs from the user through windows by creating trackbars and reading mouse movements and keyboard taps. OpenCV allows real-time user interaction through a graphical ...