100% found this document useful (7 votes)
40 views56 pages

MATLAB Image Processing Toolbox User S Guide The Mathworks PDF Download

The document is a user's guide for the MATLAB Image Processing Toolbox, detailing its features, configuration notes, and basic image processing techniques. It includes links to various MATLAB toolbox user guides and contact information for MathWorks. The guide also covers image types, coordinate systems, and provides examples for image import, processing, and export.

Uploaded by

nvzywucdcn6400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
40 views56 pages

MATLAB Image Processing Toolbox User S Guide The Mathworks PDF Download

The document is a user's guide for the MATLAB Image Processing Toolbox, detailing its features, configuration notes, and basic image processing techniques. It includes links to various MATLAB toolbox user guides and contact information for MathWorks. The guide also covers image types, coordinate systems, and provides examples for image import, processing, and export.

Uploaded by

nvzywucdcn6400
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

MATLAB Image Processing Toolbox User s Guide The

Mathworks install download

https://textbookfull.com/product/matlab-image-processing-toolbox-
user-s-guide-the-mathworks/

Download more ebook instantly today - get yours now at textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

MATLAB Signal Processing Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-signal-processing-
toolbox-user-s-guide-the-mathworks/

MATLAB Econometrics Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-econometrics-toolbox-
user-s-guide-the-mathworks/

MATLAB Bioinformatics Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-bioinformatics-toolbox-
user-s-guide-the-mathworks/

MATLAB Mapping Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-mapping-toolbox-user-s-
guide-the-mathworks/
MATLAB Optimization Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-optimization-toolbox-
user-s-guide-the-mathworks/

MATLAB Trading Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-trading-toolbox-user-s-
guide-the-mathworks/

MATLAB Computer Vision Toolbox User s Guide The


Mathworks

https://textbookfull.com/product/matlab-computer-vision-toolbox-
user-s-guide-the-mathworks/

MATLAB Curve Fitting Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-curve-fitting-toolbox-
user-s-guide-the-mathworks/

MATLAB Fuzzy Logic Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-
s-guide-the-mathworks/
Image Processing Toolbox™
User's Guide

R2020a
How to Contact MathWorks

Latest news: www.mathworks.com

Sales and services: www.mathworks.com/sales_and_services

User community: www.mathworks.com/matlabcentral

Technical support: www.mathworks.com/support/contact_us

Phone: 508-647-7000

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098
Image Processing Toolbox™User's Guide
© COPYRIGHT 1993–2020 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer
software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain
to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be
trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Revision History
August 1993 First printing Version 1
May 1997 Second printing Version 2
April 2001 Third printing Revised for Version 3.0
June 2001 Online only Revised for Version 3.1 (Release 12.1)
July 2002 Online only Revised for Version 3.2 (Release 13)
May 2003 Fourth printing Revised for Version 4.0 (Release 13.0.1)
September 2003 Online only Revised for Version 4.1 (Release 13.SP1)
June 2004 Online only Revised for Version 4.2 (Release 14)
August 2004 Online only Revised for Version 5.0 (Release 14+)
October 2004 Fifth printing Revised for Version 5.0.1 (Release 14SP1)
March 2005 Online only Revised for Version 5.0.2 (Release 14SP2)
September 2005 Online only Revised for Version 5.1 (Release 14SP3)
March 2006 Online only Revised for Version 5.2 (Release 2006a)
September 2006 Online only Revised for Version 5.3 (Release 2006b)
March 2007 Online only Revised for Version 5.4 (Release 2007a)
September 2007 Online only Revised for Version 6.0 (Release 2007b)
March 2008 Online only Revised for Version 6.1 (Release 2008a)
October 2008 Online only Revised for Version 6.2 (Release 2008b)
March 2009 Online only Revised for Version 6.3 (Release 2009a)
September 2009 Online only Revised for Version 6.4 (Release 2009b)
March 2010 Online only Revised for Version 7.0 (Release 2010a)
September 2010 Online only Revised for Version 7.1 (Release 2010b)
April 2011 Online only Revised for Version 7.2 (Release 2011a)
September 2011 Online only Revised for Version 7.3 (Release 2011b)
March 2012 Online only Revised for Version 8.0 (Release 2012a)
September 2012 Online only Revised for Version 8.1 (Release 2012b)
March 2013 Online only Revised for Version 8.2 (Release 2013a)
September 2013 Online only Revised for Version 8.3 (Release 2013b)
March 2014 Online only Revised for Version 9.0 (Release 2014a)
October 2014 Online only Revised for Version 9.1 (Release 2014b)
March 2015 Online only Revised for Version 9.2 (Release 2015a)
September 2015 Online only Revised for Version 9.3 (Release 2015b)
March 2016 Online only Revised for Version 9.4 (Release 2016a)
September 2016 Online only Revised for Version 9.5 (Release 2016b)
March 2017 Online only Revised for Version 10.0 (Release 2017a)
September 2017 Online only Revised for Version 10.1 (Release 2017b)
March 2018 Online only Revised for Version 10.2 (Release 2018a)
September 2018 Online only Revised for Version 10.3 (Release 2018b)
March 2019 Online only Revised for Version 10.4 (Release 2019a)
September 2019 Online only Revised for Version 11.0 (Release 2019b)
March 2020 Online only Revised for Version 11.1 (Release 2020a)
Contents

Getting Started
1
Image Processing Toolbox Product Description . . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Configuration Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

Compilability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

Basic Image Import, Processing, and Export . . . . . . . . . . . . . . . . . . . . . . . 1-5

Correct Nonuniform Illumination and Analyze Foreground Objects . . . . 1-10

Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18


Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Image Processing Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
MATLAB Newsgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19

Introduction
2
Images in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

Image Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3


Pixel Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Spatial Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

Define World Coordinates Using XData and YData Properties . . . . . . . . . 2-6


Display an Image using Nondefault Spatial Coordinates . . . . . . . . . . . . . . 2-6

Define World Coordinates Using Spatial Referencing . . . . . . . . . . . . . . . . 2-9

Image Types in the Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11


Binary Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Grayscale Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Truecolor Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
HDR Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Multispectral and Hyperspectral Images . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Label Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

v
Display Separated Color Channels of RGB Image . . . . . . . . . . . . . . . . . . . 2-17

Convert Between Image Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20

Convert Image Data Between Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21


Overview of Image Class Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Losing Information in Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Converting Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21

Perform an Operation on a Sequence of Images . . . . . . . . . . . . . . . . . . . 2-22

Detecting Cars in a Video of Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24

Process Folder of Images Using Image Batch Processor App . . . . . . . . . 2-30

Process Large Set of Images Using MapReduce Framework and Hadoop


......................................................... 2-38

Work with Image Sequences as Multidimensional Arrays . . . . . . . . . . . . 2-48


Create Multidimensional Array Representing Image Sequence . . . . . . . . 2-48
Display Image Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-48
Process Image Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-49

Image Arithmetic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-51

Image Arithmetic Clipping Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-52

Nest Calls to Image Arithmetic Functions . . . . . . . . . . . . . . . . . . . . . . . . 2-53

Find Vegetation in a Multispectral Image . . . . . . . . . . . . . . . . . . . . . . . . . 2-54

Reading and Writing Image Data


3
Get Information About Graphics Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

Read Image Data into the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Read Multiple Images from a Single Graphics File . . . . . . . . . . . . . . . . . . 3-5

Read and Write 1-Bit Binary Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

Write Image Data to File in Graphics Format . . . . . . . . . . . . . . . . . . . . . . . 3-7

Determine Storage Class of Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

DICOM Support in Image Processing Toolbox . . . . . . . . . . . . . . . . . . . . . . 3-9

Read Metadata from DICOM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10


Private DICOM Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Create Your Own Copy of DICOM Dictionary . . . . . . . . . . . . . . . . . . . . . . 3-11

vi Contents
Read Image Data from DICOM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
View DICOM Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

Write Image Data to DICOM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13


Include Metadata with Image Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13

Explicit Versus Implicit VR Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14

Remove Confidential Information from a DICOM File . . . . . . . . . . . . . . . 3-15

Create New DICOM Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16

Mayo Analyze 7.5 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

Interfile Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19

Work with High Dynamic Range Images . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20


Read HDR Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Display and Process HDR Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Create High Dynamic Range Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Write High Dynamic Range Image to File . . . . . . . . . . . . . . . . . . . . . . . . 3-21

Display High Dynamic Range Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22

Displaying and Exploring Images


4
Image Display and Exploration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

Display an Image in a Figure Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Specifying the Initial Image Magnification . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Controlling the Appearance of the Figure . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

Display Multiple Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7


