Open CV-Lab Session
OBJECTIVE
To get a familiar Image Total number of Pixel
Task # Extract The total
number of pixels from the image
Task
Description: In this task students will learn how to extract the
total number of image pixels and their types.
Source code
#to extract image totla number of pixel
# import cv library
import cv2 img=cv2.imread("2.jpg",1) #use imread function to get image print(img.shape) #using print function we can print image pixel in sence length width print("total number of pixel ",img.size) # total number of pixel cv2.imshow('output',img) cv2.waitKey(0) # to hold the scree
OutPut

0 Comments