Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Display an image over another image at a particular co-ordinates in openCV

import cv2
import numpy as np

img1 = cv2.imread('Desert.jpg')
img2 = cv2.imread('Penguins.jpg')

img3 = img1.copy()
# replace values at coordinates (100, 100) to (399, 399) of img3 with region of img2
img3[100:400,100:400,:] = img2[100:400,100:400,:]
cv2.imshow('Result1', img3)
Comment

PREVIOUS NEXT
Code Example
Python :: boto3.client python 
Python :: how to write a dataframe to s3 object in python 
Python :: seaborn boxplot legend color 
Python :: how to numbered jupyter notebook 
Python :: how to convert string to integer in python 
Python :: how to hide tkinter window 
Python :: edit models in django admin 
Python :: yml anaconda 
Python :: how to merge two column pandas 
Python :: adam optimizer keras learning rate degrade 
Python :: how to convert response to beautifulsoup object 
Python :: gyp err! stack error: command failed: c:python39python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3]; 
Python :: trim string to max length python 
Python :: list vs tuple python 
Python :: python spawn process 
Python :: rename colums dataframe pandas 
Python :: get files in directory and subdirectory 
Python :: python gaussian filter 
Python :: python list to dataframe as row 
Python :: To create a SparkSession 
Python :: doc strings python 
Python :: list to dataframe pyspark 
Python :: print output 
Python :: find index of element in array python 
Python :: how to append two pandas dataframe 
Python :: exit code python 
Python :: remove stopwords from a sentence 
Python :: authentication views django 
Python :: switch case dictionary python 
Python :: django email 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =