开发者

is it possible to put an image inside another image and resize it always to a certain dimension?

开发者 https://www.devze.com 2023-03-02 19:40 出处:网络
I\'m using opencv. The problem is this: I have a window where I\'m displaying an Image A. I have an image B coming from a videocamera, that has every time different dimensions/resolutions. Is it poss

I'm using opencv. The problem is this:

I have a window where I'm displaying an Image A. I have an image B coming from a videocamera, that has every time different dimensions/resolutions. Is it possible to display this image (like paste it) in anothe开发者_如何学Cr image but always inside a certain area, auto-resizing it if too small or too big to that precise area (a rectangle)?

Cheers


Yes, if A has a ROI, then cvResize(B, A) will "paste" B into the ROI in A, scaling and stretching it to fit.

0

精彩评论

暂无评论...
验证码 换一张
取 消