Camera Hack to make your Camera see Infrared!

  • 208 Views
  • Last Post 20 January 2023
Chris posted this 19 January 2023

My Friends,

I posted a small experiment, Here, that converts your El Cheapo, budget Camera to see Infrared Spectrum.

The Infrared Spectrum is part of the Electromagnetic Spectrum:

The electromagnetic (EM) spectrum is the range of all types of EM radiation. Radiation is energy that travels and spreads out as it goes – the visible light that comes from a lamp in your house and the radio waves that come from a radio station are two types of electromagnetic radiation. The other types of EM radiation that make up the electromagnetic spectrum are microwavesinfrared lightultraviolet lightX-rays and gamma-rays.

 

So with Infrared ( IR ) we can see Heat as Light. Most Camera Lens's are manufactured the same way, and have similar construction techniques:

 

Please Note: Some Camera's seem to work much better than others!

Initially, I was sceptical, and thought, no, it cant be this easy, but after I watched this video and thought I would try this experiment out:

 

And yes, it does work! I tried with two cameras, first was a very cheap webcam:

 

The result:

 

and second was a little bit more expensive Microsoft Lifecam:

 

Both were quite easy to modify, the El Cheapo Webcam was a little easier, the Microsoft Lifecam was a little harder, but gave a much better result.

 

And, a short video of an IR Reflecting Object moving with a very unorthodox Flight Path! Bird or a Plane, or?

You can see, I have a mark, possibly some dirt, or a scratch on the lens that is showing as a blurry spot on the image.

Of course, the Focus is important, and a little difficult to achieve if the Lens are dirty or have finger prints on them, so keeping them clean and dust free is very important.

As a comparison, here is a video I watched, it shows a IR Convert, which seems to work exactly the same way and does take fantastic Images:

 

WOW, almost as good, with a budget dusty, dirty and an experiment on cheap rubbish cameras!

Of course, Coils or Electromagnets emit Electromagnetic Waves in the Spectrum we are observing today, but where do they fit? In the Low, all the way to High Frequency right?

Baerndorfer has shown some images of Coils in the IR Spectrum here:

 

Is this a useful Hack, I think so!

Best Wishes,

   Chris

Chris posted this 20 January 2023

My Friends,

Some Software to capture Video and Images, I use Emgu.CV which is an open C# Wrapper for OpenCV, a C++ Library I believe.

A short Video tutorial:

 

Some Code I use often, this is important for new Camera's that support Resolutions greater then: 640 x 480, the Default, works in Emgu.CV 3.2.0.2721

VideoCapture Camera = new VideoCapture(0);
Camera.SetCaptureProperty(CapProp.FrameWidth, 1280);
Camera.SetCaptureProperty(CapProp.FrameHeight, 720);
Camera.SetCaptureProperty(CapProp.Autofocus, 39);
Camera.SetCaptureProperty(CapProp.Fps, 60);

 

Very few, if any, set the important properties used here!

A small Windows Forms .NET 4.6 or above App for use:

namespace EmguCVWebcam
{



    #region Using Statements:



    using System;
    using System.Drawing;
    using System.Windows.Forms;


    using Emgu.CV;
    using Emgu.CV.CvEnum;
    using Emgu.CV.Structure;



    #endregion




    public partial class Form1 : Form
    {



        #region Fields:



        // Set the Video Name:
        private static string FileName = "Video.mp4";



        // Set the Video Name:
        private static string FilePath = @"\bin\Debug\Videos";



        // Config the CODEC:
        // VideoWriter.Fourcc('H', '2', '6', '4');
        private static int Codec = VideoWriter.Fourcc('F', 'M', 'P', '4');



        // Setup the Camera:
        private static Emgu.CV.VideoCapture Camera = new Emgu.CV.VideoCapture(1);



        // Init the Video Writer:
        private static VideoWriter videoWriter;



        #endregion



        #region Properties:



        /// <summary>
        /// Frames per second: Fps
        /// USB 2.0 Cameras are often 30 Fps
        /// USB 3.0 Cameras are often 60 Fps
        /// </summary>
        private static int Fps { get; set; } = 30;



        /// <summary>
        /// FrameWidth: 1280 HD
        /// </summary>
        private static int FrameWidth { get; set; } = 1280;



