OpenCV resize image

OpenCV resize image

image = cv2.resize(src, dsize, fx, fy, interpolation) where: src    The file path in which the input image resides. dsize    The size of the output image, which adheres to the syntax (width, height). fx    The scale factor for the X axis. fy    The scale factor for the Y axis...

Read More →

OpenCV Convert Image into Sketch

OpenCV Convert Image into Sketch

import cv2 import numpy as np import scipy.ndimage image = cv2.imread('bull.png') def grayscale(rgb): # 2 dimensional array to convert image to sketch return np.dot( rgb[..., :3], [0.2989, 0.5870, 0.1140] ) def dodge(front, back): # if image is greater than 255 (which is not possible) it will convert it...

Read More →

Save the video stream from your camera using OpenCV

Save the video stream from your camera using OpenCV

OpenŠ”V offers great opportunities when working with video and images. For example, saving streaming video from a video camera in real time. All examples were written for OpenCV version 3.4.2 Example on python3.6.5: import cv2 # function video capture cameraCapture = cv2.VideoCapture(0) # rame rate or frames per second fps = 30 ...

Read More →

Search
Popular Posts
Subscribe
{{post}}