Browsed by
Category: Computer Vision

Cutting through the smoke with Retinex

Cutting through the smoke with Retinex

This year, most of August was unfit for bike riding due to wildfire smoke in the air. There was a 10 day stretch where the visibility scale reached zero. Standing on the shores at Shilshole, the smoke was so thick that land wasn’t visible across the Puget Sound. I wondered if land was still visible from a digital camera, even though I couldn’t see it. There is an imaging processing technique call Retinex that is used to enhance the dynamic…

Read More Read More

FFMpeg motion detection

FFMpeg motion detection

FFMpeg motion detection offers a way to create videos that are smaller and shorter becuase it only captures changed scenes. This post discussed the topic, https://superuser.com/questions/984841/ffmpeg-remove-parts-without-motion. Here is the command I used based off of this conversation. ffmpeg -i “http://viewr1:viewr1@192.168.6.184/mjpeg/stream.cgi?chn=0” -vf “select=gt(scene\,0.004),setpts=N/(25*TB)” IPCam4_Motion.mp4 The one thing I noticed was the timestamp in the video is being detected as a scene change, this introduces a higher noise floor. I found that my lowest scene value to be .004. This site, http://www.bogotobogo.com/FFMpeg/ffmpeg_thumbnails_select_scene_iframe.php…

Read More Read More

DVR Video from Images Captured from IP Cameras

DVR Video from Images Captured from IP Cameras

Working with thousands of image files captured from IP Cameras can be problematic. I’ve experienced issues with Caja hanging when simply browsing the folders that contain the captured images. To work around this, I compile video with FFMpeg from the image stock into a separate folder. First I’ll create a file list using this command ls /home/local/Videos/Security/IPCam3_20180726*.jpg > /home/local/Scripts/IPCam3_20180726.txt The results will then need to be processed so FFMpeg can use the file as a reference. Before – Not ready…

Read More Read More

Security Monitoring with IP Cameras

Security Monitoring with IP Cameras

Security Monitoring with IP Cameras The market offers many choices when it comes to IP cameras. Most people who purchase these devices typically use the bundled software or hardware. This can be convenient but has it limitations. Many of the manufacturers do not support other brands of devices. In this post I’ll be covering how to gather imaging and video directly from IP cameras without the need for the vendors software or hardware solution. The camera I’ll be demonstrating in…

Read More Read More

Spectrograms with FFMpeg

Spectrograms with FFMpeg

In this post I’ll be covering how to create image files that represent the sound levels and frequencies of a media file.  These images are known as spectrograms.  They provide a way to visually locate moments in time.  This can be useful for a number of reasons. FFMpeg has a feature that lets us create spectrograms with the showspectrumpic filter.  Details about this filter can be found here, https://ffmpeg.org/ffmpeg-filters.html#showspectrumpic.  You can also get information about the filter by typing in…

Read More Read More

Depthmapping with FFMpeg and OpenCV

Depthmapping with FFMpeg and OpenCV

Depthmaps are typically greyscale images that represent how far an object is by the degree of shade.  They can be white-near, black-near, or some other color scale such as ironbar.  Depthmaps are useful for creating renders or systems that have a distance sensing need. In this post I’ll be using footage that I shot using 2 Innovv cameras.  The rig was not precise, so I also post processed it to correct distortion and alignment issues.  The post processing topic was…

Read More Read More

Creating Anaglyph Video with FFMpeg

Creating Anaglyph Video with FFMpeg

In this post, we’ll step through how to create anaglyphic stereoscopic videos using FFMpeg. To create anaglyph imaging, we’ll need to use two camera sources, one left, the other right. These sources will be merged into a single image with red cyan overlaying to create a three dimensional effect using red cyan glasses. I referenced these sites frequently. FFMpeg Documentation – https://ffmpeg.org/documentation.html FFMpeg Stereoscopic Details – https://trac.ffmpeg.org/wiki/Stereoscopic The source video I’ll be demonstrating was shot with two Innovv C1 dashboard…

Read More Read More

DeFish Effect with FFMpeg

DeFish Effect with FFMpeg

In this post, we’ll cover how to use FFMpeg to removed the radial effects of a fish eye lens. This distortion is a trade off of wide angle lenses. The wider view also included bends and bows to objects that are in nature straight. FFMpeg has a filter known as “lenscorrection” that will remove most of this distortion, lets begin. As always, split out a segment so you don’t waste time processing excessive amounts of data. ffmpeg -ss 00:00:39 -i…

Read More Read More

Color Thresholds and Masking with FFMpeg and ImageMagick

Color Thresholds and Masking with FFMpeg and ImageMagick

I’ve demonstrated how to take videos and convert them into images using FFMpeg in previous posts. In this post, I’ll be using that same process and ImageMagick to create a color threshold effect. The interesting aspect is that all of the processing can be done through the command line. When faces with editing numerous files, scripting is the way to go. The few hours of up front work getting the script right is worth it. You can get on with…

Read More Read More

Image to Video to Image using FFMpeg

Image to Video to Image using FFMpeg

In this post, I’ll demonstrate how to take a series of images and convert them into a video. I’ll also demonstrate how to convert a video into a series of images, were we can do some interesting things. Lets start with image to video conversion. For this example I’ll be using images that have been scrapped from the web for the past year. I run a script that downloads a new image every 5 minutes. As it downloads them, the…

Read More Read More