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
-
Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName()); i.addFla...
-
To write log messages from your application: Import android.util.Log . Use Log.v() , Log.d() , Log.i() , Log.w() , or Log.e() to log ...
-
original image: import cv2 as cv import numpy as np img = cv.imread( 'sudoku.png' , 0 ) _ , th1 = cv.threshold(img ,...
May 22, 2020
ROI(Region of interest) - python
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment