PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Function Index
BlockProcessing
BlockProcessing[
f
,
img
,
{
n
1
,
...
}]
partitions
img
into non-overlapping blocks of size {n
1
, ...} and applies function
f
to each block.
BlockProcessing[
f
,
img
,
{
n
1
,
...
},
{
d
1
,
...
}]
partitions
img
into blocks of size {n
1
, ...} with offset {d
1
, ...} and applies function
f
to each block.
BlockProcessing
will return a result of the same dimensions as
img
if function
f
returns a scalar.
If
img
is an
ImageData
expression,
BlockProcessing
will return an
ImageData
object only if the operation f returns a raw data structure that is
ImageData
compatible (see Equations (
2.2.1
), (
2.3.1
), (
2.3.2
)).
The option
PaddingMethod
may be used to select the type of border extension used during calculation. Default setting is
PaddingMethod
→
FixedPad
. Any of the supported padding methods may be used (
ConstantPad
,
FixedPad
,
PeriodicPad
,
ReflectPad
,
ZeroPad
). The setting
PaddingMethod
→
None
may be used to compute the result without extending the border.
The option
Centered
may be used to extend the border symmetrically or only at the end of a list. Default setting is
Centered
→
False
.
The argument
img
may be an array or
ImageData
expression.
See also User's Guide
5.4
.
Modified in Version 2.
Examples
This loads the package.
In[1]:=
Here are some simple usage examples.
In[2]:=
This wraps function
f
around each 2 × 2 block of array
tmp
.
In[3]:=
Out[3]//MatrixForm=
This is an example of block processing with a sliding window.
In[4]:=
Out[4]//MatrixForm=
This disables border extension.
In[5]:=
Out[5]//MatrixForm=
Here we make function
f
return its argument by using the pure function
#&
.
In[6]:=
Out[6]//MatrixForm=
This joins the elements of all the submatrices.
In[7]:=
Out[7]//MatrixForm=
Here we use
BlockProcessing
to return the variance within 8×8 partially overlapping blocks in an example image.
In[8]:=
This shows the result.
In[9]:=
Out[9]=
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.