OpenCV part - 07 |Opencv Image Resizing with downscale and upscale with example| MUST WATCH |
Автор: Study2Share
Загружено: 2024-04-20
Просмотров: 51
Описание:
OpenCV part - 07 |Opencv Image Resizing with downscale and upscale with example| MUST WATCH |
CODE:
#Choice of Interpolation Method for Resizing:
#cv2.INTER_AREA: This is used when we need to shrink an image.
#cv2.INTER_CUBIC: This is slow but more efficient.
#cv2.INTER_LINEAR: This is primarily used when zooming is required.
#This is the default interpolation technique in OpenCV.
import cv2
import numpy as np
image = cv2.imread('pexels-photo-221284.webp')
cv2.imshow('Original Image', image)
cv2.waitKey()
downscale the image
down_width = 300
down_height = 200
down_points = (down_width, down_height)
new = cv2.resize(image, down_points, interpolation= cv2.INTER_LINEAR)
upscale the image
up_width = 1000
up_height = 800
up_points = (up_width, up_height)
new1 = cv2.resize(image, up_points, interpolation= cv2.INTER_LINEAR)
cv2.imshow('Resized Down', new)
cv2.waitKey()
cv2.imshow('Resized Up',new1)
cv2.waitKey()
cv2.destroyAllWindows()
🎓 Subscribe & Stay Tuned:
👍 Like, Share, and Comment:
🔗 Connect with us:
OpenCV Playlist: • Computer Vision with OpenCV | Study2Share
Python Playlist : • Python Programming Essentials | Study2Shar...
Visit My YouTube channel : https://www.youtube.com/ @Study2Share
Thank you for watching.
-----------------------------------------------------------
Like - Share - Comment - Subscribe.
------------------------------------------------------------
#python #programming #numpy #pythonprogramming #pythontutorial #pythonbasics #pythondatatypes #pythonforbeginners #pythonbeginner #python3 #pythonadvanced #python #pythonexamples #pythonexercises #programming #programmingpython #pythondevelopers #pythondevelopment #pythondeveloper #pythonseries #pythonmastery #pythonmodule #pythonfunction #pythonmethods #pythondictionary #pythonkey #pythonvalue #pythoncoder #pythoncode #top10 #study2share #studytwoshare #studyshare #study #share #pratik #shah #opencv #opencvpython #education #educational #mobilebusinesseducation #homeeducation #highereducation #specialeducation #educationiskey #educationmatters #educationfirst #earlyeducation #selfeducation #educationforall #onlineeducation #educationispower #specialeducationteacher
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: