import numpy as np import cv2 img = cv2.imread('messi5.jpg') print(img.shape) #returns a tuple of number of rows, columns, and channels print(img.size) # returns total number of pixels is accessed print(img.dtype) # returns image datatype is obtained b,g,r = cv2.split(img) img = cv2.merge((b,g,r)) ball = img[280:340, 330:390] img[273:333, 100:160] = ball cv2.imshow('image', img) cv2.waitKey(0) cv2.destroyAllWindows()
Popular Posts
-
import numpy as np import cv2 as cv from matplotlib import pyplot as pit img = cv.imread( "lena.jpg" ) #img = np.zeros...
-
An activity can remove itself from the history stack by calling Activity.finish() on itself, or the activity that opened the screen can cal...
-
import numpy as np import cv2 img = cv2.imread( 'opencv-logo.png' ) imgray = cv2.cvtColor(img , cv2.COLOR_BGR2GRAY) ret ,...
May 22, 2020
ROI(Region of interest) - python
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment