Python

Image Thresholding in OpenCV

There are various type of thresholding. We will discuss one by one: Simple Thresholding If pixel value less then threshold value then it is assigned one value else we will assign another value. For thresholding we will use cv2.threshold function. In this function we will pass four parameters: 1: Source image: Source image should be …

Image Thresholding in OpenCV Read More »

Python Functions ( lambda function, map function, filter function)

Function is a block of code which performs specific task. How to call a function What is lambda function? Lambda function is anonymous function. No function name when we use lambda function. Lambda function has many argument but we can define only single expressions. To define a lambda function we will use lambda keyword. Lambda …

Python Functions ( lambda function, map function, filter function) Read More »

Python String functions

Len Function Len function used to count character in string. mystring = “Hello World” print(len(mystring)) Output: 11 Lower function Lower function used to convert string in lower case. mystring = “Hello World” print(mystring lower()) Output: hello word   Upper function Upper  function used to convert string in upper case. mystring = “Hello World” print(mystring.upper()) Output: HELLO WORLD Find …

Python String functions Read More »