1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
2<HTML><HEAD>
3		<TITLE>User's Reference - Equalize</TITLE>
4		<META HTTP-EQUIV="keywords" CONTENT="GRAPHICS VISUALIZATION VISUAL PROGRAM DATA
5MINING">
6	<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
7</HEAD><BODY BGCOLOR="#FFFFFF" link="#00004b" vlink="#4b004b">
8		<TABLE width=510 border=0 cellpadding=0 cellspacing=0>
9			<TR>
10				<TD><IMG src="../images/spacer.gif" width=80 height=1></TD>
11				<TD><IMG src="../images/spacer.gif" width=49 height=1></TD>
12				<TD><IMG src="../images/spacer.gif" width=24 height=1></TD>
13				<TD><IMG src="../images/spacer.gif" width=100 height=1></TD>
14				<TD><IMG src="../images/spacer.gif" width=3 height=1></TD>
15				<TD><IMG src="../images/spacer.gif" width=127 height=1></TD>
16				<TD><IMG src="../images/spacer.gif" width=6 height=1></TD>
17				<TD><IMG src="../images/spacer.gif" width=50 height=1></TD>
18				<TD><IMG src="../images/spacer.gif" width=71 height=1></TD>
19			</TR>
20			<TR>
21				<TD colspan=9><IMG src="../images/flcgh_01.gif" width=510 height=24 alt="OpenDX - Documentation"></TD>
22			</TR>
23			<TR>
24				<TD colspan=2><A href="../allguide.htm"><IMG src="../images/flcgh_02.gif" width=129 height=25 border="0" alt="Full Contents"></A></TD>
25				<TD colspan=3><A href="../qikguide.htm"><IMG src="../images/flcgh_03.gif" width=127 height=25 border="0" alt="QuickStart Guide"></A></TD>
26				<TD><A href="../usrguide.htm"><IMG src="../images/flcgh_04.gif" width=127 height=25 border="0" alt="User's Guide"></A></TD>
27				<TD colspan=3><B><A href="../refguide.htm"><IMG src="../images/flcgh_05d.gif" width=127 height=25 border="0" alt="User's Reference"></A></B></TD>
28			</TR>
29			<TR>
30				<TD><A href="refgu052.htm"><IMG src="../images/flcgh_06.gif" width=80 height=17 border="0" alt="Previous Page"></A></TD>
31				<TD colspan=2><A href="refgu054.htm"><IMG src="../images/flcgh_07.gif" width=73 height=17 border="0" alt="Next Page"></A></TD>
32				<TD><A href="../refguide.htm"><IMG src="../images/flcgh_08.gif" width=100 height=17 border="0" alt="Table of Contents"></A></TD>
33				<TD colspan=3><A href="refgu009.htm"><IMG src="../images/flcgh_09.gif" width=136 height=17 border="0" alt="Partial Table of Contents"></A></TD>
34				<TD><A href="refgu175.htm"><IMG src="../images/flcgh_10.gif" width=50 height=17 border="0" alt="Index"></A></TD>
35				<TD><A href="../srchindx.htm"><IMG src="../images/flcgh_11.gif" width=71 height=17 border="0" alt="Search"></A></TD>
36			</TR>
37		</TABLE>
38		<H3><A name="HDREQUALIZ" ></A>Equalize</H3>
39		<A NAME="IDX477"></A><A NAME="IDX478"></A>
40<P><STRONG>Category</STRONG>
41<P>
42<A HREF="refgu008.htm#HDRCATTRN">Transformation</A>
43<A NAME="IDX479"></A>
44<P><STRONG>Function</STRONG>
45<P>
46Applies histogram equalization to a field.
47<P><STRONG>Syntax</STRONG>
48<PRE>
49<STRONG>equalized</STRONG> = Equalize(<STRONG>data, bins, min, max, ihist, ohist</STRONG>);
50</PRE>
51<P><STRONG>Inputs</STRONG>
52<BR>
53<TABLE BORDER>
54<TR>
55<TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Name
56</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Type
57</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">Default
58</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">Description
59</TH></TR><TR>
60<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>data</STRONG></TT>
61</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">scalar field
62</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">none
63</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">data to be equalized
64</TD></TR><TR>
65<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>bins</STRONG></TT>
66</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">integer
67</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">input dependent
68</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">number of equalization bins
69</TD></TR><TR>
70<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>min</STRONG></TT>
71</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">scalar or field
72</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">min of data
73</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">lower bound of equalization
74</TD></TR><TR>
75<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>max</STRONG></TT>
76</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">scalar or field
77</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">max of data
78</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">upper bound of equalization
79</TD></TR><TR>
80<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>ihist</STRONG></TT>
81</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">field
82</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">histogram of data
83</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">input distribution
84</TD></TR><TR>
85<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%"><TT><STRONG>ohist</STRONG></TT>
86</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">field
87</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="20%">uniform distribution
88</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="40%">output distribution
89</TD></TR></TABLE>
90<P><STRONG>Outputs</STRONG>
91<BR>
92<TABLE BORDER>
93<TR>
94<TH ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">Name
95</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">Type
96</TH><TH ALIGN="LEFT" VALIGN="TOP" WIDTH="50%">Description
97</TH></TR><TR>
98<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="25%"><TT><STRONG>equalized</STRONG></TT>
99</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="25%">scalar field
100</TD><TD ALIGN="LEFT" VALIGN="TOP" WIDTH="50%">histogram-equalized data
101</TD></TR></TABLE>
102<P><STRONG>Functional Details</STRONG>
103<P>
104This module equalizes an input data field so that the histogram of the
105output approximates a specified distribution
106(<TT><STRONG>ohist</STRONG></TT>), which by
107default is a uniform distribution.
108<P>
109If <TT><STRONG>data</STRONG></TT> specifies a series, the histogram of the
110entire series is used to construct the probability distribution,
111which is then applied to each field in the series.
112<TABLE CELLPADDING="3">
113<TR VALIGN="TOP"><TD><P><B><TT><STRONG>data</STRONG></TT>
114</B></TD><TD><P>is the scalar data field to be equalized.
115</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>bins</STRONG></TT>
116</B></TD><TD><P>is the number of bins to be used in creating the equalization
117histogram.
118The default value is 100, unless <TT><STRONG>data</STRONG></TT> consists of
119byte values.
120In that case, the default is: <TT><STRONG>max</STRONG></TT> &#45;
121<TT><STRONG>min</STRONG></TT> &#43; 1
122</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>min</STRONG></TT>
123&nbsp;and&nbsp; <TT><STRONG>max</STRONG></TT>
124</B></TD><TD><P>specify the range of the data values to be equalized.
125Values outside that range remain unchanged.
126<P><B>Notes: </B><OL>
127<P><LI>If neither parameter is specified, the values used are the minimum
128and maximum of the input field.
129<P><LI>If <TT><STRONG>min</STRONG></TT> is a scalar value, it is the minimum
130value equalized.
131<P><LI>If <TT><STRONG>min</STRONG></TT> is a data field, the minimum data value
132of that field is used.
133<P><LI><TT><STRONG>max</STRONG></TT> is similarly
134interpreted.
135<P><LI>If <TT><STRONG>min</STRONG></TT> is a data field and
136<TT><STRONG>max</STRONG></TT> is unspecified, the
137module uses the minimum and maximum values
138of that field.
139</OL>
140</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>ihist</STRONG></TT>
141</B></TD><TD><P>is the histogram used to determine the equalization function
142required, and by default it is the histogram of
143<TT><STRONG>data</STRONG></TT>.
144If <TT><STRONG>ihist</STRONG></TT> is specified explicitly and the number
145of bins specified does not match the number in the histogram,
146the module resamples the histogram so that it contains the
147specified number.
148</TD></TR><TR VALIGN="TOP"><TD><P><B><TT><STRONG>ohist</STRONG></TT>
149</B></TD><TD><P>is the type of output histogram desired.
150By default, the module equalizes to a uniform distribution.
151You can equalize to some other distribution by specifying an appropriate
152histogram for this parameter.
153</TD></TR></TABLE>
154<P><B>Note: </B>A well-formed histogram (for <TT><STRONG>ihist</STRONG></TT> and
155<TT><STRONG>ohist</STRONG></TT>) consists of a field with a "positions"
156component that defines the bins of the histogram;
157a "connections" component that connects the positions; and a
158"data" component that contains the number of items in
159each bin.
160The data should be connection dependent ("dep" "connections").
161
162<P><STRONG>Components</STRONG>
163<P>
164Equalize modifies the data component. All other components
165are unmodified.
166<P><STRONG>Example Visual Programs</STRONG>
167<PRE>
168UsingEqualize.net
169</PRE>
170<P><STRONG>See Also</STRONG>
171<P>
172&nbsp;<A HREF="refgu061.htm#HDRFILTER">Filter</A>,
173&nbsp;<A HREF="refgu096.htm#HDRMORPH">Morph</A>,
174&nbsp;<A HREF="refgu071.htm#HDRHISTOGR">Histogram</A>
175		<P>
176		<HR>
177		<DIV align="center">
178			<P><A href="../allguide.htm"><IMG src="../images/foot-fc.gif" width="94" height="18" border="0" alt="Full Contents"></A> <A href="../qikguide.htm"><IMG src="../images/foot-qs.gif" width="94" height="18" border="0" alt="QuickStart Guide"></A> <A href="../usrguide.htm"><IMG src="../images/foot-ug.gif" width="94" height="18" border="0" alt="User's Guide"></A> <A href="../refguide.htm"><IMG src="../images/foot-ur.gif" width="94" height="18" border="0" alt="User's Reference"></A></P>
179		</DIV>
180		<DIV align="center">
181			<P><FONT size="-1">[ <A href="http://www.research.ibm.com/dx">OpenDX Home at IBM</A>&nbsp;|&nbsp;<A href="http://www.opendx.org/">OpenDX.org</A>&nbsp;] </FONT></P>
182			<P></P>
183		</DIV>
184		<P></P>
185	</BODY></HTML>
186