Display Multiple Images in Separate Figure Windows . . . . . . . . . . . . . . . . 4-7
Display Multiple Images in a Montage . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Display Images Individually in the Same Figure . . . . . . . . . . . . . . . . . . . . 4-9
Compare a Pair of Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10

View Thumbnails of Images in Folder or Datastore . . . . . . . . . . . . . . . . . 4-11

Interact with Images Using Image Viewer App . . . . . . . . . . . . . . . . . . . . . 4-17


Open Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Initial Image Magnification in Image Viewer App . . . . . . . . . . . . . . . . . . 4-19
Choose Colormap Used by Image Viewer App . . . . . . . . . . . . . . . . . . . . . 4-19
Import Image Data from Workspace into Image Viewer App . . . . . . . . . . 4-20
Export Image Data from Image Viewer App to Workspace . . . . . . . . . . . . 4-21
Save Image Data Displayed in Image Viewer . . . . . . . . . . . . . . . . . . . . . . 4-22
Close the Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Print Images Displayed in Image Viewer App . . . . . . . . . . . . . . . . . . . . . 4-23

vii
Explore Images with Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Explore Images Using the Overview Tool . . . . . . . . . . . . . . . . . . . . . . . . 4-24
Pan Images Displayed in Image Viewer App . . . . . . . . . . . . . . . . . . . . . . 4-25
Zoom Images in the Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Specify Image Magnification in Image Viewer . . . . . . . . . . . . . . . . . . . . . 4-26

Get Pixel Information in Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . 4-28


Determine Individual Pixel Values in Image Viewer . . . . . . . . . . . . . . . . . 4-28
Determine Pixel Values in an Image Region . . . . . . . . . . . . . . . . . . . . . . 4-29
Determine Image Display Range in Image Viewer . . . . . . . . . . . . . . . . . . 4-32

Measure Distance Between Pixels in Image Viewer App . . . . . . . . . . . . . 4-34


Determine Distance Between Pixels Using Distance Tool . . . . . . . . . . . . . 4-34
Export Endpoint and Distance Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
Customize the Appearance of the Distance Tool . . . . . . . . . . . . . . . . . . . 4-36

Get Image Information in Image Viewer App . . . . . . . . . . . . . . . . . . . . . . 4-37

Adjust Image Contrast in Image Viewer App . . . . . . . . . . . . . . . . . . . . . . 4-39


Open the Adjust Contrast Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-39
Adjust Image Contrast Using the Histogram Window . . . . . . . . . . . . . . . 4-41
Adjust Image Contrast Using Window/Level Tool . . . . . . . . . . . . . . . . . . . 4-42
Make Contrast Adjustments Permanent . . . . . . . . . . . . . . . . . . . . . . . . . 4-44

Interactive Contrast Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-46

Crop Image Using Image Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-47

Explore 3-D Volumetric Data with Volume Viewer App . . . . . . . . . . . . . . 4-50


Load Volume Data into the Volume Viewer . . . . . . . . . . . . . . . . . . . . . . . 4-50
View the Volume Data in the Volume Viewer . . . . . . . . . . . . . . . . . . . . . . 4-52
Adjust View of Volume Data in Volume Viewer . . . . . . . . . . . . . . . . . . . . . 4-55
Refine the View with the Rendering Editor . . . . . . . . . . . . . . . . . . . . . . . 4-57
Save Volume Viewer Rendering and Camera Configuration Settings . . . . 4-62

Explore 3-D Labeled Volumetric Data with Volume Viewer App . . . . . . . 4-63
Load Labeled Volume and Intensity Volume into Volume Viewer . . . . . . . 4-63
View Labeled Volume in Volume Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 4-65
Embed Labeled Volume with Intensity Volume . . . . . . . . . . . . . . . . . . . . 4-66

View Image Sequences in Video Viewer App . . . . . . . . . . . . . . . . . . . . . . . 4-71


View MRI Sequence Using Video Viewer App . . . . . . . . . . . . . . . . . . . . . 4-71
Configure Video Viewer App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74
Specifying the Frame Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-75
Specify Color Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-76
Get Information about an Image Sequence . . . . . . . . . . . . . . . . . . . . . . . 4-76

Convert Multiframe Image to Movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-78

Display Different Image Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-79


Display Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-79
Display Grayscale Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-79
Display Binary Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-81
Display Truecolor Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-82

viii Contents
Add Color Bar to Displayed Grayscale Image . . . . . . . . . . . . . . . . . . . . . . 4-84

Print Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-86


Graphics Object Properties That Impact Printing . . . . . . . . . . . . . . . . . . 4-86

Manage Display Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-87


Retrieve Values of Toolbox Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . 4-87
Set Values of Toolbox Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-87

Building GUIs with Modular Tools


5
Build Custom Image Processing Apps Using Modular Interactive Tools
.......................................................... 5-2

Interactive Modular Tool Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7


Display Target Image in Figure Window . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Associate Modular Tools with Target Image . . . . . . . . . . . . . . . . . . . . . . . 5-8
Associate Modular Tools with Particular Target Image . . . . . . . . . . . . . . . 5-9
Get Handle to Target Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Specify Parent of Modular Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Position Modular Tools in GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Adding Navigation Aids to GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15

Build App to Display Pixel Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19

Build App for Navigating Large Images . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21

Customize Modular Tool Interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23

Build Image Comparison Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24

Create Angle Measurement Tool Using ROI Objects . . . . . . . . . . . . . . . . 5-27

Geometric Transformations
6
Resize an Image with imresize Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Rotate an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6

Crop an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8

Translate an Image using imtranslate Function . . . . . . . . . . . . . . . . . . . . 6-10

2-D and 3-D Geometric Transformation Process Overview . . . . . . . . . . . 6-13


Create Geometric Transformation Object . . . . . . . . . . . . . . . . . . . . . . . . 6-13
Perform the Geometric Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16

ix
Matrix Representation of Geometric Transformations . . . . . . . . . . . . . . . 6-17
2-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
2-D Projective Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Create Composite 2-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . 6-19
3-D Affine Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21

Specify Fill Values in Geometric Transformation Output . . . . . . . . . . . . . 6-23

Perform Simple 2-D Translation Transformation . . . . . . . . . . . . . . . . . . . 6-25

N-Dimensional Spatial Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29

Register Two Images Using Spatial Referencing to Enhance Display . . . 6-31

Create a Gallery of Transformed Images . . . . . . . . . . . . . . . . . . . . . . . . . . 6-36

Exploring a Conformal Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-52

Exploring Slices from a 3-Dimensional MRI Data Set . . . . . . . . . . . . . . . 6-64

Padding and Shearing an Image Simultaneously . . . . . . . . . . . . . . . . . . . 6-71

Image Registration
7
Approaches to Registering Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Registration Estimator App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Intensity-Based Automatic Image Registration . . . . . . . . . . . . . . . . . . . . . 7-3
Control Point Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Automated Feature Detection and Matching . . . . . . . . . . . . . . . . . . . . . . . 7-5

Register Images Using Registration Estimator App . . . . . . . . . . . . . . . . . . 7-6

Load Images, Spatial Referencing Information, and Initial


Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
Load Images from File or Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
Provide Spatial Referencing Information . . . . . . . . . . . . . . . . . . . . . . . . . 7-15
Provide an Initial Geometric Transformation . . . . . . . . . . . . . . . . . . . . . . 7-15

Tune Registration Settings in Registration Estimator App . . . . . . . . . . . 7-17


Geometric Transformations Supported by Registration Estimator App . . 7-17
Feature-Based Registration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17
Intensity-Based Registration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Nonrigid and Post-Processing Settings . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18

Export Results from Registration Estimator App . . . . . . . . . . . . . . . . . . . 7-20


Export Results to the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Generate a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20

Techniques Supported by Registration Estimator App . . . . . . . . . . . . . . . 7-22


Feature-Based Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Intensity-Based Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22

x Contents
Nonrigid Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-23

Intensity-Based Automatic Image Registration . . . . . . . . . . . . . . . . . . . . 7-24

Create an Optimizer and Metric for Intensity-Based Image Registration


......................................................... 7-26

Use Phase Correlation as Preprocessing Step in Registration . . . . . . . . 7-27

Register Multimodal MRI Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32

Register Multimodal 3-D Medical Images . . . . . . . . . . . . . . . . . . . . . . . . . 7-42

Registering an Image Using Normalized Cross-Correlation . . . . . . . . . . 7-50

Control Point Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-56

Geometric Transformation Types for Control Point Registration . . . . . . 7-58

Control Point Selection Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-60

Start the Control Point Selection Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-62

Find Visual Elements Common to Both Images . . . . . . . . . . . . . . . . . . . . 7-64


Use Scroll Bars to View Other Parts of an Image . . . . . . . . . . . . . . . . . . . 7-64
Use the Detail Rectangle to Change the View . . . . . . . . . . . . . . . . . . . . . 7-64
Pan the Image Displayed in the Detail Window . . . . . . . . . . . . . . . . . . . . 7-64
Zoom In and Out on an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-65
Specify the Magnification of the Images . . . . . . . . . . . . . . . . . . . . . . . . . 7-65
Lock the Relative Magnification of the Moving and Fixed Images . . . . . . 7-66

Select Matching Control Point Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-68


Pick Control Point Pairs Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-68
Use Control Point Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-69
Move Control Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-71
Delete Control Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-71

Export Control Points to the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . 7-73

Find Image Rotation and Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-75

Use Cross-Correlation to Improve Control Point Placement . . . . . . . . . . 7-79

Register Images with Projection Distortion Using Control Points . . . . . 7-80

Designing and Implementing Linear Filters for Image Data


8
What Is Image Filtering in the Spatial Domain? . . . . . . . . . . . . . . . . . . . . 8-2
Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3

xi
Integral Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5

Filter Grayscale and Truecolor (RGB) Images using imfilter Function . . . 8-7

imfilter Boundary Padding Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11

Filter Images Using Predefined Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14

Generate HDL Code for Image Sharpening . . . . . . . . . . . . . . . . . . . . . . . . 8-17

What is Guided Image Filtering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24

Perform Flash/No-flash Denoising with Guided Filter . . . . . . . . . . . . . . . 8-25

Segment Thermographic Image after Edge-Preserving Filtering . . . . . . 8-29

Apply Multiple Filters to Integral Image . . . . . . . . . . . . . . . . . . . . . . . . . . 8-33

Reduce Noise in Image Gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-38

Design Linear Filters in the Frequency Domain . . . . . . . . . . . . . . . . . . . . 8-47


Two-Dimensional Finite Impulse Response (FIR) Filters . . . . . . . . . . . . . 8-47
Transform 1-D FIR Filter to 2-D FIR Filter . . . . . . . . . . . . . . . . . . . . . . . 8-47
Frequency Sampling Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-49
Windowing Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-50
Creating the Desired Frequency Response Matrix . . . . . . . . . . . . . . . . . . 8-51
Computing the Frequency Response of a Filter . . . . . . . . . . . . . . . . . . . . 8-52

Transforms
9
Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Definition of Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Applications of the Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8

Discrete Cosine Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12


DCT Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12
The DCT Transform Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
Image Compression with the Discrete Cosine Transform . . . . . . . . . . . . . 9-13

Hough Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16


Detect Lines in Images Using Hough . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16

Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21


Plot the Radon Transform of an Image . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23
Viewing the Radon Transform as an Image . . . . . . . . . . . . . . . . . . . . . . . 9-25

Detect Lines Using the Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . . 9-27

xii Contents
The Inverse Radon Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32
Inverse Radon Transform Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-32
Reconstructing an Image from Parallel Projection Data . . . . . . . . . . . . . . 9-34

Fan-Beam Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-37


Image Reconstruction from Fan-Beam Projection Data . . . . . . . . . . . . . . 9-39
Reconstruct Image using Inverse Fanbeam Projection . . . . . . . . . . . . . . . 9-40

Reconstructing an Image from Projection Data . . . . . . . . . . . . . . . . . . . . 9-44

Morphological Operations
10
Types of Morphological Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Morphological Dilation and Erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Operations Based on Dilation and Erosion . . . . . . . . . . . . . . . . . . . . . . . 10-4

Structuring Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9


Determine the Origin of a Structuring Element . . . . . . . . . . . . . . . . . . . 10-10
Structuring Element Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11

Border Padding for Morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13

Morphological Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14


Understanding the Marker and Mask . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15
Finding Peaks and Valleys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16

Pixel Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22


Defining Connectivity in an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
Choosing a Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23
Specifying Custom Connectivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23

Lookup Table Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-25


Creating a Lookup Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-25
Using a Lookup Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-25

Dilate an Image to Enlarge a Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-27

Remove Thin Lines Using Erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31

Use Morphological Opening to Extract Large Image Features . . . . . . . 10-33

Flood-Fill Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38


Specifying Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38
Specifying the Starting Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38
Filling Holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-39

Detect Cell Using Edge Detection and Morphology . . . . . . . . . . . . . . . . 10-41

Granulometry of Snowflakes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-46

xiii
Distance Transform of a Binary Image . . . . . . . . . . . . . . . . . . . . . . . . . . 10-50

Label and Measure Connected Components in a Binary Image . . . . . . 10-52


Detect Connected Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-52
Label Connected Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-53
Select Objects in a Binary Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-54
Measure Properties of Connected Components . . . . . . . . . . . . . . . . . . . 10-54

Analyzing and Enhancing Images


11
Pixel Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
Determine Values of Individual Pixels in Images . . . . . . . . . . . . . . . . . . . 11-3

Intensity Profile of Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5


Create an Intensity Profile of an Image . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Create Intensity Profile of an RGB Image . . . . . . . . . . . . . . . . . . . . . . . . 11-6

Contour Plot of Image Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8


Create Contour Plot of Image Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8

Measuring Regions in Grayscale Images . . . . . . . . . . . . . . . . . . . . . . . . . 11-10

Finding the Length of a Pendulum in Motion . . . . . . . . . . . . . . . . . . . . . 11-16

Create Image Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22

Image Mean, Standard Deviation, and Correlation Coefficient . . . . . . . 11-24

Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25


Detect Edges in Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25

Boundary Tracing in Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27


Trace Boundaries of Objects in Images . . . . . . . . . . . . . . . . . . . . . . . . . 11-27
Select First Step and Direction for Tracing . . . . . . . . . . . . . . . . . . . . . . 11-30

Quadtree Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32


Perform Quadtree Decomposition on an Image . . . . . . . . . . . . . . . . . . . 11-32

Detect and Measure Circular Objects in an Image . . . . . . . . . . . . . . . . . 11-35

Identifying Round Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-48

Measuring Angle of Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56

Measuring the Radius of a Roll of Tape . . . . . . . . . . . . . . . . . . . . . . . . . . 11-62

Calculate Statistical Measures of Texture . . . . . . . . . . . . . . . . . . . . . . . . 11-65

Texture Analysis Using the Gray-Level Co-Occurrence Matrix (GLCM)


........................................................ 11-67

xiv Contents
Create a Gray-Level Co-Occurrence Matrix . . . . . . . . . . . . . . . . . . . . . . . 11-68

Specify Offset Used in GLCM Calculation . . . . . . . . . . . . . . . . . . . . . . . . 11-69

Derive Statistics from GLCM and Plot Correlation . . . . . . . . . . . . . . . . . 11-70

Adjust Image Intensity Values to Specified Range . . . . . . . . . . . . . . . . . 11-72

Gamma Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-74


Specify Gamma when Adjusting Contrast . . . . . . . . . . . . . . . . . . . . . . . 11-74

Contrast Enhancement Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-76

Specify Contrast Adjustment Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-80


Specify Contast Adjustment Limits as Range . . . . . . . . . . . . . . . . . . . . 11-80
Set Image Intensity Adjustment Limits Automatically . . . . . . . . . . . . . . 11-81

Histogram Equalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-82


Adjust Intensity Values Using Histogram Equalization . . . . . . . . . . . . . 11-82
Plot Transformation Curve for Histogram Equalization . . . . . . . . . . . . . 11-84

Adaptive Histogram Equalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-86


Adjust Contrast using Adaptive Histogram Equalization . . . . . . . . . . . . 11-86

Enhance Color Separation Using Decorrelation Stretching . . . . . . . . . 11-88


Simple Decorrelation Stretching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-88
Linear Contrast Stretching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-92
Decorrelation Stretch with Linear Contrast Stretch . . . . . . . . . . . . . . . 11-92

Enhance Multispectral Color Composite Images . . . . . . . . . . . . . . . . . . 11-94

Low-Light Image Enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-104

Apply Gaussian Smoothing Filters to Images . . . . . . . . . . . . . . . . . . . . 11-114

Noise Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-120


Remove Noise by Linear Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-120
Remove Noise Using an Averaging Filter and a Median Filter . . . . . . . 11-120
Remove Noise By Adaptive Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . 11-123

Compute 3-D Superpixels of Input Volumetric Intensity Image . . . . . 11-126

Image Quality Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-129


Full-Reference Quality Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-129
No-Reference Quality Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-130

Train and Use No-Reference Quality Assessment Model . . . . . . . . . . . 11-131


NIQE Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-131
BRISQUE Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-133

Obtain Local Structural Similarity Index . . . . . . . . . . . . . . . . . . . . . . . 11-135

Compare Image Quality at Various Compression Levels . . . . . . . . . . . 11-137

