Skip to main content

Simple Hill Climbing Algorithm | Artificial Intelligence

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.

Lose less Video Compression | ASCII Conversion Technique

 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.
https://unsplash.com/photos/iar-afB0QQw

Algorithm

  1. Read Video and Focus of Visuals.
  2. Read Frame.
  3. Each frame having Width and Height (Consider 1280 x 720 pixels).
  4. 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.
  5. 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

Popular posts from this blog

Simple Hill Climbing Algorithm | Artificial Intelligence

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.

Issues in NLP | Artificial Intelligence | Teaching Article

  Linguistic Analysis Speech Written Language This article focuses on Written Language rather than Speech because speech could be transfigured into written form. Components in analysing Written Language Pronology : Analysing Sound / Pronunciation Morphology : Analysing Structure of Words. Example : books, booked, booking -> book, run, ran, running -> run Syntax : Grammar Semantics : Meaning of Strings and Interaction among them. Now coming to issues, Issues in Syntax "The dog ate my homework." - Who did what 1. Identify POS( Parts of Speech ) Tagging Dog : Noun, Ate : Verb, Homework : Noun Note: So far English POS tagging is up to 95% accurate but it also can be improvised. 2. Identify collocation mother in law, hot dog are single word. 3. Shallow Parsing Parse tree for the sentence "John loves Marry." 4. Anaphora Resolution The dog entered my home. It scared me. Here It refers to The dog in the first sentence. It must be resolved. 5. Preposition adjustm...

Hill Climbing Algorithm | Artificial Intelligence

Introduction Hill Climbing Algorithm comes under the heuristic search or informed search strategy which used to solve many types of AI problem such as block-world, water-jug, etc.,  In this article we are going to discuss about the usage, benefits and drawback of this algorithm. But we are going to focus only on How the algorithm works? rather than on How it is applied? This algorithm named according to its working. The algorithm works very similar to the person in the below image who always focuses on higher points to climb the hill (Goal) . Types of Hill Climbing Algorithm Simple Hill Climbing Algorithm Steepest Ascent Hill Climbing Algorithm Stochastic Hill Climbing Algorithm (Simulated Annealing is a topic related to Hill Climbing) General Working The Algorithm generally move up in the direction of higher values. IT breaks while moving up in the loop when it reaches the peak and no neighbour has a higher value. It doesn't maintain any search tree. It only looks for immediate ne...