License plate removal with OpenCV

THIS is my small pet project, which I think can showcase a few somewhat creative ways of using OpenCV and image processing in general.


You’ve all heard about license plate recognition (heck, we have it on all speed cameras nowadays), but today we will take a look at another fun thing we can do with license plates — hide them from the preying eyes.

It’s not in my authority to explain why someone might want to remove the license plate from their car photos, if you’re interested go ahead google it on your own. From this point let’s just assume and agree that we want to do that.

I will be using Python and OpenCV to demonstrate how I did it, but the basic ideas behind it can be used in any other language/framework. Also I’d like to note that Python isn’t my “native” programming language so-to-say, and I apologize in advance for all the camelCase variable names you see, and some clumsiness in my code.

To break down the algorithm before we start coding:

  1. Detect where the license plate is located on our input image
  2. Approximate license plate’s background color
  3. Fill the license plate with the color we calculated

Let’s start by opening our image, we’ll take this beautiful RWB 911 as the main example here.

Image for post

We will need to open it as PIL image first, and then we can convert it to the OpenCV format:

from PIL import Image as imageMain
from PIL.Image import Image
import cv2
import numpy

imagePath = '../sample-images/1.jpg'
imagePil = imageMain.open(imagePath)
imageCv = cv2.cvtColor(numpy.array(imagePil), cv2.COLOR_RGB2BGR)
cv2.imshow('Original Image', imageCv)

Image for post

#image-processing #python #ai #opencv #computer-vision

What is GEEK

Buddha Community

License plate removal with OpenCV

License plate removal with OpenCV

THIS is my small pet project, which I think can showcase a few somewhat creative ways of using OpenCV and image processing in general.


You’ve all heard about license plate recognition (heck, we have it on all speed cameras nowadays), but today we will take a look at another fun thing we can do with license plates — hide them from the preying eyes.

It’s not in my authority to explain why someone might want to remove the license plate from their car photos, if you’re interested go ahead google it on your own. From this point let’s just assume and agree that we want to do that.

I will be using Python and OpenCV to demonstrate how I did it, but the basic ideas behind it can be used in any other language/framework. Also I’d like to note that Python isn’t my “native” programming language so-to-say, and I apologize in advance for all the camelCase variable names you see, and some clumsiness in my code.

To break down the algorithm before we start coding:

  1. Detect where the license plate is located on our input image
  2. Approximate license plate’s background color
  3. Fill the license plate with the color we calculated

Let’s start by opening our image, we’ll take this beautiful RWB 911 as the main example here.

Image for post

We will need to open it as PIL image first, and then we can convert it to the OpenCV format:

from PIL import Image as imageMain
from PIL.Image import Image
import cv2
import numpy

imagePath = '../sample-images/1.jpg'
imagePil = imageMain.open(imagePath)
imageCv = cv2.cvtColor(numpy.array(imagePil), cv2.COLOR_RGB2BGR)
cv2.imshow('Original Image', imageCv)

Image for post

#image-processing #python #ai #opencv #computer-vision

Verda  Conroy

Verda Conroy

1591743681

Create a Virtual Pen and Eraser with Python OpenCV - Genial Code

Learn Free how to create a virtual pen and eraser with python and OpenCV with source code and complete guide. This entire application is built fundamentally on contour detection. It can be thought of as something like closed color curves on compromises that have the same color or intensity, it’s like a blob. In this project we use color masking to get the binary mask of our target color pen, then we use the counter detection to find the location of this pen and the contour to find it.

#python #create virtual pen and eraser with opencv #create virtual pen and eraser with python opencv #programming #opencv #python opencv

Jessica John

Jessica John

1627056571

Get Registered EU Drivers License Online

Lost your real driving license? Having a second one is a good backup then. Driving Solution Pro is No 1 sellers of Registered and Unregistered driving license that offers 100% Secure and Reliable Service to Buy Drivers License Online for UK, USA, Canada, Australia and EU at affordable Price.

If you’re the world’s worst keeper of licenses and you always forget to put it back or store it properly, make sure you Buy Drivers License Online. If you need to do a quick drive to the grocery, you could take your duplicate one off the shelf and leave the real one safe at home. That way, you lower the risks of losing the original. You don’t just avoid the stress and hassle of springing for a license replacement. In case you lose the duplicate one, it’s going to be easy enough to replace with Real Drivers License Online.

