Rusty  Shanahan

Rusty Shanahan


A Hands-On Application of Homography

Homography based IPM

In computer vision, homography is a transformation matrix H when applied on a projective plane maps it to another plane (or image). In the case of Inverse Perspective Mapping (IPM), we want to produce a birds-eye view image of the scene from the front-facing image plane.

In the field of autonomous driving, IPM aids in several downstream tasks such as lane marking detection, path planning and intersection prediction solely from using a monocular camera as this orthographic view is scale-invariant. Emphasising the importance of this technique.

How does IPM work?

IPM first assume the world to be flat on a plane. Then it maps all pixels from a given viewpoint onto this flat plane through homography projection.

When does IPM work?

In practice, IPM works well in the immediate vicinity of the camera. For faraway features in the scene, blurring and stretching of the scene become more prominent during perspective projection as a smaller number of pixel is represented, limiting the application of IPM. This can be observed in figure 1, where severe undesirable distortion is produced farther away. To be exact, the lookahead distance is approximately 50m in the figure.

In addition, the following constraints must hold:

  1. The camera is in a fixed position: Since the position of the road is sensitive to the camera, a slight perturbation in position or orientation will change how the 3D scene is projected onto an image plane.
  2. The surface is planar: Any object with height or elevation will violate this condition. Non-planar surfaces will create artefacts/distortion in the BEV image.
  3. Free of objects with height. All points above the ground will induce artefacts as a consequence of perspective projection between 2 planes lying arbitrarily in the 3D scene.

In this article, I will attempt to explain the idea of IPM. More importantly, this post is dedicated to how we can work out and apply the homography using only Python and Numpy.

Next, I will show that somewhat similar results can be obtained using OpenCV. We will be using a relatively common road scene from Cityscape dataset as an example. Feel free to message me regarding any questions/doubts or even mistakes you might have spotted.

The code for this article is available here. And all inline text refers to some variable or function in the code.

Setting up the problem

The problem that we are trying to solve is to transform a frontal view image into a birds-eye view image. IPM does this by removing the perspective effect from the front-facing camera and remap its image onto a top-view 2D domain. The image in BEV is one that attempts to preserve distance and parallel lines, correcting perspective effect.

The following bullet points summarise the procedure for homography based IPM:

  • Model the road (X, Y, Z=0) as a flat 2D plane. Some approximation must be made with regard to resolution as the road are discretized onto the BEV image.
  • Determine and construct the projection matrix **P **from known extrinsic and intrinsic parameters. Usually, this is obtained through calibration.
  • Transform and warped the road by applying P. Also known as a perspective projection.
  • Remap the frontal pixel to the new image plane.

I will go into more details in the following sections.

Image for post

Figure 2. Source

Before we get started, it is important to know where the camera is relative to the road. For the road scene in Cityscape, the camera is mounted on top of the vehicle pitching slightly downwards. The exact position and orientation is written in the file camera.json . Note that the values are relative to the ego-vehicle.


To understand IPM, some background knowledge about perspective projection and camera projective geometry is required. I will briefly describe what you need to know about those topics in this section.

1. Perspective projection

Perspective projection precisely describes how the world around us gets mapped on a 2D plane. During this mapping, 2 parallel lines in the world (euclidean space) are transformed into a pair of line in the new plane which converges at the point of infinity. Referring to figure 3, the parallel properties of the 2 cubes placed in the world are not preserved from where we are observing right now. An example of this would be the lane lines.

Image for post

Figure 3

In the case of our example as shown in figure 4, when the road is observed from a different viewpoint, notice that the same region looks different. Parallel lies are no longer preserved in a projective transformation P.

Image for post

#mathematics #machine-learning #computer-vision #deep learning

What is GEEK

Buddha Community

A Hands-On Application of Homography

Hand Sanitizer in bulk - Get your effective hand sanitizer here

With the spread of various harmful virus globally causing immense distress and fatalities to human mankind, it has become absolutely essential for people to ensure proper and acute hygiene and cleanliness is maintained. To further add to the perennial hardship to save lives of people the recent pandemic of Covid-19 affected globally created the worst nightmare for people of all walks of life. Looking at the present crisis, it has become imperative for human beings to be encouraged to tackle this challenge with an everlasting strength to help protect oneself and their loved ones against the devastating effects of the virus. One thing that stands up between keeping all safe and vulnerable is by making sure that everybody attentively Hand wash periodically to help physically remove germs from the skin and getting rid of the live microbes.

