Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

How can I fit and then overlay 2 images which have different resolution ?

$
0
0
One represents has a mesh, which is supposed to overlay the Layer1 . I didn't find how can I do this using the opencv. I know that is possible change image resolution, however, I don't know how to fit both images This is the main image: ![image description](https://dl.dropboxusercontent.com/u/710615/Layer1.png) I have this one, which has the correct mesh to the image above: ![image description](https://dl.dropboxusercontent.com/u/710615/image_refined77.png) The code to change resolution is more or less this : #!/usr/bin/python import cv2 from matplotlib import pyplot as plt import numpy as np img1 = cv2.imread('transparency.jpg') img2 = cv2.imread('La1.png') row1,cols1, ch1 = img1.shape row2,cols2, ch2 = img2.shape res = cv2.resize(img2, None , fx = (1.* row1 /row2 ), fy =(1.* cols1 /cols2 ), interpolation = cv2.INTER_CUBIC)

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>