When you have a Registered UK Driving License, it gives you the confident to drive smoothly without being worried of any accident. Having a driving license is always the best way to show your confidence towards your driving skills. But when it comes to getting a driving license in a conventional way, people sometimes get overwhelmed. This is because applying for a driving license and getting it in a conventional way is not as easy as it seems to be. You have to invest a lot of time and money and go through a hassled way to complete the documentation process to get a driving license. You can get rid of this problem if you Buy UK Driving License Online or Buy UK Driver’s license Online.

A real drivers license at Driving Solution Pro is a valid drivers license with full security features. Our department of real driving license UK started in 2010 and quickly expanded to other countries like USA, CANADA, Australia and Europe Countries . This real driving licenses we offer have their information registered in the government drivers license database. In addition to this, our real registered drivers licences have bio metric data on them and the secrete features necessary to successfully pass a digital scan.

If you are confused when to Buy Registered USA Driving Licence Online or Australian Driving license for sale, you can consider a few circumstances when you should look for Buy USA Driver’s license Online. Below a discuss the circumstances when you should Buy Driving License Online.

1. When you know driving but you are not getting a driving license in a conventional way:
Cases are there where people do not get their driving licenses in spite of being professionally trained as a driver. It has often been seen that in spite of knowing the basics of driving, they have to learn from the beginning in a conventional way to get a license. But why you go for learning from the beginning when you are an expert in driving or when you know the basics of it? You can simply Buy Real Canadian Drivers License Online that will show your expertise in driving.

2. When you need date income of place or recreational purpose:
Sometimes, we need a driving license for camouflage or recreational purpose, but don’t get it in a conventional way. When you need it for a camouflage proposes, you can simply Buy Australian Driving License Online at an affordable and in a much hassle-free way. You should look for driving license for sale from a reliable driving license service provider online.

3. When time is a big issue:
Getting a driving license in a traditional way takes at least one month if all the documentation is cleared. But when you don’t have that much time to invest in, the only option open to you is to Get Registered EU Drivers License. You can also Buy European Driver’s License that you might need to get a driving license. Make sure you Buy Drivers License Online from a legal and popular document service provider so that you don’t get into any legal trouble.

Checkout For More Details: Get Registered EU Drivers License Online

#get registered eu drivers license #buy european driver’s license #buy eu driving license online #buy registered usa driving license online #buy uk driver’s license online

A Simple HDR Implementation on OpenCV Python

Learn how to create a high dynamic range (HDR) image using Python and OpenCV

HDR images encompass the information of multiple pictures with different exposures. In a scene which the source of light is uneven, a single shot may overexpose certain areas of the image and details will be lost due to elevated brightness. Conversely, this picture may also present underexposed areas which will also lead to information loss.

To create an HDR image you will need:

  1. Take pictures with different exposures. Minimum of 2, generally 3, you can use more than 3 images but it will take a lot of CPU resources.
  2. Align the images. Even if you use a tripod you will need to perform this step (we are talking about pixel level alignment). Not properly aligning your image will lead to artifacts and ‘ghosts’ in your HDR image.
  3. Merge the aligned images into one.
  4. Perform tone mapping on the merged image. In nature the minimum possible brightness is zero but the maximum is not limited to 255, in fact there is no limit to it, it can be infinity. For this reason we need to map the image obtained in the third step to a (0, 255) range. This can be achieved with tone mapping.

#hdr #opencv #computer-vision #python #opencv #opencv python

Well and Color Detection of PCR Plate using Python and OpenCV

Here’s how you can detect each well and it’s color in a PCR 96 well plate

OpenCV is an open source library aimed at computer vision. It has great features that make tasks such as object, and color detection simple and intuitive.

In order to detect each well’s color we need to first get each well’s position in the picture. So, our first goal is to detect each well in a PCR plate. Once we do that we can easily get the pixel colors inside those wells.

We will be working with these libraries:

  • numpy
  • KDTree
  • webcolors
  • cv2

#pcr #python #object-detection #opencv #computer-vision #well and color detection of pcr plate using python and opencv