kdajskdjla alsdklsa For more articles Subscribe and follow my blog and me. If you have doubts in expanding and exploring research with this article kindly send me mail( balakawshik2000@gmail.com ) regarding your doubt. I am open to clarify. Attribution: Some Images were taken from unsplash.com Under a free license scheme. Images were used with proper attribution in the ALT tag of every Image. Remaining Images were created by me using( draw.io ) and I declare them as Open Source and Attribution is not mandatory.
Introduction
Lose less Video Compression (LVC) is an Intraframe compression technique. This article deals with Compression Visual Video that contains frames. Hearable Audio in the Video is best omitted and will be dealt in another article.
Photo by Markus Spiske on Unsplash
Algorithm
- Read Video and Focus of Visuals.
- Read Frame.
- Each frame having Width and Height (Consider 1280 x 720 pixels).
- Now each pixel is having having RGB color value ranges from 0 to 255 in the format (R,G,B) Example: (255,0,0) - RED / R.
- If you store 255,0,0 the same in mp4 file then it will took around 5 bytes But using this technique you are going to replace the 255 with its ascii equivalent.
Coding in Python
import cv2
import numpy as np
cap = cv2.VideoCapture('/content/cartoon.mp4')
if (cap.isOpened()== False):
print("Error opening video stream or file")
while(cap.isOpened()):
ret, frame = cap.read()
if ret == True:
f=frame[130][120]
print(f)
for i in f:
print(chr(i),end=' ')
For more articles Subscribe and follow my blog and me. If you have doubts in expanding and exploring research with this article kindly send me mail( balakawshik2000@gmail.com ) regarding your doubt. I am open to clarify.
Attribution:
Images were taken from unsplash.com
Under a free license scheme. Images were used with proper attribution in the ALT tag of every Image and below the image as well.
Comments
Post a Comment