Daffodil International University

IT Help Desk => Internet => Topic started by: mnsalim on April 13, 2019, 02:34:11 AM

Title: How to manipulate Image in Python Programming Language
Post by: mnsalim on April 13, 2019, 02:34:11 AM
To manipulate Image in Python you need to have OpenCV. Using openCV for python you can read an image, display an image and change that. You will find the tutorials on how to install OpenCV in the below links:
https://medium.com/@shachindra/installing-opencv3-4-with-python3-on-windows10-5511e3323a0 (https://medium.com/@shachindra/installing-opencv3-4-with-python3-on-windows10-5511e3323a0)

After installing openCV. You have to run the following command to read and display an image using python:

Run command promt using windows+r
write cmd there and command promt will start
then type the followings:
python
import cv2
img = cv2.imread('image name with full path')
cv2.imshow('name', img)


That's all to display an image in a window named name :D