美文网首页
Practical Python and OpenCV iii

Practical Python and OpenCV iii

作者: 专注挖坑的汪 | 来源:发表于2020-02-28 20:58 被阅读0次

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就画出来了

后面指定-1的话就能画出个实心的 画⚪

感觉画的不给力啊,是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:

我的代码:

13行

答案的代码:

相关文章

网友评论

      本文标题:Practical Python and OpenCV iii

      本文链接:https://www.haomeiwen.com/subject/kserhhtx.html