gpt4 book ai didi

使图像在框架中居中

转载 作者:太空宇宙 更新时间:2023-11-03 23:03:36 26 4
gpt4 key购买 nike

我正在尝试将图像置于框架中,如下所示。我正在使用 openCV 和 C。我在 openCV 中搜索了线性变换和移位函数,但到目前为止一无所获。谁能告诉我要使用哪些功能才能达到第二张图片中的效果?我将不胜感激。 video frame both before and after centring

最佳答案

您看过转换吗?

http://opencv.willowgarage.com/documentation/python/operations_on_arrays.html#transform

Transform(src, dst, transmat, shiftvec=NULL) → None¶

Performs matrix transformation of every array element.
Parameters:

src (CvArr) – The first source array
dst (CvArr) – The destination array
transmat (CvMat) – Transformation matrix
shiftvec (CvMat) – Optional shift vector

关于使图像在框架中居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9406357/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com