Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cropping image google colab

# for google colab use cv2_imshow instead
# change x, y, h ,w to the values you are happy with
import cv2
img = cv2.imread("lenna.png")
crop_img = img[y:y+h, x:x+w]
cv2.imshow("cropped", crop_img)
cv2.waitKey(0)
Comment

PREVIOUS NEXT
Code Example
Python :: download files from url in flask 
Python :: how to delete all elements of a list in python 
Python :: error: not well-formed (invalid token) 
Python :: python split string with a seperator 
Python :: class inside class python 
Python :: import matplotlib pyplot as plt 
Python :: python keyboard input 
Python :: dict to string 
Python :: print all variables jupyter notebook 
Python :: SUMOFPROD1 
Python :: python3 call parent constructor 
Python :: How to sort a Python dict by value 
Python :: print all elements in list python 
Python :: radix sort strings python 
Python :: arrays in python 
Python :: example of break statement in python 
Python :: create Pandas Data Frame in Python 
Python :: Python 3 program to find factorial of given number 
Python :: bubblesort python 
Python :: how to use information from env variables in python 
Python :: Read excel formula value python openpyxl 
Python :: pandas list comprehension 
Python :: df.loc a list of index 
Python :: how to replace a string in py 
Python :: #find the difference in days between two dates. 
Python :: dtype function with example 
Python :: pandas removing outliers from dataframe 
Python :: pip config proxy 
Python :: print only strings in list python 
Python :: Install Pip 2 on ubuntu linux 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =