用contour绘制轮廓线时,我在书上看到的一行代码
contour(xx,origin = 'image'
请问里面的这个origin是什么参数,我不添加这个参数后,我得到的灰度图就上下颠倒了。
在countour函数里面的解释:
origin : {'upper', 'lower'}, default: :rc:`image.origin`
Place the [0, 0] index of the array in the upper left or lower
left corner of the axes. The convention (the default) 'upper' is
typically used for matrices and images.
Note that the vertical axes points upward for 'lower'
but downward for 'upper'.
See the :doc:`/tutorials/intermediate/imshow_extent` tutorial for
examples and a more detailed description.
也就是说matlab默认是lower,也就是左下角开始[0,0],但是图像是从左上角开始的[0,0],估计就是应为这个所以你的图像是颠倒的
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632