The essence of apposite handwashing is based around time invested in washing and the amount of soap and water used. Technically, washing hands without soap is much less effective anyway. But incase a proper handwashing support system doesn’t become possible around, the usage of Effective Hand Sanitizer will certainly help fight to reduce the number of microbes on the surface of hands efficiently, eliminating most variants of harmful bacteria to settle.

The need has come about for Hand Sanitizer in bulk to save your daily life aptly maintaining a minimum of 60% alcohol - as per the CDC recommendations and approved by USFDA for its greater effectiveness. With the growing demand of people on the move the demand for easy to carry, small, and travel size worthy pouches that are also refillable once the product runs out is the need of the hour. To further make sure that human lives are well protected from these external viruses, it is mandatory for producer of effective Hand Sanitizer to evolve products circumspectly with ingredients that produce not just saving lives but with multiple benefits for people of all ages.

#hand sanitizer #hand sanitizer in bulk #hand sanitizer ingredient #hand sanitizer to alcohol #hand sanitizer travel size #hand sanitizer wholesale

Gerhard  Brink

Gerhard Brink


The Rising Value of Big Data in Application Monitoring

In an ecosystem that has become increasingly integrated with huge chunks of data and information traveling through the airwaves, Big Data has become irreplaceable for establishments.

From day-to-day business operations to detailed customer interactions, many ventures heavily invest in data sciences and data analysis  to find breakthroughs and marketable insights.

Plus, surviving in the current era, mandates taking informed decisions and surgical precision based on the projected forecast of current trends to retain profitability. Hence these days, data is revered as the most valuable resource.

According to a recent study by Sigma Computing , the world of Big Data is only projected to grow bigger, and by 2025 it is estimated that the global data-sphere will grow to reach 17.5 Zettabytes. FYI one Zettabyte is equal to 1 million Petabytes.

Moreover, the Big Data industry will be worth an estimate of $77 billion by 2023. Furthermore, the Banking sector generates unparalleled quantities of data, with the amount of data generated by the financial industry each second growing by 700% in 2021.

In light of this information, let’s take a quick look at some of the ways application monitoring can use Big Data, along with its growing importance and impact.

#ai in business #ai application #application monitoring #big data #the rising value of big data in application monitoring #application monitoring

Willa Anderson

Willa Anderson


Here Are The Features That A Cloud Based SaaS Application Requires

Fast setup and slick UIs create incredible first impressions on users. However, enterprise managers are aware of the fact that they are at the tip of the iceberg. One of the features of a SaaS is interoperability, and such aspects are the ones that business owners need to lay a solid foundation.

Are you aware of the term “Software as a Service (SaaS)?” You probably heard it several times, but you may not know what it’s all about. Well, a SaaS, designed by a cloud-based application development company, is a cloud-based service that helps consumers gain access to software applications over the web. These applications remain hosted on the cloud and used for various purposes by companies as well as individuals.

SaaS created by a cloud-based application development company is the best alternative to traditional software installation systems. You may compare it with a TV channel that’s available for subscription. The user connects to a remotely-located base on a central server and uses a license to access data.

In other words, SaaS offers a method of software delivery by which you can access data from any device connected to the internet. Of course, this particular device should have a web browser. Software vendors host everything associated with the application, including servers, code, and databases.

Explore more:

#mobile-application-development #cloud-based-saas-application #on-demand-applications #moontechnolabs #application-development-services

Joseph  Murray

Joseph Murray


Top 5 Java Web Application Technologies You Should Master in 2021

Web Development in Java

Java is a commonly used language for web development, especially on the server-side. Java web applications are distributed applications that run on the internet. Web development with Java allows us to create dynamic web pages where users can interact with the interface.

There are various ways through which you can create dynamic web pages in Java. The Java EE (Enterprise Edition) platform provides various Java technologies for web development to developers. Services like distributed computing, web services, etc. are provided by Java EE. Applications can be developed in Java without using any additional scripting language. Let us see how web applications are made via Java.

**Java Web Application **

Java Web Application Technologies

#software development #java #java web applications #web applications #java web application technologies #top 5 java web application technologies you should master

Jessica Smith

Jessica Smith


Find Android TV App Development Services in USA | SISGAIN

There was a time when televisions were just a dream. Then with the new generation, came new technologies and television evolved. Now is the era of big screens and portable devices. Our android TV application development company in the USA provides you with genuine and innovative android tv app development solutions. Our android TV App developers consider your maintenance needs and work hard to feed you the best services available. For more information call us at +18444455767 or email us at or Visit:

#android tv app development #android tv application development company #android tv application development company in dubai #android tv application development company in usa #android application development company in uk #android tv application development company in australia