Code covered by the BSD License  

Highlights from
magicwand

5.0

5.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 3.12 KB File ID: #130

magicwand

by Daniel Lau

 

20 Sep 2000

This function isolates all neighboring pixels with values within a present tolerance.

| Watch this File

File Information
Description

Given an image and a pixel cooridinate, this function isolates all neighboring pixels with values within a preset tolerance. This function mimics the behavior of Adobe's Photoshop magic wand tool.

Y=magicwand(X, m, n);

Y=output image of type uint8(logical)
X=input image of type double
m=pixel cooridinate(row)
n=pixel cooridinate(col)

Y=magicwand(X, m, n, Tol);

Tol=Tolerance value for locating pixel neighbors(default=0.01)

Y=magicwand(X, m, n, Tol, eight_or_four);

eight_or_four=string such that if =='eigh', magicwand locates all eight-neighborhood pixels (default=four-neighborhood)

Acknowledgements
This submission has inspired the following:
Simulating Photoshop's magic wand tool, Magicwand Corrected for v6.5
MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Feb 2002  
26 Nov 2002 Joe Regis  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image Daniel Lau 22 Oct 2008 06:32:39
pixel Daniel Lau 22 Oct 2008 06:32:39
magicwand Daniel Lau 22 Oct 2008 06:32:39
utility Daniel Lau 22 Oct 2008 06:32:39
image processing Daniel Lau 22 Oct 2008 06:32:39

Contact us at files@mathworks.com