SlideShare a Scribd company logo
Image-Filtering
Technologies
Michael Lamont
Senior Software
Engineer
Process Software
Overview
• Role of image filtering in anti-spam
filtering
• Two popular image filtering methods:
– Shape recognition
– Skin detection
• Example image filtering
• Image filtering issues
• Tools you can play with on your own
What Isn’t Covered
• Anything requiring advanced math
• Optical character recognition (OCR)
Spam Images
• A picture is worth 1000 words…
• …and it’s a lot harder to filter than
1000 words.
• Especially when spamvertizing
pornography, photos are essential
marketing tools.
Spam Images
• Right now, a spam filter can be very
effective without looking at images.
• This is going to change when the
majority of sites start installing more
accurate filters, and spammers are
forced to adapt.
90-Second Image Review
• To understand how image filtering
technologies work, you need a basic
understanding of how computers
represent images.
• Images are broken into square dots,
which correspond to pixels on a
monitor.
90-Second Image Review
• Example image:
90-Second Image Review
• Each dot’s color is represented by 3
components: red, green, and blue.
• Each of the three color components
has a value of 0 to 255.
• If all three are 0, then the pixel is black.
If all three are 255, then the pixel is
white.
90-Second Image Review
• The higher the number, the more
intense the color component.
• Example: Increasing red value from 0
to 255 while leaving other components
at 0:
Shape Recognition
• Identifies objects in an image using
posterization and edge finding.
• Extracts interesting objects and
searches for similar objects in a
database of “bad” objects.
• For our application, the objects are
human body parts.
Posterization
• Dramatically reduces the number of
colors in an image.
• Has the side effect of lumping most of
an object’s pixels together.
• Called “posterization” because the
same kind of color reduction used to
be done for images printed on posters.
Posterization - Example
Posterization - Example
Posterization - Method
• A number of color bins are created.
• The number of bins is a lot less than
the ~16m colors that are possible.
• Each bin holds several hundred colors
that are closely related.
• Every color in the bin is represented by
the average color.
Posterization - Method
• Example: If a bin contained every
shade of red from light pink to dark
blood, every color in the bin would be
represented by plain old red.
• The posterization process itself
consists of replacing the color of every
pixel in the image with its bin’s
representative color.
Posterization - Example 2
Posterization - Example 2
Posterization - Example 3
Posterization - Example 3
Edge Finding
• After posterizing the image, edge
finding is used to identify individual
objects.
• Edge finding determines the
boundaries between different patches
of color and contrast.
Edge Finding - Example
Edge Finding - Example
Edge Finding - Method
• The edge finding program scans the
image looking for pixels that are very
different from their neighbors.
• When it finds a radically different pixel,
it marks it as part of an edge.
• Good edge finding algorithms look at
lots of neighboring pixels to help
reduce noise.
Edge Finding - Demonstration
Edge Finding - Example 2
Edge Finding - Example 2
Edge Finding - Example 3
Edge Finding - Example 3
Object Extraction
• Once objects have been identified with
posterization and edge finding, they’re
easy to extract.
Object Extraction
• Leg, midriff, and upper torso objects
are being searched in the case of
people wearing swimsuits.
Object Extraction
• A database of known objects is
searched for matches to the extracted
objects.
• Both object shape and color are used
in the search.
• Comparisons are done with a fuzzy
logic algorithm, since it’s unlikely two
objects will be exactly alike.
Skin Detection
• Subset of an image classification
method called color histogram
matching.
• Finds patches of skin tone in an image.
• Calculates the overall percentage of
the image that is skin.
• If more than a specified amount of the
image is skin, it’s filtered.
Skin Tones
• Almost all human skin is the same hue
- saturation differences result in
different skin colors.
• Human skin tones don’t often appear
in other photographed objects, so color
alone can be used to identify skin.
• Skin tones are primarily red, without
any blue and little if any green.
Skin Color Model
• To identify skin tones in an image, a
filter needs to know what colors are
skin tones.
• You could hardcode every skin color,
but there are tens of thousands of
them.
• Much more accurate to identify skin
patches in an image and “train” the
filter.
Skin Color Training
• Works almost like Bayesian filter
training, but with image colors instead
of message tokens.
• Filter maintains one database of skin
colors, and another database of non-
skin colors.
• If a color appears more often in the
skin color database, it’s treated as a
skin color.
Skin Color Training
• This system has the nice side-effect of
dropping out most skin colors that also
appear in non-skin areas of photos.
Training Sample
Skin Identification
• To analyze an image, the filter
examines the color of each pixel.
• If the color is a skin tone, the filter
marks the pixel as skin.
• When every pixel has been examined,
the % of the image that is skin is
calculated.
• If the % is over a specified threshold,
the image is filtered.
Skin Detection Example
Skin Detection Example
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Shape
Correctly Filtered Images - Skin
Correctly Filtered Images - Skin
Shape Recognition Problems
• Following are examples of images that
shape recognition doesn’t handle
correctly.
• Skin detection handles them correctly,
but only because it’s biased to filter
images with a lot of skin.
Shape Recognition Problems
• Unusual angle obscures shapes
Shape Recognition Problems
• Unusual angle obscures shapes
Shape Recognition Problems
• Unusual angle obscures shapes
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Shapes are too broken up for the filter
to work
Shape Recognition Problems
• Shapes are too broken up for the filter
to work
Shape Recognition Problems
• Shapes are too broken up for the filter
to work
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Not enough “swimsuit” objects
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Skin detection works
Shape Recognition Problems
• Image is so noisy that edge detection
goes crazy
Shape Recognition Problems
• Image is so noisy that edge detection
goes crazy
Shape Recognition Problems
• Image is so noisy that edge detection
goes crazy
Shape Recognition Problems
• Amazingly, skin detection still works
Shape Recognition Problems
• Amazingly, skin detection still works
Skin Detection Problems
• Following are examples of images that
skin detection incorrectly filters.
• Shape recognition works for most of
these, mainly because it can’t extract
any useful shapes.
Skin Detection Problems
• Baby photos tend to show lots of skin
Skin Detection Problems
• Baby photos tend to show lots of skin
Skin Detection Problems
• Shape recognition doesn’t filter the
image
Skin Detection Problems
• Shape recognition doesn’t filter the
image
Skin Detection Problems
• Shape recognition doesn’t filter the
image
Skin Detection Problems
• Portraits have the same problem as
babies.
Skin Detection Problems
• Portraits have the same problem as
babies.
Skin Detection Problems
• Shape recognition ignores the image.
Skin Detection Problems
• Shape recognition ignores the image.
Skin Detection Problems
• Shape recognition ignores the image.
Skin Detection Problems
• In the right light, sand can be the same
color as skin.
Skin Detection Problems
• In the right light, sand can be the same
color as skin.
Skin Detection Problems
• That’s fairly rare - usually skin color
models exclude sand colors.
Skin Detection Problems
• That’s fairly rare - usually skin color
models exclude sand colors.
Skin Detection Problems
• Black & white images can’t be filtered
Skin Detection Problems
• It also makes life rough on shape
recognition filters.
Skin Detection Problems
• It also makes life rough on shape
recognition filters.
Wedding Photos
• Wedding photos are guaranteed to
make a mess of image filters.
• Skin fades into the background
because of soft lighting, soft filters, and
retouching.
• Turns out that brides get upset if the
image is crystal clear with good
contrast - it shows off skin flaws.
Wedding Photos
• Skin detection filters start identifying
everything as skin (false positive).
• Shape recognition filters give up and
don’t filter the message (accurate, but
not for the right reasons).
• Porn tends not to be shot with soft
lighting - good contrast makes skin
“pop” in photos.
Example Wedding Photo - Shape
Example Wedding Photo - Shape
Example Wedding Photo - Shape
Example Wedding Photo - Skin
Example Wedding Photo - Skin
Example Wedding Photo - Shape
Example Wedding Photo - Shape
Example Wedding Photo - Shape
Example Wedding Photo - Skin
Example Wedding Photo - Skin
“Art Porn”
• Usually shot with the same lighting
effects as wedding photos.
• Rarely seen in email.
• In this case, skin detection is accurate
for the wrong reasons while shape
recognition lets the image pass.
“Art Porn” Example - Shape
“Artistic” Example - Shape
“Artistic” Example - Shape
“Artistic” Example - Skin
“Artistic” Example - Skin
Things I Can’t Show You
• S & M
– Skin tends to be covered with “clothing”
– Shapes are broken up by all of the
paraphernalia
• Simpson’s shocker
• Still images from “interesting” videos
– Images are badly pixelated
– Colors are muddy and smudged
Image Filtering Issues
• Accuracy:
– Shape recognition misses lots of images it
shouldn’t (false negatives)
– Skin detection filters lots of images it
shouldn’t (false positives)
– Best skin detection systems are about
80% accurate
– Best shape recognition systems are about
40% accurate
Image Filtering Issues
• Performance:
– Image filtering requires huge amounts of
memory, CPU time, and disk bandwidth.
– Unacceptably slows down most site’s
email servers/filtering systems.
– DL380 benchmark:
• ~1.2 million messages/hour with no filtering
• ~195,000 messages/hour with skin detection
• ~69,000 messages/hour with shape recognition
Image Filtering Issues
• Diminishing returns on accuracy - most
spam filters won’t see a noticeable
increase in accuracy with the addition
of image filtering.
• That’s likely to change in the future as
spammers discover it’s one of the
better options for circumventing current
solutions.
I Wanna Play!
• Shape recognition:
– UC Berkeley’s blobworld
• Open source
• http://elib.cs.berkeley.edu/
– Skin detection
• No good open-source examples
• Trivial to write your own using ImageMagick
• http://www.imagemagick.org/
Quick Review
• We covered:
– How and why images appear in spam
– Why the use of images in spam is likely to
increase
– Two methods for filtering images
– Examples of how the two methods work
and don’t work
– Why image filtering isn’t widely used at
this point.
Antispam Image Filtering Technologies