xv
Anatomy of Imatest Extended eSFR Chart . . . . . . . . . . . . . . . . . . . . . . 11-139
Slanted Edge Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-139
Gray Patch Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-140
Color Patch Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-141
Registration Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-141

Evaluate Quality Metrics on eSFR Test Chart . . . . . . . . . . . . . . . . . . . . 11-143

Correct Colors Using Color Correction Matrix . . . . . . . . . . . . . . . . . . . 11-155

Install Sample Data Using Add-On Explorer . . . . . . . . . . . . . . . . . . . . . 11-162

ROI-Based Processing
12
Create a Binary Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Create a Binary Mask from a Grayscale Image . . . . . . . . . . . . . . . . . . . . 12-2
Create Binary Mask Using an ROI Function . . . . . . . . . . . . . . . . . . . . . . 12-2
Create Binary Mask Based on Color Values . . . . . . . . . . . . . . . . . . . . . . . 12-4
Create Binary Mask Without an Associated Image . . . . . . . . . . . . . . . . . 12-4

ROI Creation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5


Create ROI Using Creation Convenience Functions . . . . . . . . . . . . . . . . . 12-8
Create ROI Using draw Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
Using ROIs in Apps Created with App Designer . . . . . . . . . . . . . . . . . . 12-14

ROI Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16


ROI Object Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
ROI Object Function Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
ROI Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18

Overview of ROI Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19

Sharpen Region of Interest in an Image . . . . . . . . . . . . . . . . . . . . . . . . . 12-20

Apply Custom Filter to Region of Interest in Image . . . . . . . . . . . . . . . . 12-23

Fill Region of Interest in an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26

Calculate Properties of Image Regions Using Image Region Analyzer


........................................................ 12-28

Filter Images on Properties Using Image Region Analyzer App . . . . . . 12-33

Create Image Comparison Tool Using ROIs . . . . . . . . . . . . . . . . . . . . . . 12-37

Use Freehand ROIs to Refine Segmentation Masks . . . . . . . . . . . . . . . . 12-44

Rotate Rectangle ROI to interact with imrotate . . . . . . . . . . . . . . . . . . . 12-49

Subsample or Simplify a Freehand ROI . . . . . . . . . . . . . . . . . . . . . . . . . . 12-54

xvi Contents
Measure Distances in an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-64

Use Polyline to Create An Angle Measurement Tool . . . . . . . . . . . . . . . 12-71

Create Freehand ROI Editing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-74

Use Wait Function After Drawing ROI . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-80

Interactive Image Inpainting Using Exemplar Matching . . . . . . . . . . . . 12-83

Image Segmentation
13
Texture Segmentation Using Gabor Filters . . . . . . . . . . . . . . . . . . . . . . . . 13-2

Texture Segmentation Using Texture Filters . . . . . . . . . . . . . . . . . . . . . . . 13-7

Color-Based Segmentation Using the L*a*b* Color Space . . . . . . . . . . . 13-15

Color-Based Segmentation Using K-Means Clustering . . . . . . . . . . . . . 13-21

Marker-Controlled Watershed Segmentation . . . . . . . . . . . . . . . . . . . . . 13-26

Segment Image and Create Mask Using Color Thresholder App . . . . . 13-42

Acquire Live Images in the Color Thresholder App . . . . . . . . . . . . . . . . 13-55

Image Segmentation Using Point Clouds in the Color Thresholder App


........................................................ 13-61

Getting Started with Image Segmenter App . . . . . . . . . . . . . . . . . . . . . . 13-68


Open Image Segmenter App and Load Data . . . . . . . . . . . . . . . . . . . . . 13-68
Create and Add Regions to Segmented Mask . . . . . . . . . . . . . . . . . . . . 13-68
Refine Segmented Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-69
Export Segmentation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-70

Segment Image Using Thresholding in Image Segmenter . . . . . . . . . . 13-71

Segment Image By Drawing Regions Using Image Segmenter . . . . . . . 13-75

Segment Image Using Active Contours in Image Segmenter . . . . . . . . 13-81

Refine Segmentation Using Morphology in Image Segmenter . . . . . . . 13-87

Segment Image Using Graph Cut in Image Segmenter . . . . . . . . . . . . . 13-92

Segment Image Using Local Graph Cut (Grabcut) in Image Segmenter


....................................................... 13-101

Segment Image Using Find Circles in Image Segmenter . . . . . . . . . . 13-110

xvii
Segment Image Using Auto Cluster in Image Segmenter . . . . . . . . . . 13-117

Plot Land Classification with Color Features and Superpixels . . . . . . 13-123

Segment Lungs from 3-D Chest Scan . . . . . . . . . . . . . . . . . . . . . . . . . . 13-126

Image Deblurring
14
Image Deblurring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
Deblurring Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3

Deblur Images Using a Wiener Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5

Deblur Images Using a Regularized Filter . . . . . . . . . . . . . . . . . . . . . . . 14-12

Adapt the Lucy-Richardson Deconvolution for Various Image Distortions


........................................................ 14-22
Reduce the Effect of Noise Amplification . . . . . . . . . . . . . . . . . . . . . . . 14-22
Account for Nonuniform Image Quality . . . . . . . . . . . . . . . . . . . . . . . . . 14-22
Handle Camera Read-Out Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23
Handling Undersampled Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23
Refine the Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23

Deblurring Images Using the Lucy-Richardson Algorithm . . . . . . . . . . 14-25

Adapt Blind Deconvolution for Various Image Distortions . . . . . . . . . . 14-37


Deblur images using blind deconvolution . . . . . . . . . . . . . . . . . . . . . . . 14-37
Refining the Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-45

Deblurring Images Using the Blind Deconvolution Algorithm . . . . . . . 14-46

Create Your Own Deblurring Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 14-54

Avoid Ringing in Deblurred Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-55

Color
15
Display Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

Reduce the Number of Colors in an Image . . . . . . . . . . . . . . . . . . . . . . . . 15-3


Reduce Colors of Truecolor Image Using Color Approximation . . . . . . . . 15-3
Reduce Colors of Indexed Image Using imapprox . . . . . . . . . . . . . . . . . . 15-7
Reduce Colors Using Dithering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-7

Profile-Based Color Space Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . 15-10


Read ICC Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-10

xviii Contents
Write ICC Profile Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . 15-10
Convert RGB to CMYK Using ICC Profiles . . . . . . . . . . . . . . . . . . . . . . . 15-11
What is Rendering Intent in Profile-Based Conversions? . . . . . . . . . . . . 15-12

Device-Independent Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-13


Convert Between Device-Independent Color Spaces . . . . . . . . . . . . . . . 15-13
Color Space Data Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-13

Understanding Color Spaces and Color Space Conversion . . . . . . . . . . 15-15


RGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-15
HSV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-16
CIE 1976 XYZ and CIE 1976 L*a*b* . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-17
YCbCr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-18
YIQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-19

Convert Between RGB and HSV Color Spaces . . . . . . . . . . . . . . . . . . . . 15-20

Determine If L*a*b* Value Is in RGB Gamut . . . . . . . . . . . . . . . . . . . . . . 15-24

Comparison of Auto White Balance Algorithms . . . . . . . . . . . . . . . . . . . 15-25

Big Image Processing


16
Set Spatial Referencing for Big Images . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

Process Big Images Efficiently Using Partial Images or Lower Resolutions


......................................................... 16-8

Process Big Images Efficiently Using Mask . . . . . . . . . . . . . . . . . . . . . . 16-17

Explore Big Image Details with Interactive ROIs . . . . . . . . . . . . . . . . . . 16-28

Warp Big Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-35

Create Labeled bigimage from ROIs and Masks . . . . . . . . . . . . . . . . . . . 16-40

Neighborhood and Block Operations


17
Neighborhood or Block Processing: An Overview . . . . . . . . . . . . . . . . . . . 17-2

Sliding Neighborhood Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3


Determine the Center Pixel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
General Algorithm of Sliding Neighborhood Operations . . . . . . . . . . . . . 17-4
Border Padding Behavior in Sliding Neighborhood Operations . . . . . . . . 17-4
Implementing Linear and Nonlinear Filtering as Sliding Neighborhood
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-4

xix
Distinct Block Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-6
Implement Block Processing Using the blockproc Function . . . . . . . . . . . 17-6
Apply Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7

Block Size and Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9


TIFF Image Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9
Choose Block Size to Optimize blockproc Performance . . . . . . . . . . . . . . 17-9

Parallel Block Processing on Large Image Files . . . . . . . . . . . . . . . . . . . 17-12


What is Parallel Block Processing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12
When to Use Parallel Block Processing . . . . . . . . . . . . . . . . . . . . . . . . . 17-12
How to Use Parallel Block Processing . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12

Perform Block Processing on Image Files in Unsupported Formats . . . 17-14


