Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to crop image read by opencv

# Import packages
import cv2 as cv
import numpy as np
 
img = cv.imread('test.jpg')
print(img.shape) # Print image shape
cv.imshow("original", img)
 
# Cropping an image
cropped_image = img[80:280, 150:330]
Comment

PREVIOUS NEXT
Code Example
Python :: yaml documentation 
Python :: python geopandas read layer from gdb 
Python :: Another example: using a colorbar to show bar height 
Python :: find mising number in O(n) 
Python :: bulk upload with dictionary or list in django moels 
Python :: flask get summernote text 
Python :: jama python rest api 
Python :: f2 polar or nonpolar 
Python :: cvhaardetectobjects 
Python :: how to put words into list 
Python :: dask dataframe csv tutorial 
Python :: who is bayceee roblox id 
Python :: spyder - identation 
Python :: py3 dict values 
Python :: response object has no code 
Python :: discord.py assign role 
Python :: ya mom 
Python :: fibbonacci python 
Python :: removing stop words in python 
Python :: atan of number python 
Python :: with open("[Followed][{}]".format(self.username), "a+") as flist: 
Python :: disable network on pytest 
Python :: How to make boxplot using seaborne 
Python :: finda argument index 
Python :: pg_config for django_heroku 
Python :: convert a python object and store it in a JSON file in the local system 
Python :: uri beecrowd problem 1047 Game Time with Minutes 
Python :: Realtime-yahoo-stock_price 
Python :: Count the data points based on columns 
Python :: Set symmetric Using the Symmetric Difference Operator (^) Method 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =