Image Kernels explained visually

An image kernel is a small matrix used to apply effects like the ones you might find in Photoshop or Gimp, such as blurring, sharpening, outlining or embossing. They’re also used in machine learning for ‘feature extraction’, a technique for determining the most important portions of an image. In this context the process is referred to more generally as “convolution” (see: convolutional neural networks.)

Source: Image Kernels explained visually

ImageMagick Remote Command Execution Vulnerability

The vulnerability is very simple to exploit, an attacker only needs a image uploader tool that leverages ImageMagick. During our research we found many popular web applications and SaaS products vulnerable to it (people love gravatars), and we have been contacting them privately to get things patched. Unfortunately, even with all the media attention, not everyone is aware of this issue.

Source: ImageMagick Remote Command Execution Vulnerability – Sucuri Blog

Update FromImageMagick Is On Fire — CVE-2016–3714

If you use ImageMagick or an affected library, we recommend you mitigate the known vulnerabilities by doing at least one of these two things (but preferably both!):

  1. Verify that all image files begin with the expected “magic bytes” corresponding to the image file types you support before sending them to ImageMagick for processing. (see FAQ for more info)

  2. Use a policy file to disable the vulnerable ImageMagick coders. The global policy for ImageMagick is usually found in “/etc/ImageMagick”. The below policy.xml example will disable the coders EPHEMERAL, URL, MVG, and MSL.

My ImageMagick policy file is in /usr/lib64/ImageMagick-6.6.4/config/policy.xml  Click the link to get the exact rules to add.  I use ImageMagick with Gallery software but only admin has access to uploading images so this bug doesn’t matter for my use case.

Object recognition for robots

Because a SLAM map is three-dimensional, however, it does a better job of distinguishing objects that are near each other than single-perspective analysis can. The system devised by Pillai and Leonard, a professor of mechanical and ocean engineering, uses the SLAM map to guide the segmentation of images captured by its camera before feeding them to the object-recognition algorithm. It thus wastes less time on spurious hypotheses.

More important, the SLAM data let the system correlate the segmentation of images captured from different perspectives. Analyzing image segments that likely depict the same objects from different angles improves the system’s performance.

Source: Object recognition for robots

Analysing galaxy images with artificial intelligence: astronomers teach a machine how to ‘see’

Mr Hocking, who led the new work, commented: “The important thing about our algorithm is that we have not told the machine what to look for in the images, but instead taught it how to ‘see’.”

Source: Analysing galaxy images with artificial intelligence: astronomers teach a machine how to ‘see’

The new work appears in “Teaching a machine to see: unsupervised image segmentation and categorisation using growing neural gas and hierarchical clustering”, A. Hocking, J. E. Geach, N. Davey & Y. Sun. The paper has been submitted to Monthly Notices of the Royal Astronomical Society.

ExifTool by Phil Harvey

ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony.

Source: ExifTool by Phil Harvey

New Device Could Greatly Improve Speech and Image Recognition

Holography is a technique based on the wave nature of light which allows the use of wave interference between the object beam and the coherent background. It is commonly associated with images being made from light, such as on driver’s licenses or paper currency. However, this is only a narrow field of holography.

Holography has been also recognized as a future data storing technology with unprecedented data storage capacity and ability to write and read a large number of data in a highly parallel manner.

Source: UCR Today: New Device Could Greatly Improve Speech and Image Recognition

Graphics from the command line

This article shows how to perform image manipulation using command-line tools. I do this job quite often, since I’ve picked up a some digital cameras and now manage a library of several thousand happy snaps. For Web developers and administrators who frequently have to batch-process large numbers of images, command line tools are an especially attractive option, because the developer can incorporate them into scripts. But even if you only want to perform a manipulation once or twice, a command-line alternative can save time.

The command line tools discussed in this article are part of the excellent ImageMagick suite, which ships with Red Hat Linux and is freely available online (see Resources). ImageMagick can also be accessed via C, C++, Perl, Python, Java, and several other languages, which Linux programmers will appreciate.

via Graphics from the command line.

ffmpeg – encode video in reverse?

Dump all video frames

$ ffmpeg -i input.mkv -an -qscale 1 %06d.jpg

Cat video frames in reverse order to FFmpeg as input
$ cat $(ls -t *jpg) | ffmpeg -f image2pipe -vcodec mjpeg -r 25 -i - -i backwards.wav
-vcodec libx264 -vpre slow -crf 20 -threads 0 -acodec flac output.mkv

via ffmpeg – encode video in reverse? – Stack Overflow.

The above ffmpeg command examples turned out to be very useful.  Previously I had to do this manually in Avidemux.

The output of my IP camera is VGA 640×480 and I needed to slice that up into a  10×10 array of little areas  (100 jpeg files) using the following:

convert input.jpg -crop 64x48  +repage  +adjoin  myoutputfile_%02d.jpg

Motion detect reveals a lot of false positives which must be filtered out manually.  In order to automate this I  compare time n to time n+1 in only a couple of the 100 little jpegs separated in the above command.   So far I’m using this:

compare -metric MAE time_n_number.jpg time_n+1_number.jpg  null: 2>&1

A changed portion of the jpeg will generate a high number which can be compared to a threshold in a script allowing me to eliminate most all false positive motion detects.

More detailed explanation for the Image compare commands in the ImageMagick package can be found here:

ImageMagick v6 Examples –Image Comparing

Therefore my entire process consists of separating the video into jpegs, finding changes in areas where there shouldn’t be changes and if not reassembling the jpegs back into a video file again all done automatically via bash scripting.

There probably are more elegant solutions but this works for now.

The Face Detection Algorithm Set to Revolutionize Image Search

The great promise of this kind of algorithm is in image search. At the moment, it is straightforward to hunt for images taken at a specific place or at a certain time. But it is hard to find images taken of specific people. This is step in that direction. It is inevitable that this capability will be with us in the not too distant future.

via The Face Detection Algorithm Set to Revolutionize Image Search | MIT Technology Review.