Learning More About the LAN File Format . . . . . . . . . . . . . . . . . . . . . . 17-14
Parsing the Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14
Reading the File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-15
Examining the LanAdapter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-16
Using the LanAdapter Class with blockproc . . . . . . . . . . . . . . . . . . . . . 17-19

Use Column-wise Processing to Speed Up Sliding Neighborhood or


Distinct Block Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-20
Using Column Processing with Sliding Neighborhood Operations . . . . . 17-20
Using Column Processing with Distinct Block Operations . . . . . . . . . . . 17-21

Block Processing Large Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-23

Compute Statistics for Large Images . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-28

Deep Learning
18
Train and Apply Denoising Neural Networks . . . . . . . . . . . . . . . . . . . . . . 18-2
Remove Gaussian Noise Using Pretrained Network . . . . . . . . . . . . . . . . 18-2
Train a Denoising Network Using Built-In Layers . . . . . . . . . . . . . . . . . . 18-2
Train Fully Customized Denoising Neural Network . . . . . . . . . . . . . . . . . 18-3

Remove Noise from Color Image Using Pretrained Neural Network . . . 18-5

Single Image Super-Resolution Using Deep Learning . . . . . . . . . . . . . . 18-11

JPEG Image Deblocking Using Deep Learning . . . . . . . . . . . . . . . . . . . . 18-25

Image Processing Operator Approximation Using Deep Learning . . . . 18-38

Semantic Segmentation of Multispectral Images Using Deep Learning


........................................................ 18-53

3-D Brain Tumor Segmentation Using Deep Learning . . . . . . . . . . . . . . 18-70

Deep Learning Classification of Large Multiresolution Images . . . . . . 18-82

xx Contents
Neural Style Transfer Using Deep Learning . . . . . . . . . . . . . . . . . . . . . 18-103

Code Generation for Image Processing Toolbox Functions


19
Code Generation for Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2
Code Generation Using a Shared Library . . . . . . . . . . . . . . . . . . . . . . . . 19-2

List of Supported Functions with Usage Notes . . . . . . . . . . . . . . . . . . . . . 19-4

Code Generation with Cell Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8


Setup Your Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8
Generate Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8

GPU Computing with Image Processing Toolbox Functions


20
Image Processing on a GPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-2

List of Supported Functions with Limitations and Other Notes . . . . . . . 20-3

Perform Thresholding and Morphological Operations on a GPU . . . . . . 20-6

Perform Element-Wise Operations on a GPU . . . . . . . . . . . . . . . . . . . . . 20-10

xxi
1

Getting Started

This topic presents two examples to get you started doing image processing using MATLAB® and the
Image Processing Toolbox software. The examples contain cross-references to other sections in the
documentation that have in-depth discussions on the concepts presented in the examples.

• “Image Processing Toolbox Product Description” on page 1-2


• “Configuration Notes” on page 1-3
• “Compilability” on page 1-4
• “Basic Image Import, Processing, and Export” on page 1-5
• “Correct Nonuniform Illumination and Analyze Foreground Objects” on page 1-10
• “Getting Help” on page 1-18
• “Acknowledgments” on page 1-19
1 Getting Started

Image Processing Toolbox Product Description


Perform image processing, visualization, and analysis

Image Processing Toolbox provides a comprehensive set of reference-standard algorithms and


workflow apps for image processing, analysis, visualization, and algorithm development. You can
perform image segmentation, image enhancement, noise reduction, geometric transformations, and
image registration using deep learning and traditional image processing techniques. The toolbox
supports processing of 2D, 3D, and arbitrarily large images.

Image Processing Toolbox apps let you automate common image processing workflows. You can
interactively segment image data, compare image registration techniques, and batch-process large
datasets. Visualization functions and apps let you explore images, 3D volumes, and videos; adjust
contrast; create histograms; and manipulate regions of interest (ROIs).

You can accelerate your algorithms by running them on multicore processors and GPUs. Many
toolbox functions support C/C++ code generation for desktop prototyping and embedded vision
system deployment.

Key Features
• Image analysis, including segmentation, morphology, statistics, and measurement
• Apps for image region analysis, image batch processing, and image registration
• 3D image processing workflows, including visualization and segmentation
• Image enhancement, filtering, geometric transformations, and deblurring algorithms
• Intensity-based and non-rigid image registration methods
• Support for CUDA enabled NVIDIA GPUs (with Parallel Computing Toolbox™)
• C-code generation support for desktop prototyping and embedded vision system deployment

1-2
Configuration Notes

Configuration Notes
To determine if the Image Processing Toolbox software is installed on your system, type this
command at the MATLAB prompt.

ver

When you enter this command, MATLAB displays information about the version of MATLAB you are
running, including a list of all toolboxes installed on your system and their version numbers. For a list
of the new features in this version of the toolbox, see the Release Notes documentation.

Many of the toolbox functions are MATLAB files with a series of MATLAB statements that implement
specialized image processing algorithms. You can view the MATLAB code for these functions using
the statement

type function_name

You can extend the capabilities of the toolbox by writing your own files, or by using the toolbox in
combination with other toolboxes, such as the Signal Processing Toolbox™ software and the Wavelet
Toolbox™ software.

For information about installing the toolbox, see the installation guide.

For the most up-to-date information about system requirements, see the system requirements page,
available in the products area at the MathWorks Web site (www.mathworks.com).

1-3
1 Getting Started

Compilability
The Image Processing Toolbox software is compilable with the MATLAB Compiler™ except for the
following functions that launch GUIs:

• cpselect
• implay
• imtool