More Related Content

PDF
Syllabus-ET2546-Multidimensional Signal Processing
PPTX
BayesianDecisionTheoryCaseStudiesf .pptx
PPT
Real time gesture recognition of human hand
PDF
Skin Detection Of Animation Characters
PDF
Skin detection of animation characters
PPTX
Chapter 11
PPTX
ICCASP Human Skin Detection using RGB, HSV and YCbCr Color Models
PPTX
The art of AI Art
Syllabus-ET2546-Multidimensional Signal Processing
BayesianDecisionTheoryCaseStudiesf .pptx
Real time gesture recognition of human hand
Skin Detection Of Animation Characters
Skin detection of animation characters
Chapter 11
ICCASP Human Skin Detection using RGB, HSV and YCbCr Color Models
The art of AI Art

Similar to Antispam Image Filtering Technologies (20)

PPTX
Chapter11
PPTX
What Questions Are Worth Answering?
PPTX
Pixel Art and How to Make It
PPTX
CNN_Presentation diving further into the world of neural networks
PPS
First download it than make your face structure.
PPTX
Image generation compression using genetic algorithm
PPTX
Final year ppt
PPT
Red Cross Photo Presentation
PPTX
Camouflage makeup
PPTX
Data Mining Lecture_2.pptx
KEY
Critical thinking
PPTX
The Art of Data Visualization Seminar - Webcast Recording
PPTX
The art of data visualization slideset
PPTX
The Art of Data Visialization
PPT
Mission photography by Lollywoodlife
PPT
Mission photography www.lollywoodlife.com
PPTX
Photoshop workshop
PPTX
3. fmp production experiments
PPTX
Body self image health of the nation 2015
PPTX
Composition Concepts & Guidelines
Chapter11
What Questions Are Worth Answering?
Pixel Art and How to Make It
CNN_Presentation diving further into the world of neural networks
First download it than make your face structure.
Image generation compression using genetic algorithm
Final year ppt
Red Cross Photo Presentation
Camouflage makeup
Data Mining Lecture_2.pptx
Critical thinking
The Art of Data Visualization Seminar - Webcast Recording
The art of data visualization slideset
The Art of Data Visialization
Mission photography by Lollywoodlife
Mission photography www.lollywoodlife.com
Photoshop workshop
3. fmp production experiments
Body self image health of the nation 2015
Composition Concepts & Guidelines
Ad

