TITLE Image Visualization and Content Identification Using Mathematica

Total Page:16

File Type:pdf, Size:1020Kb

TITLE Image Visualization and Content Identification Using Mathematica Carbone 1 TITLE Image Visualization and Content Identification Using Mathematica /Introduction In this article, we investigate image visualization (IV) and image content identification (ICI) using Mathematica. It is not the only framework to provide such capability; popular web services, cloud APIs and programs are readily available. These include various online services including Google’s Vision API and Image Recognition service, Microsoft’s CaptionBot, as well as desktop software including Picassa (an image organizer) and many others. Each capable in its own right, some have capabilities that others do not. Nevertheless, in some ways Mathematica is superior to these programs because it gives the user, through its rich functionality, the ability to explore data and imagery in ways the others do not. Those already using online APIs should have little difficulty adapting to the Wolfram Data Language (WDL). Of course, the issue of uploading imagery from an investigation to the Internet or Cloud is ill advised. Many of today’s programming languages have image processing (IP) capabilities, built-in or from third-party libraries, which have helped to advance the spread of computer vision. Many of these languages and libraries typically require many lines of programming, and some require extensive use and manipulation of data structures. Using WDL, we will show how little code is actually required to perform complex IP. Our Mathematica code, concentrated in the program body, should be understood by anyone with prior programming experience. As with our first Mathematica article, we expand on data processing using file I/O for generating potentially actionable information by transforming images into more meaningful information. Throughout this article, three different datasets are used to provide useful examples and establish performance metrics. Important points for building WDL program are introduced, enabling us to pick up where we left off from our first Mathematica article. WDL programming is straightforward but like any language, the more complex the program the more difficult the programming. WDL helps to reduce many of these hurdles by providing an intuitive manner for building up program functionality. We hope to show substantially more complex programs compared to our first article suitable for digital forensics (DF), in little time. Finally, to save space in our code we have reduced the various snippets by condensing the previously examined elements from Article 1 into familiar nuggets, denoted by “(* TITLE... *)”. If a code heading is followed by an equals sign (=) this signifies that we are adding or modifying that subsection of code; if “…” is used then we are not making any changes to that subsection of code. /About the datasets The first dataset is our primary set, based on a collection of photos taken by the authors using various camera models. They are from personal collections so are free from copyright and attribution notices. Consisting of a wide variety of places, things, time of day (e.g., daytime, blue skies, sunsets), pets, vehicles and stellar objects it makes for a realistic set of images. It is a small collection consisting of 121 images representing 961 MB of data. They include large panoramas, the largest of which is 14,807 x 11,631 pixels in size. From this set, we hope to provide useful information concerning Mathematica’s overall ICI accuracy. The second set is used to more closely examine its ability to identify and differentiate between persons in images, their backgrounds and what they are wearing, issues that tend to confuse ICI software. The images are medium sized and occupy several MB of disk space. To make the analysis more realistic we used images from the web consisting of various “persons”. Anyone working in DF knows all too well the prevalence of finding images of “persons” in a typical investigation. The final set, which we use for establishing meaningful performance metrics, consists of 8,620 images files consuming about 22.0 GB of disk space. This set represents the full set from which the first was established - we visualize and perform ICI on it as well. Finally, performance and processing issues for all datasets will be discussed. /Test system specs Carbone 2 To implement and test the functionality we describe, we need a capable system for experimentation with to ensure that our code is both accurate and functional. For our testing purposed, we use a customized workstation equipped with 2 Xeon 2630v3 processors running at 2.40 GHz, with 128 GiB RAM running atop a SuperMicro X10-DAL-i motherboard. Swap is placed onto a Kingston SV300S3 SSD raw partition and set at 128 GiB, enabled for this article. An NVidia GeForce 720 2 GiB video card supported system graphics. Five internal 1 TB hard drives are used for data storage needs, but no RAID was configured. The system is running a heavily customized installation of Fedora 23 x64-Linux using kernel 4.4.9- 300 SMP. Currently, we are running Mathematica is 10.4.1.0. The concepts shown in this article are applicable to Windows, Linux and Mac OS X. /Concept I – Clearing memory of previously stored results Mathematica is indeed a strange creature. In Article 1 we recommended using ClearSystemCache[] and ClearAll[“Global`*”] to clear both the Wolfram system cache and all values or information associated to existing symbols. It turns out that this is insufficient to “truly clear the cache” of past results or evaluations. To definitively clear out this memory we set $HistoryLength=0 (zero). This will conclusively clear all previous results from memory, returning all unused memory back to the collective pool. We only learned of this memory clearing issue after rerunning our ICI program many times over, until it crashed Mathematica because of insufficient system memory. At that time, Wolfram technical support informed us of this feature, discussed in Wolfram’s Documentation Center. Specifics for correctly implementing a memory clearing routine are shown in Code Snippet 1. From this point forward, we will use this routine in all WDL programs. (* PROGRAM INITIALIZATION & MEMORY MANAGEMENT (Begin) = *) (* Clear everything *) ClearSystemCache[] ClearAll["Global`*"] $HistoryLength=0 Code Snippet 1: Procedure to correctly clear memory of unused symbols, history and cache. Some blogs and non-Wolfram support sites state that Remove[“Global`*”] will clear a notebook’s (NB) memory of all symbols, cache and history; this is incorrect. The only way to do this correctly is using Code Snippet 1. /Concept II – Keeping track of memory usage Key to running any program consuming large amounts of memory is keeping track of it. Mathematica makes this simple. We create a variable, say startmemory, to store the value obtained from MemoryInUse[], which we implement shortly after a program begins. MemoryInUse[] identifies the amount of memory in use by the Wolfram system at the moment it is called. To identify the memory in use by Mathematica’s front-end use MemoryInUse[$FrontEnd]. Equally important is determining how much memory is in use at the end of the program, just before closing files and cleaning up. To determine this we again run MemoryInUse[] and to store this value to some new variable, say finalmemory. Of course, we will want to know the program’s peak memory usage; this value is determined from MaxMemoryUsed[]. We can use Share[] to reduce duplication of memory data structures used by a program’s functions, expressions and variables. Extensive testing reveals memory savings of several hundred KB to several MB with no noticeable overhead. To maximize memory savings use it shortly after a program begins. If the need arises to share specific program elements we can use Share[x] where x is some variable, expression or function. To implement these memory management capabilities, we need look no further Code Snippet 2. Carbone 3 (* PROGRAM INITIALIZATION & MEMORY MANAGEMENT (Begin) = *) (* Clear everything, share memory and start memory tracking *) … Share[]; startmemory = MemoryInUse[]; (* PROGRAM TIME KEEPING (Begin)... *) (* PROGRAM BODY... *) (* PROGRAM TIME KEEPING (End)... *) (* MEMORY MANAGEMENT (End) = *) (* Print out program memory usage information *) maxmem = MaxMemoryUsed[]; finalmemory = MemoryInUse[]; StringForm["Memory in use when program started: ``\n", startmemory] StringForm["Max. memory consumed by program: ``\n", maxmem - startmemory] StringForm["Memory in use when program ended: ``\n", finalmemory] (* CLOSE UP PROGRAM & STREAMS... *) Code Snippet 2: Memory management code. /Concept III (Optional) – System report writing and running external commands As with any investigation, report writing is for to detailing the tools and systems used in an analysis. Mathematica provides “self-documenting” functionality, quickly helping us to gather considerable information about a Wolfram deployment. Fortunately, the names of these functions are straightforward and self- explanatory. For the curious, Mathematica’s documentation has in-depth details about these functions. Ideally, information obtained from these functions should be stored to an external file. While highly specialised output-generating code can be implemented in a NB, it is much simpler to export this information directly to PDF or to a text file. We will use the latter approach, which is shown in Code Snippet 3, where we save the output to file systeminfo.txt about the current deployment. It may be necessary when generating a Mathematica report to obtain specific operating system (OS)
Recommended publications
  • Management of Large Sets of Image Data Capture, Databases, Image Processing, Storage, Visualization Karol Kozak
    Management of large sets of image data Capture, Databases, Image Processing, Storage, Visualization Karol Kozak Download free books at Karol Kozak Management of large sets of image data Capture, Databases, Image Processing, Storage, Visualization Download free eBooks at bookboon.com 2 Management of large sets of image data: Capture, Databases, Image Processing, Storage, Visualization 1st edition © 2014 Karol Kozak & bookboon.com ISBN 978-87-403-0726-9 Download free eBooks at bookboon.com 3 Management of large sets of image data Contents Contents 1 Digital image 6 2 History of digital imaging 10 3 Amount of produced images – is it danger? 18 4 Digital image and privacy 20 5 Digital cameras 27 5.1 Methods of image capture 31 6 Image formats 33 7 Image Metadata – data about data 39 8 Interactive visualization (IV) 44 9 Basic of image processing 49 Download free eBooks at bookboon.com 4 Click on the ad to read more Management of large sets of image data Contents 10 Image Processing software 62 11 Image management and image databases 79 12 Operating system (os) and images 97 13 Graphics processing unit (GPU) 100 14 Storage and archive 101 15 Images in different disciplines 109 15.1 Microscopy 109 360° 15.2 Medical imaging 114 15.3 Astronomical images 117 15.4 Industrial imaging 360° 118 thinking. 16 Selection of best digital images 120 References: thinking. 124 360° thinking . 360° thinking. Discover the truth at www.deloitte.ca/careers Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities. Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities.
    [Show full text]
  • Affinity Photo-Digikam Summer 2020
    UCLA Research Workshop Series Summer 2020 Affinity Photo & digiKam Anthony Caldwell What is Affinity Photo? Wikipedia: Affinity Photo is a raster graphics editor Serif: If you could create your own photo editing software, it would work like this. What is digiKam? Wikipedia: digiKam is a free and open-source image organizer and tag editor digiKam: digiKam is an advanced open-source digital photo management application that provides a comprehensive set of tools for importing, managing, editing, and sharing photos and raw files. Color Color Space Wikipedia: A color space is a specific organization of colors. In combination with physical device profiling, it allows for reproducible representations of color, in both analog and digital representations. Color depth The human eye can distinguish around a million colors Color depth 1-bit color 2 colors 2-bit color 4 colors 3-bit color 8 colors 4-bit color 16 colors 5-bit color 32 colors 8-bit color 256 colors 12-bit color 4096 colors High color (15/16-bit) 32,768 colors or 65,536 colors True color (24-bit) 16,777,216 colors Deep color (30-bit) 1.073 billion 36-bit approximately 68.71 billion colors 48-bit approximately 281.5 trillion colors Note: different configurations of software and hardware can produce different color values for each bit depth listed Color Space Commission internationale de l’éclairage 1931 color space Image Source: https://dot-color.com Color Space Additive color mixing Image Source: https://en.wikipedia.org Color Space K Subtractive color mixing Image Source: https://en.wikipedia.org Color Space The Lab Color Space Image Source: https://docs.esko.com/ Color Space Color Space Comparison Image Source: https://www.photo.net Affinity Photo and digiKam… Questions? Anthony Caldwell UCLA Digital Research Consortium Scholarly Innovation Labs 11630L Charles E.
    [Show full text]
  • Every App in the Universe
    THE BIGGER BOOK OF APPS Resource Guide to (Almost) Every App in the Universe by Beth Ziesenis Your Nerdy Best Friend The Bigger Book of Apps Resource Guide Copyright @2020 Beth Ziesenis All rights reserved. No part of this publication may be reproduced, distributed, or trans- mitted in any form or by any means, including photocopying, recording or other elec- tronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other non- commercial uses permitted by copyright law. For permission requests, write to the pub- lisher at the address below. Special discounts are available on quantity purchases by corporations, associations and others. For details, contact the publisher at the address below. Library of Congress Control Number: ISBN: Printed in the United States of America Avenue Z, Inc. 11205 Lebanon Road #212 Mt. Juliet, TN 37122 yournerdybestfriend.com Organization Manage Lists Manage Schedules Organize and Store Files Keep Track of Ideas: Solo Edition Create a Mind Map Organize and Store Photos and Video Scan Your Old Photos Get Your Affairs in Order Manage Lists BZ Reminder Pocket Lists Reminder Tool with Missed Call Alerts NerdHerd Favorite Simple To-Do List bzreminder.com pocketlists.com Microsoft To Do Todoist The App that Is Eating Award-Winning My Manager’s Favorite Productivity Tool Wunderlist todoist.com todo.microsoft.com Wunderlist Plan The Award-Winning Task Manager with a Task Manager and Planning Tool Rabid Fanbase
    [Show full text]
  • Automated Approach for the Importing the New Photo Set to Private Photo Album to Make It More Searchable
    УДК 004.855 DOI: 10.18523/2617-3808.2020.3.141-148 D. Nikulin, O. Buchko AUTOMATED APPROACH FOR THE IMPORTING THE NEW PHOTO SET TO PRIVATE PHOTO ALBUM TO MAKE IT MORE SEARCHABLE This paper focuses on describing several Informational Retrieval (IR) Multimedia Systems that work primarily with private photo albums and it provides comparison of IR Multimedia Systems in terms of functionality. The Informational Retrieval Multimedia systems, used for comparison are selected as the most known and widely used as well. The Informational Retrieval Multimedia systems compared are Mylio, Google Photo, Apple Photo, Synology Moments and digiKam. Moreover, based on these systems compari- son, this paper provides the definition of the end-point user needs. Then it provides the identification and the prioritization (based on the author’s experience and opinion) the issues in private information Retrieval multimedia systems to be addressed by any technical solution. The following issues have been addressed as the most important from the end-point user’s perspective: First of all, it is “Not existing EXIF file metada- ta”.(It is divided into two sub issues: not existing taken date and GEO data for place it was taken at); as second, the linking a photo to an author person entity (Based on camera brand and model given as metadata); And as the last one, linking the set of photos to the predefined type of event, like birthdays, anniversaries, holidays, trips etc.(Based on tagging the photos in semi-automated way). For each issue, this document has provided the technical approaches and program algorithms (in a pseudo code) as well.
    [Show full text]
  • Picasa Download Free for Windows 7 Ultimate
    Picasa download free for windows 7 ultimate Picasa free download. Get new version of Picasa. Photo sharing and exploration service ✓ Free ✓ Updated ✓ Download now. Picasa, free and safe download. Picasa Picasa is an indispensable piece of software for photography fans, and functions in a number of 7 / 10 ( votes). Now you can upload and edit your pictures easily and without spending a penny There are quite a few photo editing softwares available online This has. Photo management and editing software which can upload, share, backup 6 screenshots along with a virus/malware test and a free download link. fine under Microsoft Windows 10, 8, , 7, Vista and XP on either a bit. Picasa is a photo editing and management program that also lets you take advantage of Google+ integration to back up your photos automatically. With a nice. Windows XP, Windows Vista, Windows , Windows 7, Windows 8, If you are looking for image viewer, Picasa is among the best in this. Picasa is a very comprehensive program for image management and graphic editing This program, developed by the software giant Google, has become extremely fast and easy to use, Must-Have Apps for Windows 7. Licence Free OS Support Windows , Windows XP, Windows Vista, Windows 7, Windows 8 Downloads Total: , | Last week. Download Picasa Picasa is a software developed by Google, Inc. whose function is to allow the user view and Requires Windows: XP and up. Picasa Download Free For Windows 7 Ultimate > download free ie for windows 7 twilight eclipse theme for windows. Organize, edit, and share your photos online using Picasa Windows XP / Vista / Windows 7 / Windows 8 / XP64 / Vista64 / Windows 7 Name: File size: MB.
    [Show full text]
  • Handset Industry 2013 Outlook
    07 January 2013 Americas/United States Equity Research Telecommunications Equipment / MARKET WEIGHT Handset Industry 2013 Outlook Research Analysts INDUSTRY PRIMER Kulbinder Garcha 212 325 4795 [email protected] Bigger market, Apple and Samsung win Achal Sultania 44 20 7883 6884 ■ Market size underestimated for both smartphones/handsets. Our bottom-up [email protected] analysis suggests that the market underestimates the size of low-end ‘white- Talal Khan, CFA label’ smartphones, which causes us to restate our 2012/2013 volume estimates 212 325 8603 for the smartphone market higher by 6%/15% and 3%/4% for overall handsets. [email protected] We also raise our smartphone volume estimates by 20-25% long term and now Matthew Cabral estimate 1.43bn/1.74bn smartphones to be shipped in 2015/2017. We believe 212 538 6260 that the growth of ‘white-label’ smartphone market specifically poses a threat for [email protected] vendors like Nokia, RIMM, LG and possibly Samsung, given their exposure to feature phones and low-end smartphone segments. Ray Bao 212 325 1227 ■ Raising LT smartphone units to 1.74bn – a barbell develops for price points. [email protected] We believe that the addressable market for smartphones is 4.95bn longer term, Asian Research Analysts resulting in effective penetration of only 24% currently given our estimate of 1.2bn smartphone users by end of 2012. We expect effective smartphone Randy Abrams, CFA 886 2 2715 6366 penetration to rise to ~80% long term driving smartphone volumes of [email protected] 1.43bn/1.74bn units by 2015/2017 (26%/19% CAGR over this period).
    [Show full text]
  • How to Compare One Million Images?
    1/40 How to Compare One Million Images? Dr. Lev Manovich, Professor, Visual Arts Department, University of California, San Diego (UCSD). Director, Software Studies Initiative (softwarestudies.com) at California Institute for Telecommunication and Information (Calit2). Dr. Jeremy Douglass, Post‐doctoral Researcher, Software Studies Initiative. Tara Zepel, Ph.D. candidate, Art History, Theory, & Criticism, UCSD. Exploring one million manga pages on the 287 megapixel HIPerSpace (The Highly Interactive Parallelized Display Space) at Calit2, San Diego. HIPerSpace offers 35,840 x 8,000 pixels resolution (287 megapixels) on 31.8 feet wide and 7.5 feet tall display wall made from 70 30‐inch monitors. 2/40 INTRODUCTION The description of joint NEH/NSF Digging into Data competition (2009) organized by Office of Digital Humanities at the National Endowment of Humanities (the U.S. federal agency which funds humanities research) opened with these questions: “How does the notion of scale affect humanities and social science research? Now that scholars have access to huge repositories of digitized data— far more than they could read in a lifetime—what does that mean for research?” A year, later, an article in New York Time (November 16, 2010) stated: “The next big idea in language, history and the arts? Data.” While digitized archives of historical documents certainly represent a jump in scale in comparison to traditionally small corpora used by humanists, researchers and critics interested in contemporary culture have even a larger challenge. With the notable exception of Google Books, the size of digital historical archives pales in comparison to the quantity of digital media created by contemporary cultural producers and users – designs, motion graphics, web sites, blogs, YouTube videos, Flickr photos, Facebook postings, Twitter messages, and other kinds of professional and participatory media.
    [Show full text]
  • Book VI Image
    b bb bbb bbbbon.com bbbb Basic Photography in 180 Days Book VI - Image Editor: Ramon F. aeroramon.com Contents 1 Day 1 1 1.1 Visual arts ............................................... 1 1.1.1 Education and training .................................... 1 1.1.2 Drawing ............................................ 1 1.1.3 Painting ............................................ 3 1.1.4 Printmaking .......................................... 5 1.1.5 Photography .......................................... 5 1.1.6 Filmmaking .......................................... 6 1.1.7 Computer art ......................................... 6 1.1.8 Plastic arts .......................................... 6 1.1.9 United States of America copyright definition of visual art .................. 7 1.1.10 See also ............................................ 7 1.1.11 References .......................................... 9 1.1.12 Bibliography ......................................... 9 1.1.13 External links ......................................... 10 1.2 Image ................................................. 20 1.2.1 Characteristics ........................................ 21 1.2.2 Imagery (literary term) .................................... 21 1.2.3 Moving image ......................................... 22 1.2.4 See also ............................................ 22 1.2.5 References .......................................... 23 1.2.6 External links ......................................... 23 2 Day 2 24 2.1 Digital image ............................................
    [Show full text]
  • X-Ways Forensics & Winhex Manual
    X-Ways Software Technology AG X-Ways Forensics/ WinHex Integrated Computer Forensics Environment. Data Recovery & IT Security Tool. Hexadecimal Editor for Files, Disks & RAM. Manual Copyright © 1995-2021 Stefan Fleischmann, X-Ways Software Technology AG. All rights reserved. Contents 1 Preface ..................................................................................................................................................1 1.1 About WinHex and X-Ways Forensics.........................................................................................1 1.2 Legalities.......................................................................................................................................2 1.3 License Types ...............................................................................................................................4 1.4 More differences between WinHex & X-Ways Forensics............................................................5 1.5 Getting Started with X-Ways Forensics........................................................................................6 2 Technical Background ........................................................................................................................7 2.1 Using a Hex Editor........................................................................................................................7 2.2 Endian-ness...................................................................................................................................8 2.3 Integer
    [Show full text]
  • Adam Strupczewski Image Organizer
    COVENTRY UNIVERSITY Faculty of Engineering and Computing Image Organizer by Adam Strupczewski SID : 2394167 314 CR Creative Project Supervisor: Ph.D. Chris Peters Adam Strupczewski Image Organizer Table of contents Declaration of Originality ....................................................................................................... 4 Copyright Acknowledgement ................................................................................................. 4 Acknowledgements ............................................................................................................... 5 Abstract ................................................................................................................................. 6 1. Introduction ....................................................................................................................... 7 1.1. Project Background .................................................................................................... 7 1.2. Project Objectives ...................................................................................................... 8 2. Project Management ......................................................................................................... 9 2.1. Project Requirements and Deliverables ...................................................................... 9 2.1.1. Coventry University requirements ........................................................................ 9 2.1.2. Client’s requirements ..........................................................................................
    [Show full text]
  • Web Based Image Management Software
    Web based image management software click here to download Gain greater control of your photos, videos and other digital files using Imagespace image management software. A great resource for any organization seeking maximum control of their digital assets, Imagespace is the web-based solution that makes it easy to find, share, and archive your photo, videos and other digital. DAM designed for brands to easily manage images, video, messaging, product specs, logos, and other marketing content. ResourceSpace is the web-based Digital Asset Management (DAM) software of choice for leading commercial, academic and not for profit organisations, offering a convenient, productive and easy to. Enterprise teams have huge volumes of images and creative files. Without the right image management software, it is difficult to keep all of them in order. The best solutions are cloud-based, help you find images fast, make sharing easy and ensure the right images are used properly. To find out if Webdam is the right image. Network based photo database, digital photo management software solution from Daminion. Single or multi-user, server based for small teams and creative pros.​Pricing · ​SEE A DEMO · ​About Us · ​What's New. Gallery is a very full featured tool that has everything on your list. PHP based and very easy to install on Linux or IIS www.doorway.ru It's not designed to be used quite how I think you have in mind but there should be enough features that you can reuse. Whether you make images to share with friends and family or for clients (or both) you'll need a software aid to manage your files.
    [Show full text]
  • Photo Download for Windows 10 Microsoft Photos App Download/Reinstall on Windows 10 [Minitool News] an Introduction of Microsoft Photos App
    photo download for windows 10 Microsoft Photos App Download/Reinstall on Windows 10 [MiniTool News] An introduction of Microsoft Photos app. Learn how to access Microsoft Windows Photos app, how to download and install, or reinstall Microsoft Photos app on your computer. FYI, MiniTool Software offers you free movie maker, free video editor, free video converter, free screen recorder, free video downloader, free photo and video recovery software, and more. To manage & edit photos and videos on Windows 10, you can use Windows built-in free Microsoft Photos app. This post teaches you how to open Microsoft Photos app, how to download and install Microsoft Photos app, how to uninstall and reinstall Microsoft app on your Windows 10 computer. What Is Microsoft Photos. Microsoft Photos is a photo and video editor designed by Microsoft. It was firstly introduced in Windows 8 and is also included in Windows 10. You can use this app to view, organize, edit, share your images and photos, play and edit video clips, create albums, etc. Microsoft Photos video editor lets you trim videos, change filters, text, motion, music, add 3D effects, and more. App Type: Image viewer, image organizer, video editor, video player, raster graphics editor. License: Is Microsoft Photos free? It is free to use for all users but with in-app purchase for more advanced features. Availability: Windows 10/8/8.1, Windows 10 Mobile, Xbox One. Support 64 languages. Predecessor: Windows Photo Viewer, Windows Photo Gallery, Windows Movie Maker. Here’s the walkthrough for how to download Microsoft Store app for Windows 10 or Windows 11 PC.
    [Show full text]