Rolando V. RaqueñoSunday, December 20, 2015 1 Mystery Images.

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

BMP Hide ‘n’ Seek What is BMP Hide ‘n’ Seek ? –It’s a tool that lets you hide text messages in BMP files without much visible change in the picture. –Change.
The Lossless JPEG standard y=(a+b)/2 = 145 r= =-35 Category (r) = 6, Magnitude (r) = ’s complement of cat (r) = Rep(35)={6,011100}
Compositing Images in Photoshop FYS100 Creative Discovery in Digital Art Forms Spring 2007 Burg.
A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
Rolando V. RaqueñoTuesday, May 12, FINAL Project Information Two Design Review presentations ( minutes long) A Final Document of your Project.
From Image Capture to Digital Output. In looking at this we shall consider the following… Quantisation. Quantisation Error. Interpolation. Viewing images.
CSE 803 Using images in C++ Computing with images Applications & Methods 2D arrays in C++ Programming project 4.
Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-
Rolando V. RaqueñoSaturday, June 27, NetPBM Image Format Exercises
Digital Audio, Image and Video Hao Jiang Computer Science Department Sept. 6, 2007.
Rolando V. RaqueñoSaturday, June 27, Quiz #6 Topics cut paste sort tail head.
Quiz #6 Topics cut paste sort tail head. Debugging in IDL.
ESRM 250 & CFR 520: Introduction to GIS © Phil Hurvitz, KEEP THIS TEXT BOX this slide includes some ESRI fonts. when you save this presentation,
Information Technology Services North Dakota State University Lorna Olsen Get the Best Digital Images Possible What’s it all about anyway?
How Images are Represented Bitmap images (Dots used to draw the image) Monochrome images 8 bit grey scale images 24 bit colour Colour lookup tables Vector.
Unix Filters Text processing utilities. Filters Filter commands – Unix commands that serve dual purposes: –standalone –used with other commands and pipes.
UNIX Filters.
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Shell Scripting Awk (part1) Awk Programming Language standard unix language that is geared for text processing and creating formatted reports but it.
F13 Forensic tool analysis Dr. John P. Abraham Professor UTPA.
Multimedia Specification Design and Production 2012 / Semester 1 / L2 Lecturer: Dr. Nikos Gazepidis
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
Advanced File Processing
Beyond Record Structures Dr. Robert J. Hammell Assistant Professor Towson University Computer and Information Sciences Department 8000 York Road - Suite.
Topics Introduction Hardware and Software How Computers Store Data
1 Image Basics Hao Jiang Computer Science Department Sept. 4, 2014.
1 Real-World File Structures by Tom Davis Asst. Professor, Computer Science St. Edward's University 3001 South Congress Avenue Austin, Texas 78704
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Measurements in Fluid Mechanics 058:180:001 (ME:5180:0001) Time & Location: 2:30P - 3:20P MWF 218 MLH Office Hours: 4:00P – 5:00P MWF 223B-5 HL Instructor:
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
ATMOSPHERIC CORRECTION – HYPERSPECTRAL DATA Course: Special Topics in Remote Sensing & GIS Mirza Muhammad Waqar Contact:
Bit-Mapped Graphic Data: Input (Capture) Hardware Multimedia – Section 2.
Computer Science 101 Images in Web Pages. Image Files Two common formats, GIF and JPEG GIF images are more flexible for use as icons JPEG images are sharper.
Bobby Bodenheimer CS 258 Introduction to Graphics Fall 2003 The Tiff Image Specification.
Using the ImageViewer classes. ImageViewer classes CAboutDlg CAboutDlg CChildFrame CChildFrame CDlgTemplateBuilder CDlgTemplateBuilder CInputDialog CInputDialog.
September 21, COMPUTER VISION WEB PAGE IS UP !! OR Simply go to computer science homepage.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
DA2022 – Computer Architecture Introduction to ZPL Marcus Edvinsson with slides originally made by Morgan Ericsson.
1 Imaging Techniques for Flow and Motion Measurement Lecture 2 Lichuan Gui University of Mississippi 2011 Digital Image & Image Processing.
CONFIGURING YOUR CAMERA. IMAGE SIZE AND COMPRESSION  Your camera probably allows you to select a number of different size and compression settings. 
Using Commands Unix / Linux Preparation Course May 6, 2012 Serrekunda, The Gambia.
ECE Department: University of Massachusetts, Amherst ECE 354 Lab 4: Remote Control of a Digital Camera.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
1 Winter Quarter 2003Rolando V. Raqueño FINAL Project Information One Design Review presentations (10 minutes long) A Final Document of your Project Wiki.
September 9, 2008SPEEDUP Workshop - HDF5 Tutorial1 Introduction to HDF5 Command-line Tools.
02-Gray Scale Control TTF. A TTF tells us how an imaging device relates the gray level of the input to the gray level of the output. P L Luminance, L.
Why a bitmap (.bmp), not a.jpg? If you cannot save a.bmp, make it an uncompressed.tif. Compression (of this 8-bit 397,000 pixel image): none (397kb memory)medium.
Using the “CLI” Unix / Linux Preparation Course June 9, 2013 Lusaka, Zambia.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
COMPUTER VISION Larry Wolff MTW Office: 212NEB Office Hours: Wed. 1-2PM.
Introduction to Image Processing. What is Image Processing? Manipulation of digital images by computer. Image processing focuses on two major tasks: –Improvement.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Hayabusa data archive, format, and tools N. Hirata.
ITEC2110, Digital Media Chapter 3 Digital Image Processing 1 GGC -- ITEC Digital Media.
SIMPLE FILTERS. CONTENTS Filters – definition To format text – pr Pick lines from the beginning – head Pick lines from the end – tail Extract characters.
Yingfang Zhang Department of Computer Science UCCS
FINAL Project Information
Topics Introduction Hardware and Software How Computers Store Data
Unix Scripting Session 4 March 27, 2008.
Shell Programming Winter Quarter 2005 Rolando V. Raqueño.
Outline Image formats and basic operations Image representation
Guide To UNIX Using Linux Third Edition
Understanding Hex “I hope you have the worst headache of your life, then you will begin to understand” ~unknown.
Presentation transcript:

Rolando V. RaqueñoSunday, December 20, Mystery Images

Rolando V. RaqueñoSunday, December 20, Given an image of unknown origin Dimensions of the image? –Most importantly the number of samples Aspect ratio of the image? Number of bytes per pixel? Number of bands of the image? Number of bits per pixel? External or internal compression applied –gzip –tiff or jpeg

Rolando V. RaqueñoSunday, December 20, Know the imaging instrument Find out what kind of image capture device –Framing Camera with filters Band Sequential Images (BSQ) –Flatbed of Pushbroom scanner Band interleaved by line (BIL) –Line Scanner Band interleaved by pixel (BIP)

Rolando V. RaqueñoSunday, December 20, Tools at your disposal for dissecting the image % file % anytopnm % more % ls -l % bc -l % od % dd % strings % rawtopgm or cat % xv

Rolando V. RaqueñoSunday, December 20, file Uses information in /etc/magic to determine the type of a file. Common outputs from the file command % file irod.img.gz irod.img.gz: gzip compressed data - deflate method, original file name, max compression % file readme readme: ascii text

Rolando V. RaqueñoSunday, December 20, File (more examples) % file RIT_bip.img RIT_bip.img: data % file modtran4.bat modtran4.bat: executable c-shell script bean% file maincode.exe maincode.exe: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped

Rolando V. RaqueñoSunday, December 20, File (image examples) Don’t always believe the extensions bean% file feep.tif feep.tif: TIFF file, big-endian bean% file feep.pgm feep.pgm: PGM ascii file bean% file AVIRIS_RIT.jpg AVIRIS_RIT.jpg: JPEG file bean% file rotate.pbm rotate.pbm: PGM raw file

Rolando V. RaqueñoSunday, December 20, anytopnm Shell script that does a brute force test on images and converts to pnm format % anytopnm mystery_file > mystery_file.pnm

