Title: Introduction to Infrared Vision: Near vs. Mid-Far Infrared Images - PyImageSearch

URL Source: https://pyimagesearch.com/2022/10/10/introduction-to-infrared-vision-near-vs-mid-far-infrared-images/

Published Time: 2022-10-10T13:00:00+00:00

Markdown Content:
* * *

**Table of Contents**
---------------------

*   [Introduction to Infrared Vision: Near vs. Mid-Far Infrared Images](#h2BPTitle)

*   [What Is an Infrared Image? Near-Infrared Images](#h3What)
*   [Middle and Far-Infrared Images: Thermal Infrared Imaging](#h3Middle)
*   [Types of Infrared Cameras](#h3Types)
*   [Near-Infrared or Night Vision Cameras](#h3Near)
*   [Mid-Far-Infrared or Thermal Cameras](#h3Mid)
*   [What Are Useful for Near-Infrared or Night Vision Cameras](#h3Useful)
*   [Middle-Far-Infrared or Thermal Cameras](#h3Far)

*   [Summary](#h2Summary)

*   [Citation Information](#h3Citation)

* * *

In this tutorial, you will learn the basics of infrared imaging, including:

*   What an infrared image is: Near vs. mid-far infrared
*   Types of infrared cameras
*   What they are useful for

[![Image 1](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20700%20393'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/Introduction_to_Infrared_Vision_Near_vs._Mid-Far_Infrared_Images_V1-optimized.jpg)

This tutorial is the 1st in a 4-part series on **Infrared Vision Basics**:

1.  **_[Introduction to Infrared Vision: Near vs. Mid-Far Infrared Images](https://pyimg.co/oj6kb)_ (today’s tutorial)**
2.  _Thermal Vision: Measuring your First Temperature from an Image with Python and OpenCV_
3.  _Thermal Vision: Fever Detector with Python and OpenCV (starter project)_
4.  _Thermal Vision: Night Object Detection with PyTorch and YOLOv5 (real project)_

By the end of this lesson, you’ll know what infrared images are, their technology, and what they are useful for nowadays.

Infrared imaging is a unique field requiring specialized datasets. A library of curated infrared data would be instrumental in understanding and developing algorithms for various infrared spectrums.

[Roboflow](https://roboflow.com/?ref=pyimagesearch) has free tools for each stage of the computer vision pipeline that will streamline your workflows and supercharge your productivity.

Sign up or Log in to your [Roboflow account](https://roboflow.com/?ref=pyimagesearch) to access state of the art dataset libaries and revolutionize your computer vision pipeline.

You can start by choosing your own datasets or using our [PyimageSearch’s assorted library of useful datasets](https://universe.roboflow.com/pyimagesearch?ref=pyimagesearch).

Bring data in any of 40+ formats to [Roboflow](https://roboflow.com/?ref=pyimagesearch), train using any state-of-the-art model architectures, deploy across multiple platforms (API, NVIDIA, browser, iOS, etc), and connect to applications or 3rd party tools.

With a few images, you can train a working computer vision model in an afternoon. For example, bring data into [Roboflow](https://roboflow.com/?ref=pyimagesearch) from anywhere via API, label images with the cloud-hosted image annotation tool, kickoff a hosted model training with one-click, and deploy the model via a hosted API endpoint. This process can be executed in a code-centric way, in the cloud-based UI, or any mix of the two.

Over 250,000 developers and machine learning engineers from companies such as Cardinal Health, Walmart, USG, Rivian, Intel, and Medtronic build computer vision pipelines with Roboflow. Get started today, no credit card required.

* * *

### [**What Is an Infrared Image? Near-Infrared Images**](#TOC)

Before starting to work with this curious type of image, we should understand where they come from.

We are all familiar with common digital color visible pictures (**Figure 1**, _left_) because we generate hundreds, even thousands, per year with our smartphones, tablets, and digital cameras.

[![Image 2](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20643%20857'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-1-a.jpg)

[![Image 3](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20643%20857'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-1-b.jpg)

**Figure 1:** _Left:_ Color visible-light image. _Right:_ Color near-infrared-light image.

The sensor inside digital cameras is able to capture not only the visible light or radiation but also the near-infrared light from the sun and artificial spotlights.

Nevertheless, our eyes cannot sense infrared radiation, so we see the world around us, as **Figure 1** (_left_) shows.

To replicate how our eyes work, digital cameras usually include a near-infrared blocking filter glass between the sensor and the lens. For this reason, the sensor only captures visible light, just as our eyes do.

In the few cases where this filter is not included, we have a **near-infrared camera** that takes pictures like the one shown in **Figure 1** (_right_) while also capturing the visible light.

So yes, what you may be thinking is possible! If you physically remove the glass filter from your camera, you will obtain an amazing visible and near-infrared capturing device!

* * *

**_Disclaimer:_** _PyImageSearch does not recommend that you follow this process if you are not confident about the procedure. Incorrect handling of the device could result in a broken camera._

* * *

**Figure 2** shows the response of a monochrome or Black and White (BW) common camera without a near-infrared blocking filter.

[![Image 4](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20700%20435'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-2-scaled.jpg)

**Figure 2:** Example of a digital BW camera spectrum response curve. Omnivision camera ([source](https://www.ovt.com/)): Quantum Efficiency (QE, %) vs. wavelength (nm).

By looking at the electromagnetic spectrum shown in **Figure 3**, we understand that the wavelength of visible light goes from violet, 380 nm, to red, 750 nm, and the near-infrared radiation from approximately 760 to 1500 nm.

[![Image 5](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20710'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-3-scaled.jpg)

**Figure 3:** Electromagnetic spectrum.

We have said that without near-infrared blocking filters, our common visible digital camera becomes a near-infrared and visible camera, as **Figure 3** shows (the highest light absorption of this camera spectrum response takes place in the visible part, between 400 and 750 nm).

But, what happens if we would like to work with a different wavelength inside the infrared radiation (i.e., middle and far or long infrared)?

The answer is that we need a different technology, known as **thermal infrared imaging**.

* * *

### [****Middle and Far-Infrared Images: Thermal Infrared Imaging****](#TOC)

Looking again at **Figure 3**, we can identify the middle and long/far infrared between approximately 1500 nm and 1 million nm.

How do these thermal images or infrared middle and far-infrared images look?

**Figure 4** (_left_) shows a middle-far or thermal picture capture with a small thermal camera **Figure 4** (_right_).

[![Image 6](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20640%20480'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-4-a.jpg)

[![Image 7](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20576'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-4-b-scaled.jpg)

**Figure 4:** _Left:_ Thermal image example. _Right:_ Small thermal camera ([source](https://www.rgmvision.com/)).

* * *

### [****Types of Infrared Cameras****](#TOC)

As we have seen, there are two types of infrared images according to the current technology:

1.  Near-infrared (NIR)
2.  Middle-far infrared (MIR, FIR)

* * *

### [****Near-Infrared or Night Vision Cameras****](#TOC)

As we already know, a common color or monochrome visible camera could easily be converted into a near-infrared and visible camera.

The captured near-infrared radiation allows us to see in the dark!

That’s why we usually call them **night vision cameras**.

They commonly include a monochrome or Black and White sensor, **Figure 5** (_top_). This technology requires an external artificial spotlight to illuminate the night scene captured. For that purpose, the night surveillance camera, shown in **Figure 5** (_bottom_), includes a LED infrared light ring around the lens.

[![Image 8](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201080%20607'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-5-a.jpg)

[![Image 9](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20338'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-5-bb-new.gif)

**Figure 5:** _Top:_ Security surveillance camera. _Bottom:_ Security surveillance camera ([source](https://domoticaencasa.es/home-assistant-16-instalamos-camara/)), night scene.

In the next section, we will see more interesting uses of this technology apart from security surveillance.

* * *

### [****Mid-Far-Infrared or Thermal Cameras****](#TOC)

This kind of imaging requires a different technology, known as **thermal cameras**.

Why **thermal** cameras, you may be wondering.

This technology allows us to measure the temperature of any scene by obtaining a temperature distribution map, as **Figure 6** shows!

[![Image 10](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/image6a-color.png)

[![Image 11](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/image6b-thermal.png)

**Figure 6:** Measuring a BBQ temperature distribution with a thermal camera. _Left:_ visible color image. _Right:_ thermal image.

Yes, that is the “magic” behind capturing the middle-far-infrared radiation.

The resulting image, in grayscale format and colored with different amazing palettes, lets us measure and display the temperature of each pixel in real-time, as we will discover in the **next tutorial**.

As with near-infrared cameras, this technology makes it possible for us to see in the dark. What’s more, we don’t need an external artificial spotlight/torch to illuminate the night scenes.

Yes, again, the middle-far-infrared “magic”!

* * *

### [****What They Are Useful for Near-Infrared or Night Vision Cameras****](#TOC)

Night vision cameras are usually working as surveillance security cameras.

But what else are they useful for?

The most common uses are:

1.  Facial and iris biometric recognition
2.  Animal research surveillance
3.  Hunting

Biometric recognition is a technology that is highly in demand and fully integrated into our daily lives. These cameras are found, for example, in our smartphones for iris or facial recognition. As a result, we can verify our identity for a bank transaction or unlock our devices at night, under bad-quality illumination conditions, or even while wearing sunglasses.

Animal research is another smart use of this technology. **Figure 7** (_bottom-left_) gives us an idea of how several of these devices spread around a specific wild area provide biologist researchers reliable knowledge, for example, about bobcat activity.

[![Image 12](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20597%20331'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-7-a.jpg)

[![Image 13](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201000%20600'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-7-b.jpg)

[![Image 14](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20600%20450'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-7-c.jpg)

[![Image 15](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20768'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/10/figure-7-d.jpg)

**Figure 7:** Common uses of near-infrared cameras. _Top-left:_ Iris biometric recognition ([source](https://commons.wikimedia.org/wiki/File:IRiris.jpg)). _Top-right:_ Facial biometric recognition ([source](https://www.aixtron.com/investoren/events/konferenzen/180320_3CMD_Laser_muLED_final.pdf)). _Bottom-left:_ Animal research surveillance ([source](https://wildlife.org/snap-trap-series-bobcats-ranges/)), bobcat activity tracking. _Bottom-right:_ Hunting, deer detection ([source](https://www.flickr.com/photos/oregondot/10696965166)).

In the same way, hunters can detect and track the movements of the desired deer.

* * *

### [****Middle-Far-Infrared or Thermal Cameras****](#TOC)

In this last point of the tutorial, we will learn the common uses of thermal cameras.

It is important to point out that it is a more expensive technology than near-infrared cameras.

However, despite the higher cost, thermal cameras benefit from not requiring an artificial spotlight that limits the working distance.

To take advantage of their temperature-measuring capability, these cameras are used for the following:

1.  Wildfire detection
2.  Electric panels and electronic device supervision
3.  COVID-19 temperature access control

Unfortunately, our planet suffers from hundreds of wildfires per year. To fight against this problem, thermal cameras embedded into drones can help in firefighting, as we can extract from **Figure 8** (_top-left_).

[![Image 16](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20411'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-8-a.jpg)

[![Image 17](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20613%20400'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-8-b.jpg)

[![Image 18](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20579'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-8-c.jpg)

[![Image 19](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%20683'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2022/02/figure-8-d.jpg)

**Figure 8:** Common uses of middle-far-infrared cameras. _Top-left:_ Fire areas detection ([source](https://www.dlr.de/content/en/articles/news/2019/02/20190628_summertime-is-forest-fire-season.html)). _Top-right:_ Electric panel heat distribution ([source](https://www.engineeringworldchannel.com/thermography/)). _Bottom-left:_ Electronic PCB temperature map for efficient design ([source](https://www.rgmvision.com/)). _Bottom-right:_ COVID-19 temperature access control ([source](https://www.smartcitiesworld.net/news/news/thermal-imaging-service-developed-to-protect-against-the-spread-of-coronavirus-5215)).

In industry, thermal cameras are very helpful in obtaining distribution heating maps to optimize electric and electronic devices in the designing process or fault prevention.

They are also useful for preventing and detecting fluid leaks and moisture problems.

Last but not least, as a consequence of COVID-19, thermal cameras can control the temperature at access points.

* * *

### What's next? We recommend [PyImageSearch University](https://pyimagesearch.com/pyimagesearch-university/?utm_source=blogPost&utm_medium=bottomBanner&utm_campaign=What%27s%20next%3F%20I%20recommend).

**Course information:**  
84 total classes • 114+ hours of on-demand code walkthrough videos • Last updated: February 2024  
★★★★★ 4.84 (128 Ratings) • 16,000+ Students Enrolled

**I strongly believe that if you had the right teacher you could _master_ computer vision and deep learning.**

Do you think learning computer vision and deep learning has to be time-consuming, overwhelming, and complicated? Or has to involve complex mathematics and equations? Or requires a degree in computer science?

That’s _not_ the case.

All you need to master computer vision and deep learning is for someone to explain things to you in _simple, intuitive_ terms. _And that’s exactly what I do_. My mission is to change education and how complex Artificial Intelligence topics are taught.

If you're serious about learning computer vision, your next stop should be PyImageSearch University, the most comprehensive computer vision, deep learning, and OpenCV course online today. Here you’ll learn how to _successfully_ and _confidently_ apply computer vision to your work, research, and projects. Join me in computer vision mastery.

**Inside PyImageSearch University you'll find:**

*   ✓ **84 courses** on essential computer vision, deep learning, and OpenCV topics
*   ✓ **84 Certificates** of Completion
*   ✓ **114+ hours** of on-demand video
*   ✓ **Brand new courses released _regularly_**, ensuring you can keep up with state-of-the-art techniques
*   ✓ **Pre-configured Jupyter Notebooks in Google Colab**
*   ✓ Run all code examples in your web browser — works on Windows, macOS, and Linux (no dev environment configuration required!)
*   ✓ Access to **centralized code repos for _all_ 536+ tutorials** on PyImageSearch
*   ✓ **Easy one-click downloads** for code, datasets, pre-trained models, etc.
*   ✓ **Access** on mobile, laptop, desktop, etc.

[Click here to join PyImageSearch University](https://pyimagesearch.com/pyimagesearch-university/?utm_source=blogPost&utm_medium=bottomBanner&utm_campaign=What%27s%20next%3F%20I%20recommend)

* * *

[**Summary**](#TOC)
-------------------

In this tutorial, we have learned what an infrared image is and the difference between near-infrared (NIR) and mid-far-infrared (MIR and FIR) images, recognizing the different technologies that support them. We have also discovered today’s common uses of these special cameras, and we will look at the best way to combine them with Artificial Intelligence in the following lessons.

In the next tutorial, we will travel into thermal imaging. You will learn to measure your first temperature from one of these special images to apply this awesome technology to your project.

See you there!

* * *

### [**Citation Information**](#TOC)

**Garcia-Martin, R.** “Introduction to Infrared Vision: Near vs. Mid-Far Infrared Images,” _PyImageSearch_, P. Chugh, A. R. Gosthipaty, S. Huot, K. Kidriavsteva, and R. Raha, eds., 2022, [https://pyimg.co/oj6kb](https://pyimg.co/oj6kb)

@incollection{Garcia-Martin\_2022\_Intro-Infrared-Vision,
  author = {Raul Garcia-Martin},
  title = {Introduction to Infrared Vision: Near vs. Mid-Far Infrared Images},
  booktitle = {PyImageSearch},
  editor = {Puneet Chugh and Aritra Roy Gosthipaty and Susan Huot and Kseniia Kidriavsteva and Ritwik Raha},
  year = {2022},
  note = {https://pyimg.co/oj6kb},
}

* * *

![Image 20: Featured Image](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20500%20276'%3E%3C/svg%3E)

### Unleash the potential of computer vision with Roboflow - Free!

*   Step into the realm of the future by [signing up or logging into your Roboflow account](https://roboflow.com/?ref=pyimagesearch). Unlock a wealth of innovative dataset libraries and revolutionize your computer vision operations.
*   Jumpstart your journey by choosing from our broad array of datasets, or benefit from PyimageSearch’s comprehensive library, crafted to cater to a wide range of requirements.
*   Transfer your data to Roboflow in any of the 40+ compatible formats. Leverage cutting-edge model architectures for training, and deploy seamlessly across diverse platforms, including API, NVIDIA, browser, iOS, and beyond. Integrate our platform effortlessly with your applications or your favorite third-party tools.
*   Equip yourself with the ability to train a potent computer vision model in a mere afternoon. With a few images, you can import data from any source via API, annotate images using our superior cloud-hosted tool, kickstart model training with a single click, and deploy the model via a hosted API endpoint. Tailor your process by opting for a code-centric approach, leveraging our intuitive, cloud-based UI, or combining both to fit your unique needs.
*   Embark on your journey today with absolutely no credit card required. Step into the future with Roboflow.

[Join Roboflow Now](https://roboflow.com/?ref=pyimagesearch)

![Image 21](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20410%20567'%3E%3C/svg%3E)

#### Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF

Enter your email address below to **join the PyImageSearch Newsletter** and **download my FREE 17-page Resource Guide PDF** on Computer Vision, OpenCV, and Deep Learning.