More from Michael Lamont (15)

PDF
Introduction to TCP/IP
PDF
Why Is Managing Software So Hard?
PDF
Pricing Analytics: Segmenting Customers To Maximize Revenue
PDF
Pricing Analytics: Optimizing Sales Models
PDF
Pricing Analytics: Price Skimming
PDF
Pricing Analytics: Estimating Demand Curves Without Price Elasticity
PDF
Business Intelligence: Multidimensional Analysis
PDF
Pricing Analytics: Optimizing Price
PDF
Pricing Analytics: Creating Linear & Power Demand Curves
PDF
Understanding Business Intelligence
PDF
Email Address Harvesting
PDF
Evaluating and Implementing Anti-Spam Solutions
PDF
Installing & Configuring OpenLDAP (Hands On Lab)
PDF
Evaluating Anti-Spam Filtering Solutions
PDF
Business Intelligence: Data Warehouses
Introduction to TCP/IP
Why Is Managing Software So Hard?
Pricing Analytics: Segmenting Customers To Maximize Revenue
Pricing Analytics: Optimizing Sales Models
Pricing Analytics: Price Skimming
Pricing Analytics: Estimating Demand Curves Without Price Elasticity
Business Intelligence: Multidimensional Analysis
Pricing Analytics: Optimizing Price
Pricing Analytics: Creating Linear & Power Demand Curves
Understanding Business Intelligence
Email Address Harvesting
Evaluating and Implementing Anti-Spam Solutions
Installing & Configuring OpenLDAP (Hands On Lab)
Evaluating Anti-Spam Filtering Solutions
Business Intelligence: Data Warehouses
Ad

Recently uploaded (20)

PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
System and Network Administration Chapter 2
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
assetexplorer- product-overview - presentation
PPTX
Transform Your Business with a Software ERP System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
System and Network Administraation Chapter 3
PPT
Introduction Database Management System for Course Database
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
CHAPTER 2 - PM Management and IT Context
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
2025 Textile ERP Trends: SAP, Odoo & Oracle
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
System and Network Administration Chapter 2
Computer Software and OS of computer science of grade 11.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
assetexplorer- product-overview - presentation
Transform Your Business with a Software ERP System
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
System and Network Administraation Chapter 3
Introduction Database Management System for Course Database
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Navsoft: AI-Powered Business Solutions & Custom Software Development
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Wondershare Filmora 15 Crack With Activation Key [2025
Which alternative to Crystal Reports is best for small or large businesses.pdf
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
CHAPTER 2 - PM Management and IT Context

Antispam Image Filtering Technologies