├── INSTALL.txt
├── LICENSE
├── README.md
├── examples
├── CALIBRATION
│ ├── CALIBRATION.pde
│ ├── Calibrate.pde
│ ├── GUI.pde
│ └── Util.pde
├── RENDER
│ ├── GUI.pde
│ ├── RENDER.pde
│ ├── Ribbon.pde
│ └── data
│ │ ├── blobby.glsl
│ │ ├── calibration.txt
│ │ ├── drip.glsl
│ │ ├── waterNoise.glsl
│ │ └── waves.glsl
├── TestBackgroundFX
│ ├── TestBackgroundFX.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── waves.glsl
├── TestBodyGraphics
│ ├── TestBodyGraphics.pde
│ └── data
│ │ └── calibration.txt
├── TestBodyImage
│ ├── TestBodyImage.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── texture.jpg
├── TestBodyMovie
│ ├── TestBodyMovie.pde
│ └── data
│ │ └── calibration.txt
├── TestBodyShader
│ ├── TestBodyShader.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── waves.glsl
├── TestConnectHands
│ ├── TestConnectHands.pde
│ └── data
│ │ └── calibration.txt
├── TestFallingPolygons
│ ├── TestFallingPolygons.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── texture.jpg
├── TestFireball
│ ├── Fireball.pde
│ ├── TestFireball.pde
│ └── data
│ │ └── calibration.txt
├── TestKrang
│ ├── TestKrang.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── krang.mp4
├── TestPhysics
│ ├── TestPhysics.pde
│ └── data
│ │ ├── calibration.txt
│ │ └── texture.jpg
├── TestRibbons
│ ├── Ribbon.pde
│ ├── TestRibbons.pde
│ └── data
│ │ └── calibration.txt
└── TestSkeleton
│ ├── TestSkeleton.pde
│ └── data
│ └── calibration.txt
├── index.html
├── library.properties
├── library
├── Jama-1.0.3.jar
└── KinectProjectorToolkit.jar
├── reference
├── KinectProjectorToolkit
│ ├── KinectProjectorToolkit.html
│ ├── ProjectedContour.html
│ ├── package-frame.html
│ ├── package-summary.html
│ └── package-tree.html
├── allclasses-frame.html
├── allclasses-noframe.html
├── constant-values.html
├── deprecated-list.html
├── help-doc.html
├── index-all.html
├── index.html
├── overview-tree.html
├── package-list
├── resources
│ └── inherit.gif
└── stylesheet.css
├── src
└── KinectProjectorToolkit
│ ├── KinectProjectorToolkit.java
│ └── ProjectedContour.java
└── stylesheet.css
/INSTALL.txt:
--------------------------------------------------------------------------------
1 | How to install library Kinect Projector Toolkit
2 |
3 |
4 | Install with the "Add Library..." tool
5 |
6 | New for Processing 2.0: Add contributed libraries by selecting "Add Library..."
7 | from the "Import Library..." submenu within the Sketch menu. Not all available
8 | libraries have been converted to show up in this menu. If a library isn't there,
9 | it will need to be installed manually by following the instructions below.
10 |
11 |
12 | Manual Install
13 |
14 | Contributed libraries may be downloaded separately and manually placed within
15 | the "libraries" folder of your Processing sketchbook. To find (and change) the
16 | Processing sketchbook location on your computer, open the Preferences window
17 | from the Processing application (PDE) and look for the "Sketchbook location"
18 | item at the top.
19 |
20 | Copy the contributed library's folder into the "libraries" folder at this
21 | location. You will need to create the "libraries" folder if this is your first
22 | contributed library.
23 |
24 | By default the following locations are used for your sketchbook folder:
25 | For Mac users, the sketchbook folder is located inside ~/Documents/Processing.
26 | For Windows users, the sketchbook folder is located inside
27 | 'My Documents'/Processing.
28 |
29 | The folder structure for library Kinect Projector Toolkit should be as follows:
30 |
31 | Processing
32 | libraries
33 | Kinect Projector Toolkit
34 | examples
35 | library
36 | Kinect Projector Toolkit.jar
37 | reference
38 | src
39 |
40 | Some folders like "examples" or "src" might be missing. After library
41 | Kinect Projector Toolkit has been successfully installed, restart the Processing
42 | application.
43 |
44 |
45 | If you're having trouble, have a look at the Processing Wiki for more
46 | information: http://wiki.processing.org/w/How_to_Install_a_Contributed_Library
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Kinect Projector Toolkit
2 |
3 | Processing library for calibrating a kinect and a projector together, such that projected image is automatically aligned to the physical space it is projecting onto, facilitating the projection of images onto moving bodies and surfaces.
4 |
5 | To see some applications of the software, see this [highlight video](http://vimeo.com/81914893) of a workshop applying the software to live dance.
6 |
7 | The calibration methodology comes from this writeup by [Jan Hrdlička at 3dsense blog](http://blog.3dsense.org/programming/kinect-projector-calibration-human-mapping-2/). For other work on Projector/Kinect calibration, see works and code by [Elliot Woods, Kyle McDonald](https://github.com/elliotwoods/artandcode.Camera-and-projector-calibration), and [Daito Manabe](http://thecreatorsproject.vice.com/blog/projection-mapped-dance-performance-daito-manabe), as well as the OpenFrameworks addon [ofxCamaraLucida](http://chparsons.com.ar/#camara_lucida).
8 |
9 | ##V2 version
10 |
11 | A very nice-looking fork of this for Kinect V2 is available [here](https://github.com/bradenneufeld/K2P3Toolkit).
12 |
13 | ##Installation
14 |
15 | The library requires [Processing 2.0+](http://www.processing.org), [SimpleOpenNI](https://code.google.com/p/simple-openni/), [ControlP5](http://www.sojamo.de/libraries/controlP5/), and [OpenCV](https://github.com/atduskgreg/opencv-processing).
16 |
17 | To install the library, copy the entire contents of this repository into a folder called "KinectProjectorToolkit" inside your Processing libraries folder, as any other library.
18 |
19 | The library comes with a number of demos in the "examples" folder, as well as a program called **CALIBRATION.pde** which is the application used for determining the fit between the projector and Kinect. Instructions for calibration follow below.
20 |
21 |
22 | ##Instructions for calibration
23 |
24 | ###*[Video tutorial for calibration](http://vimeo.com/84658886)*
25 |
26 | ###1) Room setup
27 |
28 | After setting the projector, fix the Kinect to face the space onto which you are projecting. Ideally, the Kinect is tracking roughly the full space of the projection; if it is too close it may not see everything the projector sees, and if it is too far, it will be less precise. Unless you have a short-throw projector, the Kinect will probably be closer to the stage than the projector.
29 |
30 | The Kinect and projector must be *totally immobilized* during calibration and after, because a calibration only works for that positioning of the two devices together.
31 |
32 |
33 | ###2) Software setup
34 |
35 | Set your computer's display to extended/dual screen and project the secondary screen. Open up **CALIBRATION.pde** and make sure to set the `pWidth` and `pHeight` variables at the top to exactly match the resolution of the secondary display, e.g. 1024x768.
36 |
37 | Finally, set the `calibFilename` variable to the exact path to which you want to save the calibration file to.
38 |
39 | 
40 |
41 |
42 | ###3) Getting point pairs
43 |
44 | The interface allows you to position a 5x4 chessboard which is being projected onto your stage/room. You can move its position using the XY grid on the right side of the interface, and resize it using the "size" slider. The "searching" button toggles whether the app is actively searching for a chessboard pattern.
45 |
46 | 
47 |
48 | You need some sort of a flat, mobile panel (best if white) to project onto. Place the panel somewhere in front of the Kinect, and position the projected chessboard onto it. When the chessboard is visible in the Kinect RGB view on the left of the interface, toggle the "searching" button to have the program search for the chessboard. If it finds it, you should see 12 green circles pop up over the corners of the chessboard in the interface, and the "add pair" button becomes visible. If the green circles are not coming up, the chessboard can not be found in the image, which means the chessboard is too small or the lighting is not adequate. See the tutorial video for a good example. If the circles do appear, but some or all of them are red, it means the chessboard is either too close or too far from the Kinect and it can't read the depth; move it into an appropriate range. Only when 12 green circles are visible is the "add pair" button accessible.
49 |
50 | 
51 |
52 | Repeat this process for a series of panel positions throughout your stage space. To get the best possible fit, you should sample the space as widely as possible. Move the board to at least two or three different depths (distance from the Kinect), and position the board at high and low positions as well. The more dispersed your board points are across all three spatial dimensions, the better your fit will be. If the points are mostly coplanar, the model may not generalize well to undersampled regions.
53 |
54 |
55 | ###4) Calibration
56 |
57 | Depending on the demands of your application, you may need only a few board positions, or several dozen. Generally, 10-15 board positions gives a good fit, with each position contributing 12 point pairs. When you have a good amount of point pairs, click the "calibrate" button. This will generate a calibration.
58 |
59 | Once you have generated a calibration, you can toggle into "Testing mode" which allows you to test the fit. In testing mode, you can click anywhere on the Kinect image to place a red dot over a desired point in the camera image. A corresponding green point should then be projected onto that same location in your physical space. If the calibration is good, the red dot in the Kinect's image and the green one in the physical space should match. Try a few points at different locations to test the accuracy of the calibration.
60 |
61 | If the calibration is satisfactory, click "Save." It will generate a text file containing the calibration parameters, which will be located in the path you specified in the `calibFilename` variable.
62 |
63 |
64 | ##Using the calibration
65 |
66 | The core function of the library is the ability to map any 3d point in physical space to the corresponding pixel which falls on that point. The process goes as follows.
67 |
68 | First, set up the Kinect and OpenCV. Make sure to run the Kinect's `alternativeViewPointDepthToImage()` so that the RGB and depth maps are aligned.
69 |
70 | kinect = new SimpleOpenNI(this);
71 | kinect.enableDepth();
72 | kinect.alternativeViewPointDepthToImage();
73 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
74 |
75 | Next, load your calibration file (replace `CALIBRATION_PATH` with the path to the calibration file saved from the process described above).
76 |
77 | kpt = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
78 | kpt.loadCalibration(CALIBRATION_PATH);
79 |
80 | In a frame, update the Kinect and then send its real world depth map to the KinectProjectorToolkit object.
81 |
82 | kinect.update();
83 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
84 |
85 | Then, given a point from the real world depth map, you can obtain its pixel coordinate by running the `convertKinectToProjector()` method. The point can be, for example, the real world point of a tracked skeleton's hand. Make sure you are sampling from `depthMapRealWorld()` not `depthMap()`. So given real world PVector realWorldPoint, the projected coordinate is accessible via:
86 |
87 | PVector projectedPoint = kpt.convertKinectToProjector(realWorldPoint);
88 |
89 | The toolkit has some higher level functions which automate some of this, depending on the specific task. For example, if you are tracking a skeleton and have an ArrayList of PVectors which correspond to a tracked object's contour points, you can convert all of them using the function `getProjectedContour(ArrayList contourPoints)`.
90 |
91 | An optional second parameter "dilates" the projected contour, i.e. stretches or compresses it. For example, `getProjectedContour(ArrayList contourPoints, 2.0)` will return a projected contour which has been stretched out to double its original dimensions; this can be useful, for example, in tracing a user's contour on the screen behind them. The default dilation is 1.0 (original size, no stretching).
92 |
93 | The test applications in the library demonstrate some of these tasks.
94 |
95 |
96 | ##Test applications
97 |
98 | The library contains a number of examples, prefixed "Test" which demonstrate various uses of the toolkit for creative projection. Demos include projecting an image onto a human body, projecting images onto specific tracked parts of a body, graphics projected onto background surfaces interacting with tracked bodies, etc.
99 |
100 | You must first make sure to go through the calibration process and generate the calibration file. Before running any of the demos, you must change the location of the loaded calibration file to the calibration you generated in the first step, and modify the line in the example accordingly.
101 |
102 | kpt.loadCalibration(YOUR_PATH_HERE);
103 |
104 | Descriptions for test applications follow below:
105 |
106 | ###TestSkeleton, TestKrang, TestFireball
107 | These demos are the simplest applications of the calibration. The Kinect tracks users and returns real world coordinates for their joints and limbs, and we project objects onto them. Skeleton projects the entire skeleton onto each person, Krang projects an image of [Krang](http://en.wikipedia.org/wiki/Krang) onto users' torsos.
108 |
109 | ###TestBodyGraphics, TestBodyImage, TestBodyMovie, TestBodyShader
110 | Show the process of projecting graphics onto a tracked human body, via the Kinect's userImage. They are identical, except for the content of the graphics, showing how to project a PGraphics object, a PImage, a Movie, and a shader, respectively.
111 |
112 | ###TestRibbons
113 | Similar to the body projection examples, but instead projects ribbon-like lines around the contour of a body, tracing them onto the background behind the user.
114 |
115 | ###TestBackgroundFX
116 | This example shows how a tracked user can manipulate background graphics projected behind them onto a screen or floor.
117 |
118 | ###TestFallingPolygons
119 | Similar to TestBackgroundFX as it involves a user manipulating a background screen. A game in which polygons fall from the sky and a user can physically interact with them on a wall.
120 |
121 | ###RENDER
122 | This is a high-level application combining the previous examples with a user interface for applying the effects. It is currently still under development.
123 |
--------------------------------------------------------------------------------
/examples/CALIBRATION/CALIBRATION.pde:
--------------------------------------------------------------------------------
1 | //==========================================================
2 | // set resolution of your projector image/second monitor
3 | // and name of your calibration file-to-be
4 | int pWidth = 1024;
5 | int pHeight = 768;
6 | String calibFilename = "calibration.txt";
7 |
8 |
9 | //==========================================================
10 | //==========================================================
11 |
12 | import javax.swing.JFrame;
13 | import SimpleOpenNI.*;
14 | import gab.opencv.*;
15 | import controlP5.*;
16 | import Jama.*;
17 |
18 | SimpleOpenNI kinect;
19 | OpenCV opencv;
20 | ChessboardFrame frameBoard;
21 | ChessboardApplet ca;
22 | PVector[] depthMap;
23 | ArrayList foundPoints = new ArrayList();
24 | ArrayList projPoints = new ArrayList();
25 | ArrayList ptsK, ptsP;
26 | PVector testPoint, testPointP;
27 | boolean isSearchingBoard = false;
28 | boolean calibrated = false;
29 | boolean testingMode = false;
30 | int cx, cy, cwidth;
31 |
32 | void setup()
33 | {
34 | size(1200, 768);
35 | textFont(createFont("Courier", 24));
36 | frameBoard = new ChessboardFrame();
37 |
38 | // set up kinect
39 | kinect = new SimpleOpenNI(this);
40 | kinect.setMirror(false);
41 | kinect.enableDepth();
42 | //kinect.kinect.enableIR();
43 | kinect.enableRGB();
44 | kinect.alternativeViewPointDepthToImage();
45 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
46 |
47 | // matching pairs
48 | ptsK = new ArrayList();
49 | ptsP = new ArrayList();
50 | testPoint = new PVector();
51 | testPointP = new PVector();
52 | setupGui();
53 | }
54 |
55 | void draw()
56 | {
57 | // draw chessboard onto scene
58 | projPoints = drawChessboard(cx, cy, cwidth);
59 |
60 | // update kinect and look for chessboard
61 | kinect.update();
62 | depthMap = kinect.depthMapRealWorld();
63 | opencv.loadImage(kinect.rgbImage());
64 | //opencv.loadImage(kinect.irImage());
65 | opencv.gray();
66 |
67 | if (isSearchingBoard)
68 | foundPoints = opencv.findChessboardCorners(4, 3);
69 |
70 | drawGui();
71 | }
72 |
73 | void drawGui()
74 | {
75 | background(0, 100, 0);
76 |
77 | // draw the RGB image
78 | pushMatrix();
79 | translate(30, 120);
80 | textSize(22);
81 | fill(255);
82 | //image(kinect.irImage(), 0, 0);
83 | image(kinect.rgbImage(), 0, 0);
84 |
85 | // draw chessboard corners, if found
86 | if (isSearchingBoard) {
87 | int numFoundPoints = 0;
88 | for (PVector p : foundPoints) {
89 | if (getDepthMapAt((int)p.x, (int)p.y).z > 0) {
90 | fill(0, 255, 0);
91 | numFoundPoints += 1;
92 | }
93 | else fill(255, 0, 0);
94 | ellipse(p.x, p.y, 5, 5);
95 | }
96 | if (numFoundPoints == 12) guiAdd.show();
97 | else guiAdd.hide();
98 | }
99 | else guiAdd.hide();
100 | if (calibrated && testingMode) {
101 | fill(255, 0, 0);
102 | ellipse(testPoint.x, testPoint.y, 10, 10);
103 | }
104 | popMatrix();
105 |
106 | // draw GUI
107 | pushMatrix();
108 | pushStyle();
109 | translate(kinect.depthWidth()+70, 40);
110 | fill(0);
111 | rect(0, 0, 450, 680);
112 | fill(255);
113 | text(ptsP.size()+" pairs", 26, guiPos.y+525);
114 | popStyle();
115 | popMatrix();
116 | }
117 |
118 | ArrayList drawChessboard(int x0, int y0, int cwidth) {
119 | ArrayList projPoints = new ArrayList();
120 | int cheight = (int)(cwidth * 0.8);
121 | ca.background(255);
122 | ca.fill(0);
123 | for (int j=0; j<4; j++) {
124 | for (int i=0; i<5; i++) {
125 | int x = int(x0 + map(i, 0, 5, 0, cwidth));
126 | int y = int(y0 + map(j, 0, 4, 0, cheight));
127 | if (i>0 && j>0) projPoints.add(new PVector((float)x/pWidth, (float)y/pHeight));
128 | if ((i+j)%2==0) ca.rect(x, y, cwidth/5, cheight/4);
129 | }
130 | }
131 | ca.fill(0, 255, 0);
132 | if (calibrated)
133 | ca.ellipse(testPointP.x, testPointP.y, 20, 20);
134 | ca.redraw();
135 | return projPoints;
136 | }
137 |
138 |
139 | void addPointPair() {
140 | if (projPoints.size() == foundPoints.size()) {
141 | for (int i=0; i> allProjectedContours;
11 | ArrayList ribbons;
12 | boolean renderBody, renderRibbons, ribbonIsCurved, ribbonIsWhite, guiVisible=true;
13 | PGraphics pg, bg;
14 | PShader shade, bgshade;
15 | float blobDilate, ribbonNoiseFactor, ribbonThickness;
16 | int ribbonSpawnRate, ribbonMaxAge, ribbonLength, ribbonSpeed, ribbonSkip, ribbonMargin, ribbonAlpha;
17 | int samplingMode, idxShader, numframes, idxBg;
18 |
19 | void setup()
20 | {
21 | size(displayWidth, displayHeight, P2D);
22 |
23 | // setup Kinect
24 | kinect = new SimpleOpenNI(this);
25 | kinect.enableDepth();
26 | kinect.enableUser();
27 | kinect.alternativeViewPointDepthToImage();
28 |
29 | // setup OpenCV
30 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
31 | //opencv = new OpenCV(this, 640, 480);
32 |
33 | // setup Kinect Projector Toolkit
34 | //kpc = new KinectProjectorToolkit(this, 640, 480);
35 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());// kinect.depthWidth(), kinect.depthHeight());
36 | kpc.loadCalibration("calibration.txt");
37 | kpc.setContourSmoothness(3);
38 |
39 | // initialize ribbons
40 | ribbons = new ArrayList();
41 |
42 | // shaders and body graphics
43 | pg = createGraphics(600, 800, P2D);
44 | bg = createGraphics(width, height, P2D);
45 | setupShader(idxShader);
46 | setupBackground(idxBg);
47 |
48 | // archive of projected contours
49 | allProjectedContours = new ArrayList>();
50 |
51 | setupGUI();
52 | }
53 |
54 | void setupShader(int idxShader) {
55 | if (idxShader == 0)
56 | shade = loadShader("blobby.glsl");
57 | else if (idxShader == 1) {
58 | shade = loadShader("drip.glsl");
59 | shade.set("intense", 0.5);
60 | shade.set("speed", 3.0);
61 | shade.set("c", 0.5, 1.0);
62 | }
63 | else if (idxShader == 2)
64 | shade = loadShader("waterNoise.glsl");
65 | else if (idxShader == 3)
66 | shade = loadShader("waves.glsl");
67 | shade.set("resolution", float(pg.width), float(pg.height));
68 | pg.shader(shade);
69 | }
70 |
71 | void setupBackground(int idxBg) {
72 | if (idxBg == 0) {
73 | bg.beginDraw();
74 | bg.background(0);
75 | bg.endDraw();
76 | bg.resetShader();
77 | }
78 | else if (idxBg == 1) {
79 | bg.beginDraw();
80 | bg.background(255);
81 | bg.endDraw();
82 | bg.resetShader();
83 | }
84 | else if (idxBg == 2) {
85 | bgshade = loadShader("blobby.glsl");
86 | bgshade.set("resolution", float(bg.width), float(bg.height));
87 | bg.shader(bgshade);
88 | }
89 | else if (idxBg == 3) {
90 | bgshade = loadShader("drip.glsl");
91 | bgshade.set("intense", 0.5);
92 | bgshade.set("speed", 3.0);
93 | bgshade.set("c", 0.5, 1.0);
94 | bgshade.set("resolution", float(bg.width), float(bg.height));
95 | bg.shader(bgshade);
96 | }
97 | else if (idxBg == 4) {
98 | bgshade = loadShader("waterNoise.glsl");
99 | bgshade.set("resolution", float(bg.width), float(bg.height));
100 | bg.shader(bgshade);
101 | }
102 | else if (idxBg == 5) {
103 | bgshade = loadShader("waves.glsl");
104 | bgshade.set("resolution", float(bg.width), float(bg.height));
105 | bg.shader(bgshade);
106 | }
107 | }
108 |
109 | void draw()
110 | {
111 | kinect.update();
112 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
113 | kpc.setKinectUserImage(kinect.userImage());
114 | opencv.loadImage(kpc.getImage());
115 |
116 | // get projected contours
117 | ArrayList projectedContours = new ArrayList();
118 |
119 | ArrayList contours = opencv.findContours();
120 | for (Contour contour : contours) {
121 | if (contour.area() > 2000) {
122 | ArrayList cvContour = contour.getPoints();
123 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, blobDilate);
124 | projectedContours.add(projectedContour);
125 | }
126 | }
127 |
128 | // add to running list of projected contours
129 | allProjectedContours.add(projectedContours);
130 | while (allProjectedContours.size() > numframes) allProjectedContours.remove(0);
131 |
132 | // get current projected contours depending on strategy
133 | int t = allProjectedContours.size()-1;
134 | if (samplingMode == 1)
135 | t = (int) map(sin(0.01*frameCount), -1, 1, 0, allProjectedContours.size() - 1);
136 | else if (samplingMode == 2)
137 | t = (int) map(mouseX, 0, width, 0, allProjectedContours.size() - 1);
138 | projectedContours = allProjectedContours.get(t);
139 |
140 | // draw background
141 | if (idxBg > 1) {
142 | bgshade.set("time", millis()/1000.0);
143 | bg.beginDraw();
144 | bg.rect(0, 0, bg.width, bg.height);
145 | bg.endDraw();
146 | }
147 | image(bg, 0, 0);
148 |
149 |
150 | // render bodies
151 | if (renderBody) {
152 | for (int i=0; i 0) addNewRibbons(t, ribbonSpawnRate);
174 | ArrayList nextRibbons = new ArrayList();
175 | for (Ribbon r : ribbons) {
176 | r.update();
177 | r.draw();
178 | if (r.age < r.maxAge) nextRibbons.add(r);
179 | }
180 | ribbons = nextRibbons;
181 | }
182 |
183 | // for gui
184 | if (guiVisible) {
185 | fill(0, 100);
186 | rect(36, 24, 500, 640);
187 | }
188 | }
189 |
190 | void addNewRibbons(int t, int n) {
191 | ArrayList projectedContours = allProjectedContours.get(t);
192 | for (int i=0; i contourPoints = projectedContours.get(p).getProjectedContours();
195 | Ribbon newRibbon = new Ribbon(contourPoints);
196 | ribbons.add(newRibbon);
197 | }
198 | }
199 |
200 | void keyPressed() {
201 | if (key=='g') {
202 | if (cp5.isVisible()) {
203 | cp5.hide();
204 | guiVisible = false;
205 | }
206 | else {
207 | cp5.show();
208 | guiVisible = true;
209 | }
210 | }
211 | }
--------------------------------------------------------------------------------
/examples/RENDER/Ribbon.pde:
--------------------------------------------------------------------------------
1 | class Ribbon
2 | {
3 | ArrayList contour;
4 | int age, maxAge, pos, len, speed, skip, margin, alph;
5 | color col;
6 | float noiseFactor, thickness;
7 | boolean isCurved;
8 |
9 | Ribbon(ArrayList contour) {
10 | this.contour = contour;
11 | pos = (int) random(contour.size());
12 | age = 0;
13 | maxAge = (int) random(cp5.getController("ribbonMaxAge").getArrayValue(0), cp5.getController("ribbonMaxAge").getArrayValue(1));
14 | len = (int) random(cp5.getController("ribbonLength").getArrayValue(0), cp5.getController("ribbonLength").getArrayValue(1));
15 | skip = (int) random(cp5.getController("ribbonSkip").getArrayValue(0), cp5.getController("ribbonSkip").getArrayValue(1));
16 | speed = (int) random(cp5.getController("ribbonSpeed").getArrayValue(0), cp5.getController("ribbonSpeed").getArrayValue(1));
17 | margin = (int) random(cp5.getController("ribbonMargin").getArrayValue(0), cp5.getController("ribbonMargin").getArrayValue(1));
18 | noiseFactor = random(cp5.getController("ribbonNoiseFactor").getArrayValue(0), cp5.getController("ribbonNoiseFactor").getArrayValue(1));
19 | thickness = random(cp5.getController("ribbonThickness").getArrayValue(0), cp5.getController("ribbonThickness").getArrayValue(1));
20 | alph = (int) random(cp5.getController("ribbonAlpha").getArrayValue(0), cp5.getController("ribbonAlpha").getArrayValue(1));
21 | isCurved = ribbonIsCurved;
22 | if (ribbonIsWhite) col = color(255); else col = color(0);
23 | }
24 |
25 | void update() {
26 | age++;
27 | pos = (pos + speed) % contour.size();
28 | }
29 |
30 | void draw() {
31 | pushStyle();
32 | noFill();
33 | stroke(col, map(abs(age - 0.5*maxAge), 0.5*maxAge, 0, 0, alph));
34 | strokeWeight(thickness);
35 | beginShape();
36 | for (int i=0; i projectedContours;
9 | PVector[] pts;
10 |
11 | int NUM_PTS = 256;
12 | float LERP_RATE = 0.1;
13 |
14 | void setup()
15 | {
16 | size(displayWidth, displayHeight, P2D);
17 |
18 | // setup Kinect
19 | kinect = new SimpleOpenNI(this);
20 | kinect.enableDepth();
21 | kinect.enableUser();
22 | kinect.alternativeViewPointDepthToImage();
23 |
24 | // setup OpenCV
25 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
26 |
27 | // setup Kinect Projector Toolkit
28 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
29 | kpc.loadCalibration("calibration.txt");
30 | kpc.setContourSmoothness(3);
31 |
32 | pts = new PVector[NUM_PTS];
33 | for (int i=0; i();
46 | ArrayList contours = opencv.findContours();
47 | for (Contour contour : contours) {
48 | if (contour.area() > 2000) {
49 | ArrayList cvContour = contour.getPoints();
50 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
51 | projectedContours.add(projectedContour);
52 | }
53 | }
54 |
55 | // make for arbitrary number of people
56 |
57 | // draw projected contours
58 | background(0);
59 | for (int i=0; i contour = projectedContour.getProjectedContours();
62 | for (int j=0; j projectedContours;
9 | ArrayList projectedGraphics;
10 |
11 | void setup()
12 | {
13 | size(displayWidth, displayHeight, P2D);
14 |
15 | // setup Kinect
16 | kinect = new SimpleOpenNI(this);
17 | kinect.enableDepth();
18 | kinect.enableUser();
19 | kinect.alternativeViewPointDepthToImage();
20 |
21 | // setup OpenCV
22 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
23 |
24 | // setup Kinect Projector Toolkit
25 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
26 | kpc.loadCalibration("calibration.txt");
27 | kpc.setContourSmoothness(4);
28 |
29 | projectedGraphics = initializeProjectedGraphics();
30 | }
31 |
32 | void draw()
33 | {
34 | kinect.update();
35 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
36 | kpc.setKinectUserImage(kinect.userImage());
37 | opencv.loadImage(kpc.getImage());
38 |
39 | // get projected contours
40 | projectedContours = new ArrayList();
41 | ArrayList contours = opencv.findContours();
42 | for (Contour contour : contours) {
43 | if (contour.area() > 2000) {
44 | ArrayList cvContour = contour.getPoints();
45 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
46 | projectedContours.add(projectedContour);
47 | }
48 | }
49 |
50 | // draw projected contours
51 | background(0);
52 | for (int i=0; i initializeProjectedGraphics() {
66 | ArrayList projectedGraphics = new ArrayList();
67 | for (int p=0; p<3; p++) {
68 | color col = color(random(255), random(255), random(255));
69 | PGraphics pg = createGraphics(800, 400, P2D);
70 | pg.beginDraw();
71 | pg.background(random(255));
72 | pg.noStroke();
73 | for (int i=0; i<100; i++) {
74 | pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30));
75 | if (p==0) pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
76 | else if (p==1) pg.rect(random(pg.width), random(pg.height), random(200), random(200));
77 | else if (p==2) pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
78 | }
79 | pg.endDraw();
80 | projectedGraphics.add(pg);
81 | }
82 | return projectedGraphics;
83 | }
--------------------------------------------------------------------------------
/examples/TestBodyGraphics/data/calibration.txt:
--------------------------------------------------------------------------------
1 | 0.002608315897860353
2 | 1.0505449155879362E-4
3 | 8.982701873834213E-4
4 | 0.23785498857906104
5 | -5.639679676254882E-5
6 | -0.004125835503480505
7 | 0.0016941417243858412
8 | -1.6183115185985817
9 | -1.489422746804211E-5
10 | 2.3627671020597305E-4
11 | 0.0016099040009057567
--------------------------------------------------------------------------------
/examples/TestBodyImage/TestBodyImage.pde:
--------------------------------------------------------------------------------
1 | import gab.opencv.*;
2 | import SimpleOpenNI.*;
3 | import KinectProjectorToolkit.*;
4 |
5 | SimpleOpenNI kinect;
6 | OpenCV opencv;
7 | KinectProjectorToolkit kpc;
8 | ArrayList projectedContours;
9 | PImage img;
10 |
11 | void setup()
12 | {
13 | size(displayWidth, displayHeight, P2D);
14 |
15 | // setup Kinect
16 | kinect = new SimpleOpenNI(this);
17 | kinect.enableDepth();
18 | kinect.enableUser();
19 | kinect.alternativeViewPointDepthToImage();
20 |
21 | // setup OpenCV
22 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
23 |
24 | // setup Kinect Projector Toolkit
25 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
26 | kpc.loadCalibration("calibration.txt");
27 | kpc.setContourSmoothness(4);
28 |
29 | // load image
30 | img = loadImage("texture.jpg");
31 | }
32 |
33 | void draw()
34 | {
35 | kinect.update();
36 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
37 | kpc.setKinectUserImage(kinect.userImage());
38 | opencv.loadImage(kpc.getImage());
39 |
40 | // get projected contours
41 | projectedContours = new ArrayList();
42 | ArrayList contours = opencv.findContours();
43 | for (Contour contour : contours) {
44 | if (contour.area() > 2000) {
45 | ArrayList cvContour = contour.getPoints();
46 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
47 | projectedContours.add(projectedContour);
48 | }
49 | }
50 |
51 | // draw projected contours
52 | background(0);
53 | for (int i=0; i projectedContours;
10 | Movie mov;
11 |
12 | void setup()
13 | {
14 | size(displayWidth, displayHeight, P2D);
15 |
16 | // setup Kinect
17 | kinect = new SimpleOpenNI(this);
18 | kinect.enableDepth();
19 | kinect.enableUser();
20 | kinect.alternativeViewPointDepthToImage();
21 |
22 | // setup OpenCV
23 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
24 |
25 | // setup Kinect Projector Toolkit
26 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
27 | kpc.loadCalibration("calibration.txt");
28 | kpc.setContourSmoothness(4);
29 |
30 | // load image
31 | mov = new Movie(this, "/Users/Gene/Movies/german_train_grid.mov");
32 | mov.loop();
33 | }
34 |
35 | void movieEvent(Movie m) {
36 | m.read();
37 | }
38 |
39 | void draw()
40 | {
41 | kinect.update();
42 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
43 | kpc.setKinectUserImage(kinect.userImage());
44 | opencv.loadImage(kpc.getImage());
45 |
46 | // get projected contours
47 | projectedContours = new ArrayList();
48 | ArrayList contours = opencv.findContours();
49 | for (Contour contour : contours) {
50 | if (contour.area() > 2000) {
51 | ArrayList cvContour = contour.getPoints();
52 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
53 | projectedContours.add(projectedContour);
54 | }
55 | }
56 |
57 | // draw projected contours
58 | background(0);
59 | for (int i=0; i projectedContours;
9 | PGraphics pg;
10 | PShader shade;
11 |
12 | void setup()
13 | {
14 | size(displayWidth, displayHeight, P2D);
15 |
16 | // setup Kinect
17 | kinect = new SimpleOpenNI(this);
18 | kinect.enableDepth();
19 | kinect.enableUser();
20 | kinect.alternativeViewPointDepthToImage();
21 |
22 | // setup OpenCV
23 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
24 |
25 | // setup Kinect Projector Toolkit
26 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
27 | kpc.loadCalibration("calibration.txt");
28 | kpc.setContourSmoothness(4);
29 |
30 | // load shader and PGraphics
31 | pg = createGraphics(600, 800, P2D);
32 | shade = loadShader("waves.glsl");
33 | shade.set("resolution", float(pg.width), float(pg.height));
34 | pg.shader(shade);
35 | }
36 |
37 | void draw()
38 | {
39 | kinect.update();
40 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
41 | kpc.setKinectUserImage(kinect.userImage());
42 | opencv.loadImage(kpc.getImage());
43 |
44 | // get projected contours
45 | projectedContours = new ArrayList();
46 | ArrayList contours = opencv.findContours();
47 | for (Contour contour : contours) {
48 | if (contour.area() > 2000) {
49 | ArrayList cvContour = contour.getPoints();
50 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
51 | projectedContours.add(projectedContour);
52 | }
53 | }
54 |
55 | // draw PGraphics object with shader
56 | shade.set("time", millis()/1000.0);
57 | pg.beginDraw();
58 | pg.rect(0, 0, pg.width, pg.height);
59 | pg.endDraw();
60 |
61 | // draw projected contours
62 | background(0);
63 | for (int i=0; i projectedContours;
10 | FWorld world;
11 | ArrayList users;
12 |
13 | void setup()
14 | {
15 | size(displayWidth, displayHeight, P2D);
16 |
17 | // setup Kinect
18 | kinect = new SimpleOpenNI(this);
19 | kinect.enableDepth();
20 | kinect.enableUser();
21 | kinect.alternativeViewPointDepthToImage();
22 |
23 | // setup OpenCV
24 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
25 |
26 | // setup Kinect Projector Toolkit
27 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
28 | kpc.loadCalibration("calibration.txt");
29 | kpc.setContourSmoothness(4);
30 |
31 | // setup physics
32 | Fisica.init(this);
33 | world = new FWorld();
34 | world.setGravity(0, 800);
35 | world.setEdges(this, color(0));
36 | world.setEdgesRestitution(1.0);
37 | users = new ArrayList();
38 | }
39 |
40 | void draw()
41 | {
42 | kinect.update();
43 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
44 | kpc.setKinectUserImage(kinect.userImage());
45 | opencv.loadImage(kpc.getImage());
46 |
47 | // reset physics obstacles
48 | for (FPoly user : users) world.remove(user);
49 | users = new ArrayList();
50 |
51 | // for each projected contour, create new user obstacle
52 | projectedContours = new ArrayList();
53 | ArrayList contours = opencv.findContours();
54 | for (Contour contour : contours) {
55 | if (contour.area() > 2000) {
56 | ArrayList cvContour = contour.getPoints();
57 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
58 | projectedContours.add(projectedContour);
59 |
60 | FPoly newUser = new FPoly();
61 | newUser.setStrokeWeight(0);
62 | newUser.setFill(255, 255, 255);
63 | newUser.setDensity(10);
64 | newUser.setRestitution(0.5);
65 | ArrayList p = projectedContour.getProjectedContours();
66 | for (int i=0; i next = new ArrayList();
12 | for (Fireball fireball : fireballs) {
13 | fireball.update();
14 | fireball.draw();
15 | if (fireball.active) next.add(fireball);
16 | }
17 | fireballs = next;
18 | }
19 |
20 | void renderFireball() {
21 | pgFireball.beginDraw();
22 | pgFireball.clear();
23 | pgFireball.colorMode(HSB);
24 | pgFireball.noStroke();
25 | pgFireball.translate(pgFireball.width/2, pgFireball.height/2);
26 | for (int k=0; k<24; k++) {
27 | pgFireball.fill(map(k, 0, 24, 5, 40),
28 | map(noise(0.01*k+10, 0.01*frameCount+15), 0, 1, 180, 250),
29 | map(noise(0.01*k+20, 0.01*frameCount+25), 0, 1, 180, 250), 100);
30 | pgFireball.rotate(noise(k));
31 | pgFireball.beginShape();
32 | for (int i=0; i<120; i++) {
33 | float ang = map(i, 0, 120, 0, TWO_PI);
34 | float rad = map(noise(0.04*i+k, 0.03*frameCount+5), 0, 1,
35 | map(k, 0, 24, pgFireball.width/6, 0),
36 | map(k, 0, 24, pgFireball.width/2, 10));
37 | float x = rad * cos(ang);
38 | float y = rad * sin(ang);
39 | pgFireball.curveVertex(x, y);
40 | }
41 | pgFireball.endShape(CLOSE);
42 | }
43 | pgFireball.endDraw();
44 | }
45 |
46 | class Fireball
47 | {
48 | float t;
49 | PVector ctr, vel;
50 | boolean active;
51 | float maxSize;
52 |
53 | Fireball(PVector ctr, PVector vel) {
54 | this.ctr = ctr;
55 | this.vel = vel;
56 | vel.setMag(5.0);
57 | t = 0;
58 | maxSize = 300;
59 | active = true;
60 | }
61 |
62 | void update() {
63 | ctr.add(vel);
64 | t += 3.0;
65 | if (ctr.x < -180 || ctr.x > width + 180 || ctr.y < -180 || ctr.y > height + 180)
66 | active = false;
67 | }
68 |
69 | void draw() {
70 | pushMatrix();
71 | pushStyle();
72 | translate(ctr.x, ctr.y);
73 | image(pgFireball, 0, 0, constrain(t, 0, maxSize), constrain(t, 0, maxSize));
74 | popStyle();
75 | popMatrix();
76 | }
77 | }
--------------------------------------------------------------------------------
/examples/TestFireball/TestFireball.pde:
--------------------------------------------------------------------------------
1 | import SimpleOpenNI.*;
2 | import KinectProjectorToolkit.*;
3 |
4 | SimpleOpenNI kinect;
5 | KinectProjectorToolkit kpc;
6 | ArrayList fireballs;
7 | PGraphics pgFireball;
8 |
9 | void setup()
10 | {
11 | size(displayWidth, displayHeight, P2D);
12 |
13 | // setup Kinect
14 | kinect = new SimpleOpenNI(this);
15 | kinect.enableDepth();
16 | kinect.enableUser();
17 | kinect.alternativeViewPointDepthToImage();
18 |
19 | // setup Kinect Projector Toolkit
20 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
21 | kpc.loadCalibration("calibration.txt");
22 |
23 | // load fireballs data
24 | pgFireball = createGraphics(400, 400);
25 | fireballs = new ArrayList();
26 | }
27 |
28 | void draw()
29 | {
30 | kinect.update();
31 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
32 |
33 | background(255);
34 | renderFireball();
35 | drawProjectedSkeletons();
36 | drawFireballs();
37 | }
38 |
39 | // hit the spacebar to shoot a fireball! (needs a detected skeleton)
40 | void keyPressed() {
41 | if (key==' ') {
42 | int[] userList = kinect.getUsers();
43 | if (userList.length > 0)
44 | addFireBall(userList[(int)random(userList.length)]);
45 | }
46 | }
47 |
48 | void drawProjectedSkeletons() {
49 | int[] userList = kinect.getUsers();
50 | for(int i=0; i projectedContours;
10 | FWorld world;
11 | ArrayList users;
12 |
13 | void setup()
14 | {
15 | size(displayWidth, displayHeight, P2D);
16 |
17 | // setup Kinect
18 | kinect = new SimpleOpenNI(this);
19 | kinect.enableDepth();
20 | kinect.enableUser();
21 | kinect.alternativeViewPointDepthToImage();
22 |
23 | // setup OpenCV
24 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
25 |
26 | // setup Kinect Projector Toolkit
27 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
28 | kpc.loadCalibration("calibration.txt");
29 | kpc.setContourSmoothness(8);
30 |
31 | // setup physics
32 | Fisica.init(this);
33 | world = new FWorld();
34 | world.setGravity(0, 0);
35 | world.setEdges(this, color(0));
36 | for (int i=0; i<16; i++){
37 | FCircle ball = new FCircle(24);
38 | ball.setNoStroke();
39 | ball.setFill(random(255), random(255), random(255));
40 | ball.setPosition(random(width), random(height));
41 | ball.setVelocity(random(-300, 300), random(-300, 300));
42 | ball.setRestitution(1);
43 | ball.setDamping(0);
44 | world.add(ball);
45 | }
46 | users = new ArrayList();
47 | }
48 |
49 | void draw()
50 | {
51 | kinect.update();
52 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
53 | kpc.setKinectUserImage(kinect.userImage());
54 | opencv.loadImage(kpc.getImage());
55 |
56 | // reset physics obstacles
57 | for (FPoly user : users) world.remove(user);
58 | users = new ArrayList();
59 |
60 | // for each projected contour, create new user obstacle
61 | projectedContours = new ArrayList();
62 | ArrayList contours = opencv.findContours();
63 | for (Contour contour : contours) {
64 | if (contour.area() > 2000) {
65 | ArrayList cvContour = contour.getPoints();
66 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
67 | projectedContours.add(projectedContour);
68 | FPoly newUser = new FPoly();
69 | for (PVector p : projectedContour.getProjectedContours())
70 | newUser.vertex(p.x, p.y);
71 | //ArrayList points = projectedContour.getProjectedContours();
72 | //for (int i=0; i contour;
4 | int age, maxAge, pos, len, speed, skip, margin;
5 |
6 | Ribbon(ArrayList contour) {
7 | this.contour = contour;
8 | maxAge = 24;
9 | age = 0;
10 | pos = (int) random(contour.size());
11 | len = 36;
12 | skip = 1;
13 | speed = 3;
14 | margin = 40;
15 | }
16 |
17 | void update() {
18 | age++;
19 | pos = (pos + speed) % contour.size();
20 | }
21 |
22 | void draw() {
23 | pushStyle();
24 | noFill();
25 | stroke(255, 150);
26 | strokeWeight(4);
27 | beginShape();
28 | for (int i=0; i projectedContours;
9 | ArrayList ribbons;
10 |
11 | void setup()
12 | {
13 | size(displayWidth, displayHeight, P2D);
14 |
15 | // setup Kinect
16 | kinect = new SimpleOpenNI(this);
17 | kinect.enableDepth();
18 | kinect.enableUser();
19 | kinect.alternativeViewPointDepthToImage();
20 |
21 | // setup OpenCV
22 | opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
23 |
24 | // setup Kinect Projector Toolkit
25 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
26 | kpc.loadCalibration("calibration.txt");
27 | kpc.setContourSmoothness(4);
28 |
29 | // initialize ribbons
30 | ribbons = new ArrayList();
31 | }
32 |
33 | void draw()
34 | {
35 | kinect.update();
36 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
37 | kpc.setKinectUserImage(kinect.userImage());
38 | opencv.loadImage(kpc.getImage());
39 |
40 | // get projected contours
41 | projectedContours = new ArrayList();
42 | ArrayList contours = opencv.findContours();
43 | for (Contour contour : contours) {
44 | if (contour.area() > 2000) {
45 | ArrayList cvContour = contour.getPoints();
46 | ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.2);
47 | projectedContours.add(projectedContour);
48 | }
49 | }
50 |
51 | // add a ribbon
52 | if (projectedContours.size() > 0) addNewRibbons(3);
53 |
54 | background(0);
55 |
56 | // draw ribbons
57 | ArrayList nextRibbons = new ArrayList();
58 | for (Ribbon r : ribbons) {
59 | r.update();
60 | r.draw();
61 | if (r.age < r.maxAge) nextRibbons.add(r);
62 | }
63 | ribbons = nextRibbons;
64 | }
65 |
66 | void addNewRibbons(int n) {
67 | for (int i=0; i contourPoints = projectedContours.get(p).getProjectedContours();
70 | Ribbon newRibbon = new Ribbon(contourPoints);
71 | ribbons.add(newRibbon);
72 | }
73 | }
--------------------------------------------------------------------------------
/examples/TestRibbons/data/calibration.txt:
--------------------------------------------------------------------------------
1 | 0.002608315897860353
2 | 1.0505449155879362E-4
3 | 8.982701873834213E-4
4 | 0.23785498857906104
5 | -5.639679676254882E-5
6 | -0.004125835503480505
7 | 0.0016941417243858412
8 | -1.6183115185985817
9 | -1.489422746804211E-5
10 | 2.3627671020597305E-4
11 | 0.0016099040009057567
--------------------------------------------------------------------------------
/examples/TestSkeleton/TestSkeleton.pde:
--------------------------------------------------------------------------------
1 | import SimpleOpenNI.*;
2 | import KinectProjectorToolkit.*;
3 |
4 | SimpleOpenNI kinect;
5 | KinectProjectorToolkit kpc;
6 |
7 | int SIZE_JOINTS = 20;
8 |
9 | void setup()
10 | {
11 | size(displayWidth, displayHeight, P2D);
12 |
13 | // setup Kinect
14 | kinect = new SimpleOpenNI(this);
15 | kinect.enableDepth();
16 | kinect.enableUser();
17 | kinect.alternativeViewPointDepthToImage();
18 |
19 | // setup Kinect Projector Toolkit
20 | kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
21 | kpc.loadCalibration("calibration.txt");
22 | }
23 |
24 | void draw()
25 | {
26 | kinect.update();
27 | kpc.setDepthMapRealWorld(kinect.depthMapRealWorld());
28 |
29 | background(255);
30 | drawProjectedSkeletons();
31 | }
32 |
33 | void drawProjectedSkeletons() {
34 | int[] userList = kinect.getUsers();
35 | for(int i=0; i
3 |
4 |
5 | Kinect Projector Toolkit
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
44 | A library by Gene Kogan for the Processing programming environment.
45 | Last update, 01/21/2014.
46 |
47 |
48 | A utility for calibrating a depth camera to a projector, enabling automated projection mapping
49 |
50 | Feel free to replace this paragraph with a description of the library.
51 | Contributed libraries are developed, documented, and maintained by members of the Processing community. Further directions are included with each library. For feedback and support, please post to the Discourse. We strongly encourage all libraries to be open source, but not all of them are.
52 |
53 |
54 |
55 |
56 |
57 |
58 |
Download
59 |
60 | Download Kinect Projector Toolkit version 1.0.0 (1) in
61 | .zip format.
62 |
63 |
Installation
64 |
65 | Unzip and put the extracted KinectProjectorToolkit folder into the libraries folder of your Processing sketches. Reference and examples are included in the KinectProjectorToolkit folder.
66 |
67 |
68 |
69 |
70 |
71 |
Keywords. ?
72 |
Reference. Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.
73 |
Source. The source code of Kinect Projector Toolkit is available at GitHub, and its repository can be browsed here.
74 |
75 |
76 |
77 |
78 |
Examples
79 |
Find a list of examples in the current distribution of Kinect Projector Toolkit, or have a look at them by following the links below.
136 |
137 |
--------------------------------------------------------------------------------
/library.properties:
--------------------------------------------------------------------------------
1 | # More on this file here: https://github.com/processing/processing/wiki/Library-Basics
2 | # UTF-8 supported.
3 |
4 | # The name of your library as you want it formatted.
5 | name = Kinect Projector Toolkit
6 |
7 | # List of authors. Links can be provided using the syntax [author name](url).
8 | authorList = [Gene Kogan](http://www.genekogan.com)
9 |
10 | # A web page for your library, NOT a direct link to where to download it.
11 | url = http://www.genekogan.com
12 |
13 | # The category of your library, must be one (or many) of the following:
14 | # "3D" "Animation" "Compilations" "Data"
15 | # "Fabrication" "Geometry" "GUI" "Hardware"
16 | # "I/O" "Language" "Math" "Simulation"
17 | # "Sound" "Utilities" "Typography" "Video & Vision"
18 | #
19 | # If a value other than those listed is used, your library will listed as
20 | # "Other".
21 | category = Video & Vision
22 |
23 | # A short sentence (or fragment) to summarize the library's function. This will
24 | # be shown from inside the PDE when the library is being installed. Avoid
25 | # repeating the name of your library here. Also, avoid saying anything redundant
26 | # like mentioning that it's a library. This should start with a capitalized
27 | # letter, and end with a period.
28 | sentence = A utility for calibrating a depth camera to a projector, enabling automated projection mapping
29 |
30 | # Additional information suitable for the Processing website. The value of
31 | # 'sentence' always will be prepended, so you should start by writing the
32 | # second sentence here. If your library only works on certain operating systems,
33 | # mention it here.
34 | paragraph =
35 |
36 | # Links in the 'sentence' and 'paragraph' attributes can be inserted using the
37 | # same syntax as for authors.
38 | # That is, [here is a link to Processing](http://processing.org/)
39 |
40 |
41 | # A version number that increments once with each release. This is used to
42 | # compare different versions of the same library, and check if an update is
43 | # available. You should think of it as a counter, counting the total number of
44 | # releases you've had.
45 | version = 1 # This must be parsable as an int
46 |
47 | # The version as the user will see it. If blank, the version attribute will be
48 | # used here.
49 | prettyVersion = 1.0.0 # This is treated as a String
50 |
--------------------------------------------------------------------------------
/library/Jama-1.0.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/genekogan/KinectProjectorToolkit/4fa57ead3d3a6f3bb21eaea6b736a855de3f728c/library/Jama-1.0.3.jar
--------------------------------------------------------------------------------
/library/KinectProjectorToolkit.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/genekogan/KinectProjectorToolkit/4fa57ead3d3a6f3bb21eaea6b736a855de3f728c/library/KinectProjectorToolkit.jar
--------------------------------------------------------------------------------
/reference/KinectProjectorToolkit/KinectProjectorToolkit.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | KinectProjectorToolkit (Javadocs: KinectProjectorToolkit)
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
84 | This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
85 | Package
86 |
87 |
88 |
89 | Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
90 |
Interfaces (italic)
Classes
Enums
Exceptions
Errors
Annotation Types
91 |
92 |
93 | Class/Interface
94 |
95 |
96 |
97 | Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
98 |
Class inheritance diagram
Direct Subclasses
All Known Subinterfaces
All Known Implementing Classes
Class/interface declaration
Class/interface description
99 |
100 |
Nested Class Summary
Field Summary
Constructor Summary
Method Summary
101 |
102 |
Field Detail
Constructor Detail
Method Detail
103 | Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
104 |
105 |
106 | Annotation Type
107 |
108 |
109 |
110 | Each annotation type has its own separate page with the following sections:
111 |
Annotation Type declaration
Annotation Type description
Required Element Summary
Optional Element Summary
Element Detail
112 |
113 |
114 |
115 | Enum
116 |
117 |
118 |
119 | Each enum has its own separate page with the following sections:
120 |
Enum declaration
Enum description
Enum Constant Summary
Enum Constant Detail
121 |
122 |
123 | Tree (Class Hierarchy)
124 |
125 | There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
126 |
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
127 |
128 |
129 | Deprecated API
130 |
131 | The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
132 |
133 | Index
134 |
135 | The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
136 |
137 | Prev/Next
138 | These links take you to the next or previous class, interface, package, or related page.
139 | Frames/No Frames
140 | These links show and hide the HTML frames. All pages are available with or without frames.
141 |
142 |
143 | Serialized Form
144 | Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
145 |
146 |
147 | Constant Field Values
148 | The Constant Field Values page lists the static final fields and their values.
149 |
150 |
151 |
152 | This help file applies to API documentation generated using the standard doclet.
153 |
154 |
155 |