CV01 — Introduction

Iris
Sep 19, 2021

--

  • OpenCV 顏色模式的默認設置是 “BGR” 的順序
  • Matplotlib 顏色模式設置是 “RGB” 的順序

Grayscale

>>通過黑色和白色的強度表示圖像和形態只有一個通道
>> 要查看 “灰度” 圖像需要將顏色模式轉換為灰色

HSV 和 HLS

>>具有三維表示,並且更類似於人類感知的方式
>> HSV 代表色調,飽和度和價值
>> HSL 代表色調,飽和度和亮度

圖像的基本操作

  • 繪製線條
    cv2.line(image, startPoint, endPoint, rgb, thinkness)
  • 繪製一個矩形
    cv2.rectangle(image, topLeft, bottomRight, rgb, thinkness)
  • 繪製一個圓
    cv2.circle(image, center, radius, rgb, thinkness)
  • 繪製一個橢圓
    cv2.ellipse(image, center, axes, angle, startAngle, endAngle, rgb, thinkness)

--

--

Iris

Machine/Deep Learning, Image Processing and Computer Vision