Chapter V Drawing
we can define our images manually using NumPy arrays.
canvas = np.zeros((300,300,3),dtype = "uint8")

red后面的3是line的thickness,因为是用matplotlib画,red应该是(255,0,0)


我感觉指定了thickness至少为2 才能画出来,改成green,2就画出来了


感觉画的不给力啊,是jupyter的原因吗?
进行abstract drawing

https://ppao.pyimagesearch.com/lessons/ppao-chapter-5-drawing/ 来康康扩展包
有个很关键的问题:
Why are we bothering learning how to draw rectangles, circles, and lines in a book on computer vision and image processing?
Isn’t the point of computer vision to write software thatunderstands the contents of an image? And if so, why in the world do we need to know how todraw various shapes on images?
答案是 these operations allow us to draw Regions of Interest (ROIs) surrounding objects in an image.
While OpenCV’s drawing functions may not havedirectly helped us locate, detect, or recognize an object in an image, they did allow us to visualize the results, which is still part of our image processing/computer vision pipeline.
Because of this, it’s important to understand basic drawing functions. Once you start working with more advanced computer vision algorithms, you’ll need a method to visualize your results — and drawing functions are how you will accomplish this.
后面的assignment:

我的代码:

答案的代码:

网友评论