1-4
Another Random Scribd Document
with Unrelated Content
150 ETHERIO-ATOMIC PHILOSOPHY OF FORCE. Citrate of
magnesia, Vichy water and some other alkaline drinks are called
cooling, but this can come only from their reactionary effect, or from
the electrical principle with which they are combined. It is perfectly
clear, then, why acids and alkalies have such an affinity for each
other,, as they include the dual conditions of narrow and broad
forms, &c. 10. Color Affinities may be merely mentioned here. In the
chapter on Chromo-Chemistry this whole subject will be developed
much more minutely. The reader has already seen that the colors on
what is sometimes called the warm end of the spectrum, including
red, red-orange, orange, yellow-orange, yellow and yellow-green,
are made in connection with the spirals of the thermal or widening
portion of atoms, while the cold colors, blue-green, blue, indigo-
blue, indigo, violet-indigo, violet, and dark violet, are made in
connection with the spirals of the axial or contracting portion of
atoms. It is evident at once, then, that substances in which the
thermal colors predominate must affinitize with those in which the
electrical colors rule. But what is the exact affinity of each color? Let
us take the blue-green for instance. The very spiral, which passes
inward and thus becomes the blue-green principle in the axis of an
atom, works as the principle of thermel on the outside (See fig.
135). Is it not evident, then, that when the thermel is swept by
strong ethers the vibration extends to the inner bluegreen portion
and vice-versa ? Again the axial channel for blue is simply the inner
portion of the thermal spiral for red. When the blue part is quickened
the red part responds by reaction, or when the red part is quickened
the blue part responds by direct action. Is it not plain, then, that a
broad atom in which red rules would naturally draw into its vortex
the narrower electrical atom in which blue rules, especially as the
inner portion of each has a leading spiral of exactly the same size
and responding to the same ethers, while both thermal and axial
forces must quicken each other? On the same principle, then, the
following are the affinitive colors : Thermel (invisible), affinitizes with
Blue-green. Red " Blue! Red-Orange " Indigo-Blue.
ARE ATOMS ANIMALS? 15 I Orange affinitizes with Indigo.
Yellow-Orange " Violet-Indigo. Yellow " Violet. Yellow-Green " Dark
Violet. For abundant facts in proof that these are affinitive colors,
see Chromo-Chemistry (XX), and Chromo-Dynamics. XXXVIII. Are
Atoms Animals ? We have already seen that atoms constitute the
most wonderful of machines. Has the reader noticed, also that they
are formed almost like an animal ? On their outside we have the
large and small arteries in the shape of larger and smaller spirals
within which the ethereal blood flows, and the tubing which
constitutes the frame work of these spirals, wherein dwell the still
finer ethers that may be called their nerve force. The axial spirals
passing in the other direction on the law of electricity constitute the
veins. Does the reader notice the remarkable analogy to the human
system ? Do not the arteries carry the warm red blood in one
direction, while the veins carry the more electrical purple blood in
the other ? We have the ligo as the spine, the tubing of the main
spiral as the bowels, that of the spirillae as the nerves, the vortex as
the point of ingress, the torrent as the point of egress, the channels
laid out by the external spirals as the arteries, those by the axial
spirals as the veins, while the ethers constitute the blood and
nervous aura. And yet a single atom can never constitute a living
animal. Different atoms must be combined on the law of chemical
affinity before we can presume to have that swift flow of force which
helps to inaugurate life. The space is too limited here to show how
lines of active atoms may, under the stimulus of a certain amount of
heat, be wound up into spirals, spiral balls, tubes, etc., in a way to
constitute the static life of vegetable growths or the locomotive life
of animal existences. Hints could be given of how organized
vegetable life developed in connection with the soil could establish a
flow of fine ethers and gases constituting its vitality, and then how a
neighboring organization of finer atoms might eventually draw off
these ethers and life forces of the vegetable into itself and succeed
in reaching a grade of being sufficientlv active to exist a brief time
aside from the soil which
152 ETHERIO-ATOMIC PHILOSOPHY OF FORCE. would thus
constitute animal life, and again how this animal life might give up
its fine forces to some organization a little higher still, and so on
until this everlasting progression and evolution from lower to higher
conditions, working through countless ages, has attained to the
present marvelous developments of vegetable, animal and human
life. Is it atheistic to speak of this sublime law of nature because it is
seemingly self-acting ? By no means, for as we have seen (X) there
must be some infinite spiritualizing Power beyond coarse matter,
beyond even the finest ethers, before natural forms can be
potentialized into life and motion. The conception of Deific wisdom
which can arrange such wonderful laws and self-acting conditions is
far grander than the God of confusion, too often conceived of, who
works very generally without law and who must be constantly
supplementing the deficiencies of things by some special efforts.
XXXIX. Count Rumford and the Dynamic Theory. 1. We have already
seen the one-sidedness of a mere dynamic theory of force on the
one hand, or of a mere material or fluidic theory on the other hand,
see Chapter Second, XIV — XVIII. We have also seen in this Chapter,
how many mysteries of matter and force stand revealed by uniting
both theories in one on the etherio-atomic law. In order that this
mere dynamic theory, now so much advocated by scientists, should
if possible be laid on the shelf so as no longer to retard the progress
of correct knowledge, a little more should be said in this place. 2. In
1798, an eminent philosopher, by the name of Count Rumford, read
an essay on Heat before the Royal Society, which has been the
stronghold of the dynamic theorists, and is perhaps the most
plausible thing that has thus far been presented on that side of the
question. Of this essay Prof. Tyndall says, " Rumford, in this memoir,
annihilates the material theory of heat. Nothing more powerful on
the subject has since been written." (Heat as a Mode of Motion, p.
39.) In this essay the Count explained an experiment of boring into
steel, while 2\ gallons of water surrounded the boring apparatus,
and thus developing an amount of heat that caused the water to
boil. Seizing the small amount of steel dust that had been caused by
the boring, he had held it up and exclaimed : " Is it possible that
COUNT RUMFORD AND THE DYNAMIC THEORY. 1 53 the
very considerable quantity of heat produced in this experiment,
could have been furnished by so inconsiderable a quantity of dust ? "
I quote his strongest point, Italics and all, in the following:— "What
is heat — is there any such thing as an igneous fluid? Is there
anything, that with propriety can be called caloric ? We have seen
that a very considerable quantity of heat may be excited by the
friction of two metallic surfaces and given off in a constant stream or
flux in all directions, without interruption or intermission and without
any signs of diminution ox exhaustion. In reasoning on this subject
we must not forget that most remarkable circumstance that the
source of heat generated by friction in these experiments appeared
evidently to be inexhaustible. It is hardly necessary to add that
anything which any insulated body or system of bodies can continue
to furnish without limitation cannot possibly be a material substance
; and it appears to me to be extremely difficult, if not quite
impossible, to form any distinct idea of anything capable of being
excited and communicated in those experiments except it be
motion." 3. It will be seen from the above that Rumford was
reasoning on the supposition that heat must be confined to the
portion bored, and that the metal acted as an insulator to prevent
heat from coming into the water from without. But we have seen
how heat and electricity when under stimulus can pass through all
substances including atmosphere, water and metals, and how easily
the ethers can sweep through steel, as in the magnet, for instance,
in which the forces come from the atmosphere and pass into the
atmosphere again, as shown by the iron filings which they influence.
We have seen that atoms are a kind of wind-mills or fanning-mills
into which and out of which the currents of ether flow, their spiral
wheel-work becoming especially active when frictionized or pressed
so that both the caloric and electricity must be drawn along with the
greater rapidity. The Count's reasoning then is on a par with the
following, with reference to a fanning-mill : — The fanning-mill is
turned and a very considerable quantity of air is " excited and given
off in a constant stream or flux " in various directions, " without
interruption or intermission, and without any signs of diminution or
cxJiaustion. In reasoning on this subject we must not forget that
most remarkable circumstance that the source of wind (heat)
generated in these ex 
154 ETHERIO-ATOMIC PHILOSOPHY OF FORCE. periments
appeared evidently to be inexhaustible. It is hardly necessary to add,
that any " air which a fanning-mill, covered with a wire screen
(insulated), " can continue to furnish without limitation, cannot
possibly be a material snbsta?ice ; and it appears to me to be
extremely difficult, if not quite impossible, to form any distinct idea
of anything capable of being excited and communicated in those
experiments, except it be MOTION." 4. This is parallel to the
common reasoning of to-day on this subject. To speak of insulating
or shutting out the heat currents by means of steel is very similar to
insulating or shutting off the air currents from a fanning-mill by a
wire screen. Very many persons are able to feel, as I myself have
sometimes done, the warm currents flowing from the negative pole
of a magnet and the cold currents flowing from its positive pole.
Baron Reichenbach furnishes numerous examples of persons who
can do this, and who can see fiery emanations from both poles, the
warm red flames coming from the south pole, and blue flames from
the north pole, which is more positively electrical, (See Chromo-
Dynamics.) Suppose a person should hold his hand in front of the
fanning-mill, and, as he feels a strong breeze emanating from it
should declare there was nothing there but motion, would his
observation be considered very scientific ? If not, neither is it
scientific to reason in the same way about the ethereal breezes. It is
absurd to suppose that there can be motion without something to
make the motion. 5. A similar error was committed by Faraday in the
measurement of electricity. As Rumford presumed that heat can be
shut in by a bar of steel so did Faraday presume that electricity can
be enclosed and then measured in a drop of water, as signified in
the following sentence : " One grain of water acidulated to promote
conduction, has a quantity of electricity equal to a powerful flash of
lightning." (Experimental Researches in Electricity, p. 250.) In answer
to this statement which has been widely quoted as a fact, I would
say 1st, that a grain of water is about equivalent to one drop. A
powerful flash of lightning from a cloud doubtless comes from
thousands of drops ; is it to be supposed that one drop should equal
this? 2dly, we have seen under the head of Galvanism (XXXIV) that
acidulated water, by means of chemical action, brings not only its
own electricities into play but
WEIGHT AXD SPECIFIC HEAT OF ATOMS. *55 those of the
surrounding metals and wires. How then shall its electricity be
measured aside from theirs? 6. That all the fine forces of light, heat,
electricity, etc., include both atomic vibrations and ethers, should by
this time be quite clear to the reader, especially as on this theory so
many mysteries of nature stand revealed which on the mere
dynamic plan must ever remain inexplicable. I have myself collected
several colors on chemically prepared paper, and this directly from
the sunlight, with only colored glass between, thus proving that light
is a substance as well as the result of vibrations. The following from
Prof. Henry, one of our most eminent scientists, shows the fluidic
and material side of electricity : — " In a new investigation of the
discharge of a Leyden jar, the facts clearly indicated the transfer of a
fluid from the inside to the outside and a rebound back and forward
several times in succession until equilibrium was obtained by a series
of diminishing oscillations." (Patent Office Report on Agriculture in
1857.) XL. Weight and Specific Heat of Atoms. The specific heat in
the following table is given as determined by Regnault and others,
and the relative weight of atoms as established by chemists. The
real weight of atoms of course cannot be ascertained. Hydrogen is
the lightest substance, has the lightest atoms of any which chemists
have been able to take cognizance of, and its atomic weight is called
1 ; the carbon being 12 times as heavy, is called 12, Oxygen 16,
etc.; chemists have concluded that all atoms in a gaseous form
occupy equal sizes or volumes, those of oxygen gas, for instance,
occupying the same amount of space as those of hydrogen,
although 16 times as heavy. 1 will give the names of the substance,
then the chemical symbol, as O for Oxygen, H for Hydrogen, Na
(natrium) for Sodimn, Fe (ferrum) for Iron, etc. In compound
substances, the different elements and the quantity of each is
represented chemically by placing the symbols with figures thus :
H20 for water, meaning 2 atoms (or volumes) of hydrogen to one of
oxygen, or eight times as much by weight of Oxygen as of
Hydrogen. In the next column I furnish the relative weight of each
atom, then the specific heat which each atom has the capacity for as
compared with water, then the products of the specific heat
multiplied by
i56 ETHERIO-ATOMIC PHILOSOPHY OF FORCE. Atomic
Products of specific Elements Symbols. weight, Hydrogen Specific
Heat, Water being 1. heat multiplied by Atomic being i. Weight.
Gases. Hydrogen. H. I 3-4046 3-4046 Nitrogen .... N. 14 ■244 i'4i6
Oxygen .... O. 16 •2182 3-49I2 g.JJ Air '2377 cv3 ■ Carbonic Acid . .
co2 ■3308 Water)' Vapor . . '4750 3 . Liquids. 5
LATENT AND SENSIBLE HEAT. 157 activity and capacity of
an atom the less is it liable to be loaded down and saturated with
gravito-ethcr, whose attractive principles give the effect of weight.
The heaviest atoms do not always make the heaviest substances, as
bismuth, whose atoms are the heaviest of all, is not io times as
heavy as water, while gold is so compact as to weigh over 19 times
more than that fluid. The formula for Alcohol as above is C2H60, 2
equivalents (volumes) of Carbon, 6 of Hydrogen and 1 of Oxygen, or
by weight 24 parts of Carbon, 6 of Hydrogen and 16 of Oxygen. XLI.
Latent and Sensible Heat. How is it that atoms become so vastly
expanded when in the gaseous state over what they are in the liquid
or solid condition, or when heated, over what they are when cold ?
The channels formed by the spirals around the main spiral through
which the fluid ethers flow, must ever remain much the same in size
excepting under great pressure (See XXXIII), otherwise we could not
get the same color continuously, or the same grade of electricity
within the same spiral, for if it grew larger or smaller it would vibrate
at different rates and attract different grades of ethers. The atoms of
water expand nearly 1700 times on being converted into steam, and
something wonderfully elastic and spring-like must be thus projected
outward by the centrifugal force of the heat currents. As the therm
o-spirals form the channels of the ordinary heat currents, suppose
we consider the tube of the same. Within this tube is the spiric ether,
which, though static to some extent, yet like the static atoms of jelly
may be supposed to move about only with incomparably more
freedom than that substance from its great fineness. This spiric
ether must be swung with tremendous velocity against the outside
portion of the tube which contains it, causing it to project in case it
is thin and elastic. That it must be thin would seem to be indicated
by the fact that the billions of revolutions and vibrations of the heat
forces every second, acting ever centrifugally, are constantly hurling
this ether against the outward membrane and thus rendering it
pliable. Knowing now as we do, that something must protrude far
beyond the body of the atom, and that this something may be thus
naturally accounted for by this elastic and
158 ETHERIO-ATOM1C PHILOSOPHY OF FORCE. pouch-like
membrane of the spiral tubes driven outward by the momentum of
the ether within, I think we may settle down upon this as the correct
hypothesis. The greater the heat action, other things being equal,
the farther will this membrane be projected outward. In gases, there
is no power to hinder it, and it may thus extend very far. Now this
spiric ether while within its tube maybe called latent heat, but when
it is projected outward its ribbon-like membrane lashing against all
surrounding objects gives the burning effect of sensible heat causing
the thermometer to rise. Of course the other ethers must combine
with this lashing to give the full effect of heat, and excite the spiral
tube itself. But why, it may be said, is the heat of boiling water more
severe to the sensation even than that of steam, as long as the
atoms are so much nearer together and the lashing membrane so
much shorter ? Because 1700 times as many lashes are laid on in
the same space by water as by steam, so they make up in number
what they lack in length. This shows why the latent heat generally
diminishes in proportion as the sensible heat increases, as the spiric
ether lessens in its tube as it is projected externally. According to the
experiments of Clement and Desormes, a certain weight of steam at
21 2° F. condensed into water at 320 exhibited : Of Sensible heat,
1800 — of Latent heat, 9500, — total 11300. The same weight at
2500 manifested: Of Sensible heat, 21 8° — of Latent heat, 91 20—
total 11300. The sensible heat, it will be remembered, is that which
is measured by the thermometer. XLII. Theories of Atoms. 1. It is
becoming more and more apparent to men of thought that the
knowledge of atoms is the foundation stone of the temple of
Science. The ignoring of the fine ethers, however, which vitalize and
propel the atoms, has made it a very difficult matter for them to gain
any kind of rational conception of how they work. Tyndall and others
very correctly conceive that there is some spiral style of movement
connected with heat, and yet the following is his conception of the
matter : " I have here a weight attached to a spiral string; if I twirl
the weight round in the air, it tends to fly away from me, the spring
stretches to a cer 
THEORIES OF ATOMS. 1 59 tain extent, and as I augment
the speed of revolution the spring stretches still more, the distance
between my hand and the weight being thus augmented. It has
been thought that the augmentation of the distance between a
body's atoms by heat may be also due to a revolution of its particles.
And imagine the motion to continue until the spring snaps; the ball
attached to it would fly off in a tangent to its former orbit, and thus
represent an atom freed by heat from the force of cohesion, which is
rudely represented by our spring." Thus does Tyndal hint at a "
revolution of particles." If he means a revolution of ethereal particles
around the main atoms through some directing lines of force or
spiral spring work, then it is clear enough just how this " revolution"
can be effected ; but if he means that the main atoms revolve
spirally around each other without any guiding force, or channel, to
systematize this revolution, the mystery is as great as ever ; for hozv
could they ever become polarized or crystallized in the midst of this
constant whirl, and whence comes their propelling power ? 2.
Molecular Astronomy. I have just met with a very good synopsis of
the views of scientists on these revolutions of atoms which is
strangely confirmatory of what I have already been stating with
reference to the atomic structure when viewed in one light and yet
strangely absurd as a whole. The theory is very pretty, and it is given
in All the Year Round, from which I quote the following : — "
Comparing the infinitely small with the infinitely great, it is held that
a body, of what kind soever, represents in miniature and very
exactly, an astronomical system, like those which we behold every
night in the firmament. If we could construct a miscroscope of
sufficient power, we should be able, by the help of such an
instrument, to resolve the molecular constellations of every little
terrestrial milky way, exactly as our first rate telescopes resolve the
celestial nebulae and separate double and triple stars. Were our
sight sufficiently penetrating we should behold what now appear
mere confused heaps of matter, arranged in groups -of admirable
symmetry. Bodies would appear honeycombed in all directions,
daylight would stream through vast interstices as it does through the
columns of a temple or the tree trunks of a forest. Nay, we should
see immense empty spaces,
l6o ETHERIO-ATOMIC PHILOSOPHY OF FORCE. like those
which intervene between the planets. From distance to distance,
too, we should perceive clusters of stars, in harmonious order, each
surrounded by its own proper atmosphere ; and still more
astounding spectacle ! — every one of those little molecular stars
would be found revolving with giddy rapidity, in more or less
elongated ovals, exactly like the great stars of heaven ; while by
increasing the power of our instrument, we should discover around
each principal star minor stars — satellites resembling our moon —
accomplishing their revolutions swiftly and regularly. This view of the
constitution of matter is aptly described by M. de Parville as
molecular astro7iomy, maintaining even that astronomy, without our
suspecting it, is dependent on mineralogy; and that whenever we
shall have discovered the laws which govern the grouping and the
movements of the infinitely small, astronomers will have only to
follow in our track. But who, a hundred years ago, could dare to
imagine that the infinitely small was so infinitely great ? What is now
believed to be the nearest guess at the truth appears, at first sight,
to be the dream of a madman." 3. This system of molecular
astronomy, with its circles within circles, is remarkably in harmony
with what I have ascertained must be the law of the atom, working
with its spirals and different grades of spirillse, with its flow of small
ethereal atoms which revolve around and through the main atoms
and its still more delicate atoms that circulate through them. But it is
an immense absurdity to suppose that atoms exist at great distances
apart in open vacuity, which must at once make them independent
of the rest of the universe and cause immediate lawlessness and
ruin. It can be shown that the gravitation which holds all worlds in
their orbits would at once cease were there not an almost infinite
series of atomic pathways held in a beautiful polarity and contiguity
by means of sunbeams and starbeams through which the amazingly
swift and attractive ethers pass and repass and hold suns and
systems to their allegiance. 4. Mr. L. R. Curtiss, in an article on
Molecular Magnitudes in the Popular Science Monthly, of Oct. 1877,
uses the following language: "As to the shape and internal structure
of atoms, there is no definite knowledge, but Helmholtz's studies of
certain equations in hydro-kinetics, several years ago, gave rise to
the idea that vortex motion in a frictionless medium would exist for 
SUMMATION OF POINTS IN CHAPTER THIRD. l6l ever — an
assumption which is purely hypothetical ; but since the proposition
has been enlarged upon by Sir William Thompson — who
conjectures that the atoms might be filaments or rings endowed
with a vortex motion — the subject assumes a shape better
calculated to form the basis of a scientific theory." The above shows
that scientists are approaching more and more nearly to the true
conception of atoms. But when Helmholtz, Thompson, and others
talk about a vortex, they are considering something altogether
vague, unless they also admit the necessity of fluidic ethers to
sweep through this vortex, for otherwise the atoms must be as
lifeless as a windmill without wind. 5. These and many other atomic
theories are pretty and ingenious, and give some conception of the
immense movements that are ever taking place among atoms, but
/wzu these movements occur and why they occur, and what is the
philosophy of molecular action, has thus far never been presented,
so far as I know. A thousand hypotheses concerning atoms may be
propounded ; but so long as they are not reduced to definite law
and harmonized with the mechanics of nature, they will be entirely
unable to unfold the fundamental principles of light, color, heat,
electricity, magnetism, physiology, psychology or dynamics of any
kind, and the world must continue to build on conjecture. XLIII.
Summation of Points in Chapter Third. 1. Correct science is
impossible without a knowledge of atoms. 2. All things are
comprised under the terms force and 7natter. 3. While the largest
atoms are inconceivably small, they are vast as compared with those
of the finest ethers. 4. The form of atoms must be that of an oblate
ovoid, or the shape of an egg flattened somewhat on the sides, from
the necessities of fo?xe. This form is not solid, but consists
principally of an immensely elastic springwork of spirals encircled bv
spirilhe of different grades, which form constant channels of force.
These channels move spirally around the outside of atoms as the
principle of expansion and heat, and forming a vortex at the larger
end. pass through the center in the other direction, tending to draw
the atom in smaller on the principle of cold and electricity. 5. The
smaller positive end of the atom has the greater intensity of heat. 1
1
l62 ET-HERIO-ATOMIC PHILOSOPHY OF FORCE. cold,
repulsion and efflux power ; the larger vortical or negative end is the
point of greatest attraction, and influx power. 6. Ordinary atoms
must have certain spirals that are more external and projecting than
the others, which are finer and set farther imthin. The external are
known as extra-spirals, the internal, as intra-spirals. These pass
within as axial extra-spirals and axial intra spirals. 7. The t her 7Jio
or cxti-a-spirals a7'e the p7-i7iciple of the ordinary coarser grades of
heat, a7id when passi7/g axially are the principle of the coarser
grades of cold a7id also frictio7ial electricity, which last works much
like thermo-electricity. The intra-spirals in transparent bodies are the
pathway of the wa 7-771 or thermal colors, and w/wi moving axially,
of the electrical colors. In so77iewhat coarser and opaque bodies
these sa7ne spirals become the principle of coarser grades of heat,
and when moving axially, of the chc77iico, galvano and 77iag7ieto
electricities. 8. At077is in harmony with all mechanical action a??
kept in movement by fluidic forces. These forces are called ethers
and are guided and drawn on by and through the spiral and spirillic
channels. The finer spirillar respond to the finer ethers. 9. Ethers
have weight, otherwise they could not have inomentum. 10. Polar
cohesion is caused by the flow of ethers which sweep and draw the
positive end of one atom into the larger vortical end of a contiguous
one. Lateral cohesion is caused by the contiguity of positive and
negative thermo-spirals . 11. The unity of atoms requires that the
spirals and spirilla! should be connected with each other by various
little pillars or tubes fro 771 07ie to the other. These pillars may be
termed atomic tendrils. 12. The most commo7i method of
polarizatioii among atoms is in converse layers, in which the lines of
atoms run side by side, but alternately in opposite directions.
Transverse layers are those which cross each other at right angles or
nearly so ; t7'a7isverse diagonals, those which cross diagonally and
irregularly, while paraverse layers have all the atoms of a layer
pointing in the sa77ie direction. 13. Heat te7ids to individualize and
disintegrate, cold to organize and 77iake 7'igid ; both co77ibined to
create harmony. It is only the coarser grades of heat and cold which
are most painful to endure. The filter grades are more soothing and
penetrating. The different grades of electricity are simply grades of
cold.
SUMMATION OF POINTS IN CHAPTER THIRD. 163 14. Polar
cohesion is aided by the flow of electricities, a/id in hard or solid
bodies, doubtless, by a special riveting arrangement called the ligo.
15. There arc six especial divisions of electricity, 1, the frictional ; 2,
Chemico electricity; 3, Galvano electricity; $, Magneto electricity; 5,
Chrotno electricity ; and 6, Psycho electricity. Other grades exist in
connection with the fine spirilla'., etc. Frictional electricity is the most
interior and probably the swiftest, psycho electricity the finest, and
chromo-electricity somewhat coarser, while chemico electricity is
slow and negative. Unanswerable facts show that the various shades
of blue, indigo and violet are electrical. 16. Magnetism consists
especially of two leading grades of electricity, the more positive of
which is the magneto, the more negative, the chemico, deflected to
a great extent into curves by the transverse polarization of the
atoms of certain substances through which they pass. The negative,
sometimes called the south pole of the magnet, is saturated with the
chemico electricity, the positive pole with magneto and perhaps
galvano electricity. being stronger in both its attractions and
repulsions than the negative pi le. 17. Diamagnetic substances are
those which have a lateral axis, instead of a longitudinal one like
that of the magnet, and this comes from the polarization of its
atoms into transverse diagonals. 18. Phosphorescence, like every
other style of combustion or chemical action, is always developed in
connection with some grade of electricity, whether caused by vital
action, the blue color, or otherwise. Its light is of too fine a grade to
give the painful heat sensations of ordinary burning objects. (See
XXI.) 19. Fluorescence, Calorescencc, etc., prove that under the
stimulus of chemical or electrical action, fine ethers can sometimes
be attracted through spirals which are naturally too coarse for them,
and coarse ethers driven through spirals naturally too fine for them.
20. In galvanism the acid or other substance used is polarized
conversely with the molecules of water, the galvano and magneto
electricities passing through the water from the zinc to the platinum,
and so on through the circuit, while the chemico electricity passes
through the acid in the other direction. 21. In frictional Electricity
there arc also two kinds of electrical force passing in two directions,
as is often supposed.
164 ETHERIO-ATOMIC PHILOSOPHY OF FORCE. 22. A
negatively electrified body, or part of a body, is frequently one in
which the chemico electric currents preponderate over the stronger,
more exterior ones, while a positively electrified body, or part of a
body, is one in which the more exterior currents preponderate over
the interior ones. Positiveness of electrical power sometimes
depends upon the quantity and tension of electricity in one body as
opposed to less of the same in another, and sometimes upon a
stronger as opposed to a feebler quality of electricity, as the
magneto in one substance as opposed to the chemico in another. 23
. Chemical affinity occurs between atoms that have been made full
and wide mouthed from their strong thennism and wide vortexes
and those that have been made more narrow from their strong
electrical action, especially if some similar grades of ether are able to
pass through and connect them both. The most direct affinity occurs
between the thermal bodies, including the alkalies, and electrical
substances, including the acids, the former having the more wide
mouthed atoms, the latter, the more pointed and electrical atoms.
The electrical colors affinitize with the thermal colors. 24. Atoms
constitute at once the most perfect of machines and yet possess
many leading characteristics of an animal. 25. The reason why the
etherio-atomic law is a hey to unlock so many mysteries of science,
is, that it adopts the system of duality so universal in nature which
combines the form and working of atoms as the base work of matter
and the vitalizing flow of ethers, as the instruments of force, neither
of which departments can- ever be divorced from each other any
more than action can be sundered from reaction. 26. The heavier
the atom, the more feeble is its capacity for heat. 27 . Scientists are
right in presuming that atoms revolve around other atoms like
planets around their parent sun, but these revolving atoms
constitute the ethers which circulate through their spiral orbits
around the harent atom. The orbits are brought to the most unerring
system by means of spirals and spirillic tubes that represent orbits
like those of the moon, earth and sun. 28. Thus is an atom an
epitome of the universe, having a gradation of elliptical and spiral
orbits in imitation of those of the solar system ; having its axial
center of unity around which its external spirals revolve as a
principle of diversity ; having its positive end at which repulsion
rules, and its negative end at
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like