        /// <summary>
        /// FrameHeight: 720 HD
        /// </summary>
        private static int FrameHeight { get; set; } = 720;



        #endregion



        /// <summary>
        /// CTOR:
        /// </summary>
        public Form1()
        {

            InitializeComponent();
        }



        /// <summary>
        /// On Form Load Event.
        /// </summary>
        private void OnFormLoad(object sender, EventArgs e)
        {

            // Set Camera Properties:
            Camera.SetCaptureProperty(CapProp.FrameWidth, FrameWidth);
            Camera.SetCaptureProperty(CapProp.FrameHeight, FrameHeight);
            Camera.SetCaptureProperty(CapProp.Autofocus, 39);
            Camera.SetCaptureProperty(CapProp.Fps, Fps);

            // Init the VideoWriter:
            videoWriter = new VideoWriter(System.IO.Path.Combine(FilePath, FileName), Codec, Fps, new Size(FrameWidth, FrameHeight), true);

            // Go, as fast as the application can:
            Application.Idle += new EventHandler(CaptureFrames);
        }



        /// <summary>
        /// Capture Video Frames.
        /// </summary>
        private void CaptureFrames(object sender, EventArgs e)
        {


            // Get the Frame:
            Mat Frame = Camera.QueryFrame();

            // Image:
            Image<Bgr, byte> FrameImage = Frame.ToImage<Bgr, byte>();

            // Set the Image:
            pictureBox1.Image = FrameImage.ToBitmap();

            // Write the Video:
            videoWriter.Write(Frame);
        }



        /// <summary>
        /// On Form Closing Event.
        /// </summary>
        private void OnFormClosing(object sender, FormClosingEventArgs e)
        {

            // Dispose the Video Writer:
            if (videoWriter != null)
                videoWriter.Dispose();
        }
    }
}

 

This is about the simplest App one can use for .NET and Emgu.CV.

Best Wishes,

   Chris

We're Light Years Ahead!
Members Online:
What is a Scalar:

In physics, scalars are physical quantities that are unaffected by changes to a vector space basis. Scalars are often accompanied by units of measurement, as in "10 cm". Examples of scalar quantities are mass, distance, charge, volume, time, speed, and the magnitude of physical vectors in general.

You need to forget the Non-Sense that some spout with out knowing the actual Definition of the word Scalar! Some people talk absolute Bull Sh*t!

The pressure P in the formula P = pgh, pgh is a scalar that tells you the amount of this squashing force per unit area in a fluid.

A Scalar, having both direction and magnitude, can be anything! The Magnetic Field, a Charge moving, yet some Numb Nuts think it means Magic Science!

Message from God:

Hello my children. This is Yahweh, the one true Lord. You have found creation's secret. Now share it peacefully with the world.

Ref: Message from God written inside the Human Genome

God be in my head, and in my thinking.

God be in my eyes, and in my looking.

God be in my mouth, and in my speaking.

Oh, God be in my heart, and in my understanding.

Your Support:

More than anything else, your contributions to this forum are most important! We are trying to actively get all visitors involved, but we do only have a few main contributors, which are very much appreciated! If you would like to see more pages with more detailed experiments and answers, perhaps a contribution of another type maybe possible:

PayPal De-Platformed me!

They REFUSE to tell me why!

We now use Wise!

Donate
Use E-Mail: Chris at aboveunity.com

The content I am sharing is not only unique, but is changing the world as we know it! Please Support Us!

Thank You So Much!

Weeks High Earners:
The great Nikola Tesla:

Ere many generations pass, our machinery will be driven by a power obtainable at any point of the universe. This idea is not novel. Men have been led to it long ago by instinct or reason. It has been expressed in many ways, and in many places, in the history of old and new. We find it in the delightful myth of Antheus, who drives power from the earth; we find it among the subtle speculations of one of your splendid mathematicians, and in many hints and statements of thinkers of the present time. Throughout space there is energy. Is this energy static or kinetic? If static, our hopes are in vain; if kinetic - and this we know it is for certain - then it is a mere question of time when men will succeed in attaching their machinery to the very wheelwork of nature.

Experiments With Alternate Currents Of High Potential And High Frequency (February 1892).

Close