Rolando V. RaqueñoSunday, December 20, od Can be used to quickly check the minimum and maximum values in a file Stupid UNIX Trick % od –d –v image.raw | cut –c10- | tr –s “ “ “\012” | sort –nu | head

Rolando V. RaqueñoSunday, December 20, Xv and NetPBM Xv want multi-byte NetPBM files in little- endian form N.B. NetPBM utilities behave inconsistently for multi-byte data

Rolando V. RaqueñoSunday, December 20, Can you guess the dimensions of the image? Try to guess the number of rows (width) first. –Possible guesses ^n 2^n+2^(n-1)

Rolando V. RaqueñoSunday, December 20, Can you guess the aspect ratio of the image? wc -c or ls -l –determine how many bytes are in the image Square root of the image size –Multiple of a perfect square Assume that the image is greyscale & square –use rawtopgm % rawtopgm image.raw > image.pgm

Rolando V. RaqueñoSunday, December 20, Square Gray Scale Image Used rawtopgm to create a pgm file and then use xv to display

Rolando V. RaqueñoSunday, December 20, A convenient little trick If you are just experimenting with a mystery image % rawtopgm image.raw | xv -

Rolando V. RaqueñoSunday, December 20, Does it have a header? Not a perfect square –go ahead and try to display it as if it were a square image to see if it has a header.

Rolando V. RaqueñoSunday, December 20, Square Grey Scale image with a header This structure means you have a header in the file that is causing a uniform shift You can fix this by using dd

Rolando V. RaqueñoSunday, December 20, Square image no header Your guess on the width of the image is short by one pixel

Rolando V. RaqueñoSunday, December 20, Square image no header Your guess on the width of the image is long by one pixel

Rolando V. RaqueñoSunday, December 20, Square image no header You probably guessed a little too low on the width of this image (off by 6 pixels)

Rolando V. RaqueñoSunday, December 20, Square Image with no header Your probably guessed a little too high on the width of the image (off by 6 pixels)

Rolando V. RaqueñoSunday, December 20, A color image displayed as greyscale image Correct dimensions – 256x256x3 BIP Incorrectly assumed –443x443 image with header N.B /3=256^2 Indicates a multiband image

Rolando V. RaqueñoSunday, December 20, Multiband Assumption Once multiband image is assumed –Need to determine interleaving –Can be deduced by displaying first band –This assumes you have a guess of image dimension Extract the first band out using dd

Rolando V. RaqueñoSunday, December 20, First band of color image file assumed to be BSQ Assume a square image for first band Color image file obviously not BSQ

Rolando V. RaqueñoSunday, December 20, Square color image displayed as a greyscale (3:1 aspect ratio) Original image 3x256x256 Displayed it as a greyscale 768x256 To get insight into interleaving structure. BIP file would look like the left image

Rolando V. RaqueñoSunday, December 20, Square color image displayed as greyscale( 3:1 aspect ratio) This is how a BIL image would behave What we have here is the individual bands side by side

Rolando V. RaqueñoSunday, December 20, This is how a BSQ file would behave Square color image displayed as greyscale( 3:1 aspect ratio)

Rolando V. RaqueñoSunday, December 20, Multibyte pixel image Need to be careful about the endian of the machine on which the image was written Can use dd to swap bytes for short integer images (2-bytes per pixel) or the swap_endian function in IDL

Rolando V. RaqueñoSunday, December 20, Useful IDL command for image dimension analysis Key goal is to find integer dimensions Example –You know a given size (pixels, bytes, lines) –Need to find an integer number that “fits” with the sizes you are observing Minimize trial and error using the following IDL commands

Rolando V. RaqueñoSunday, December 20, You know one dimension… One dimension is 384 lines/samples You have pixels Find candidate integer dimension IDL> a=findgen(384) IDL> b= mod a IDL> c=where(b eq 0) IDL> print,a(c)

Rolando V. RaqueñoSunday, December 20, Mystery Image Examples Check Wiki for sources of examples. –Keyword: mystery image