├── reference ├── package-list ├── resources │ └── inherit.gif ├── allclasses-noframe.html ├── allclasses-frame.html ├── KinectProjectorToolkit │ ├── package-frame.html │ ├── package-tree.html │ ├── package-summary.html │ ├── KinectProjectorToolkit.html │ └── ProjectedContour.html ├── index.html ├── stylesheet.css ├── deprecated-list.html ├── constant-values.html ├── overview-tree.html ├── help-doc.html └── index-all.html ├── library ├── Jama-1.0.3.jar └── KinectProjectorToolkit.jar ├── examples └── CALIBRATION │ ├── data │ └── calibration.txt │ ├── Util.pde │ ├── Calibrate.pde │ ├── GUI.pde │ └── CALIBRATION.pde ├── INSTALL.txt ├── library.properties ├── stylesheet.css ├── src └── KinectProjectorToolkit │ ├── ProjectedContour.java │ └── KinectProjectorToolkit.java ├── index.html ├── README.md └── LICENSE /reference/package-list: -------------------------------------------------------------------------------- 1 | KinectProjectorToolkit 2 | -------------------------------------------------------------------------------- /library/Jama-1.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnfld/K2P3Toolkit/HEAD/library/Jama-1.0.3.jar -------------------------------------------------------------------------------- /reference/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnfld/K2P3Toolkit/HEAD/reference/resources/inherit.gif -------------------------------------------------------------------------------- /library/KinectProjectorToolkit.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnfld/K2P3Toolkit/HEAD/library/KinectProjectorToolkit.jar -------------------------------------------------------------------------------- /examples/CALIBRATION/data/calibration.txt: -------------------------------------------------------------------------------- 1 | -0.0015931067165245113 2 | 7.807998878213528E-5 3 | 4.504687186247719E-4 4 | 0.7818675916498892 5 | 2.5995546106154737E-5 6 | 0.0022530939448593993 7 | 4.3828514603530305E-4 8 | 1.5034262324144336 9 | 2.5765835346201094E-5 10 | 1.309881383946595E-4 11 | 7.622301907867996E-4 12 | -------------------------------------------------------------------------------- /reference/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 29 | 30 |
KinectProjectorToolkit 25 |
26 | ProjectedContour 27 |
28 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /reference/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | All Classes (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | All Classes 20 |
21 | 22 | 23 | 24 | 29 | 30 |
KinectProjectorToolkit 25 |
26 | ProjectedContour 27 |
28 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /reference/KinectProjectorToolkit/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | KinectProjectorToolkit (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | KinectProjectorToolkit 20 | 21 | 22 | 29 | 30 |
23 | Classes  24 | 25 |
26 | KinectProjectorToolkit 27 |
28 | ProjectedContour
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /INSTALL.txt: -------------------------------------------------------------------------------- 1 | How to install library Kinect Projector Toolkit 2 | 3 | Contributed libraries may be downloaded separately and manually placed within 4 | the "libraries" folder of your Processing sketchbook. To find (and change) the 5 | Processing sketchbook location on your computer, open the Preferences window 6 | from the Processing application (PDE) and look for the "Sketchbook location" 7 | item at the top. 8 | 9 | Copy the contributed library's folder into the "libraries" folder at this 10 | location. You will need to create the "libraries" folder if this is your first 11 | contributed library. 12 | 13 | By default the following locations are used for your sketchbook folder: 14 | For Mac users, the sketchbook folder is located inside ~/Documents/Processing. 15 | For Windows users, the sketchbook folder is located inside 16 | 'My Documents'/Processing. 17 | 18 | The folder structure for library Kinect Projector Toolkit should be as follows: 19 | 20 | Processing 21 | libraries 22 | Kinect Projector Toolkit 23 | examples 24 | library 25 | Kinect Projector Toolkit.jar 26 | reference 27 | src 28 | 29 | Some folders like "examples" or "src" might be missing. After library 30 | Kinect Projector Toolkit has been successfully installed, restart the Processing 31 | application. 32 | 33 | 34 | If you're having trouble, have a look at the Processing Wiki for more 35 | information: http://wiki.processing.org/w/How_to_Install_a_Contributed_Library 36 | -------------------------------------------------------------------------------- /examples/CALIBRATION/Util.pde: -------------------------------------------------------------------------------- 1 | public class ChessboardFrame extends JFrame { 2 | public ChessboardFrame() { 3 | ca = new ChessboardApplet(); 4 | String[] args = {"Chessboard"}; 5 | PApplet.runSketch(args,ca); 6 | 7 | removeNotify(); 8 | setUndecorated(true); 9 | setAlwaysOnTop(false); 10 | setResizable(false); 11 | addNotify(); 12 | show(); 13 | } 14 | } 15 | 16 | public class ChessboardApplet extends PApplet { 17 | public void setup() { 18 | noLoop(); 19 | } 20 | //@ADD START 21 | public void settings() { 22 | fullScreen(2); 23 | } 24 | public void draw() { 25 | int cheight = (int)(cwidth * 0.8); 26 | background(255); 27 | fill(0); 28 | for (int j=0; j<4; j++) { 29 | for (int i=0; i<5; i++) { 30 | int x = int(cx + map(i, 0, 5, 0, cwidth)); 31 | int y = int(cy + map(j, 0, 4, 0, cheight)); 32 | 33 | if (i>0 && j>0) projPoints.add(new PVector((float)x/pWidth, (float)y/pHeight)); 34 | if ((i+j)%2==0) rect(x, y, cwidth/5, cheight/4); 35 | } 36 | } 37 | fill(0, 255, 0); 38 | if (calibrated) 39 | ellipse(testPointP.x, testPointP.y, 20, 20); 40 | } 41 | } 42 | 43 | void saveCalibration(String filename) { 44 | String[] coeffs = getCalibrationString(); 45 | saveStrings(dataPath(filename), coeffs); 46 | } 47 | 48 | void loadCalibration(String filename) { 49 | String[] s = loadStrings(dataPath(filename)); 50 | x = new Jama.Matrix(11, 1); 51 | for (int i=0; i 2 | 3 | 4 | 5 | 6 | 7 | Javadocs: KinectProjectorToolkit 8 | 9 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | <H2> 62 | Frame Alert</H2> 63 | 64 | <P> 65 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 66 | <BR> 67 | Link to<A HREF="KinectProjectorToolkit/package-summary.html">Non-frame version.</A> 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /stylesheet.css: -------------------------------------------------------------------------------- 1 | /* processingLibs style by andreas schlegel, sojamo. */ 2 | 3 | 4 | * { 5 | margin:0; 6 | padding:0; 7 | border:0; 8 | } 9 | 10 | 11 | body { 12 | font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | font-size : 100%; 14 | font-size : 0.70em; 15 | font-weight : normal; 16 | line-height : normal; 17 | } 18 | 19 | 20 | 21 | #container { 22 | margin-left:64px; 23 | background-color:#fff; 24 | } 25 | 26 | #header { 27 | float:left; 28 | padding-top:24px; 29 | padding-bottom:48px; 30 | } 31 | 32 | #menu { 33 | margin-top:16px; 34 | float:left; 35 | margin-bottom:64px; 36 | } 37 | 38 | 39 | #about, 40 | #download, 41 | #examples, 42 | #demos, 43 | #misc { 44 | width:480px; 45 | float:left; 46 | margin-right:24px; 47 | } 48 | 49 | 50 | #resources, #info { 51 | width:320px; 52 | float:left; 53 | } 54 | 55 | 56 | .clear { 57 | clear:both; 58 | } 59 | 60 | #footer { 61 | margin-top:300px; 62 | height:20px; 63 | margin-bottom:32px; 64 | } 65 | 66 | 67 | ul { 68 | list-style:none; 69 | padding:0; 70 | margin:0; 71 | } 72 | 73 | 74 | #menu ul li, #subMenu ul li { 75 | float:left; 76 | padding-right:6px; 77 | } 78 | 79 | 80 | 81 | 82 | 83 | 84 | /* Headings */ 85 | 86 | h1 { 87 | font-size:2em; 88 | font-weight:normal; 89 | } 90 | 91 | 92 | h2, h3, h4, h5, th { 93 | font-size:1.3em; 94 | font-weight:normal; 95 | margin-bottom:4px; 96 | } 97 | 98 | 99 | 100 | p { 101 | font-size:1em; 102 | width:90%; 103 | margin-bottom:32px; 104 | } 105 | 106 | 107 | pre, code { 108 | font-family:"Courier New", Courier, monospace; 109 | font-size:1em; 110 | line-height:normal; 111 | } 112 | 113 | 114 | 115 | 116 | hr { 117 | border:0; 118 | height:1px; 119 | margin-bottom:24px; 120 | } 121 | 122 | 123 | a { 124 | text-decoration: underline; 125 | font-weight: normal; 126 | } 127 | 128 | 129 | a:hover, 130 | a:active { 131 | text-decoration: underline; 132 | font-weight: normal; 133 | } 134 | 135 | 136 | a:visited, 137 | a:link:visited { 138 | text-decoration: underline; 139 | font-weight: normal; 140 | } 141 | 142 | 143 | 144 | img { 145 | border: 0px solid #000000; 146 | } 147 | 148 | 149 | 150 | 151 | 152 | /* COLORS */ 153 | 154 | 155 | body { 156 | color : #333; 157 | background-color :#fff; 158 | } 159 | 160 | 161 | #header { 162 | background-color:#fff; 163 | color:#333; 164 | } 165 | 166 | 167 | 168 | h1, h2, h3, h4, h5, h6 { 169 | color:#666; 170 | } 171 | 172 | 173 | pre, code { 174 | color: #000000; 175 | } 176 | 177 | 178 | a,strong { 179 | color: #333; 180 | } 181 | 182 | 183 | a:hover, 184 | a:active { 185 | color: #333; 186 | } 187 | 188 | 189 | a:visited, 190 | a:link:visited { 191 | color: #333; 192 | } 193 | 194 | 195 | #footer, #menu { 196 | background-color:#fff; 197 | color:#333; 198 | } 199 | 200 | 201 | #footer a, #menu a { 202 | color:#333; 203 | } 204 | -------------------------------------------------------------------------------- /reference/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | /* Define colors, fonts and other style attributes here to override the defaults */ 3 | /* processingLibs style by andreas schlegel, sojamo */ 4 | 5 | 6 | body { 7 | margin : 0; 8 | padding : 0; 9 | padding-left : 10px; 10 | padding-right : 8px; 11 | background-color : #FFFFFF; 12 | font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | font-size : 100%; 14 | font-size : 0.7em; 15 | font-weight : normal; 16 | line-height : normal; 17 | margin-bottom:30px; 18 | } 19 | 20 | 21 | 22 | 23 | /* Headings */ 24 | h1, h2, h3, h4, h5, th { 25 | font-family :Arial, Helvetica, sans-serif; 26 | font-size:1.2em; 27 | } 28 | 29 | 30 | p { 31 | font-size : 1em; 32 | width:80%; 33 | } 34 | 35 | pre, code { 36 | font-family : "Courier New", Courier, monospace; 37 | font-size : 12px; 38 | line-height : normal; 39 | } 40 | 41 | 42 | 43 | table { 44 | border:0; 45 | margin-bottom:10px; 46 | margin-top:10px; 47 | } 48 | 49 | 50 | tr, td { 51 | border-top: 0px solid; 52 | border-left: 0px solid; 53 | padding-top:8px; 54 | padding-bottom:8px; 55 | } 56 | 57 | 58 | 59 | hr { 60 | border:0; 61 | height:1px; 62 | padding:0; 63 | margin:0; 64 | margin-bottom:4px; 65 | 66 | } 67 | 68 | 69 | 70 | dd, th, td, font { 71 | font-size:1.0em; 72 | line-height:1.0em; 73 | } 74 | 75 | 76 | 77 | dt { 78 | margin-bottom:0px; 79 | } 80 | 81 | 82 | 83 | dd { 84 | margin-top:2px; 85 | margin-bottom:4px; 86 | } 87 | 88 | 89 | 90 | a { 91 | text-decoration: underline; 92 | font-weight: normal; 93 | } 94 | 95 | a:hover, 96 | a:active { 97 | text-decoration: underline; 98 | font-weight: normal; 99 | } 100 | 101 | a:visited, 102 | a:link:visited { 103 | text-decoration: underline; 104 | font-weight: normal; 105 | } 106 | 107 | 108 | img { 109 | border: 0px solid #000000; 110 | } 111 | 112 | 113 | 114 | /* Navigation bar fonts */ 115 | .NavBarCell1 { 116 | border:0; 117 | } 118 | 119 | .NavBarCell1Rev { 120 | border:0; 121 | } 122 | 123 | .NavBarFont1 { 124 | font-family: Arial, Helvetica, sans-serif; 125 | font-size:1.1em; 126 | } 127 | 128 | 129 | .NavBarFont1 b { 130 | font-weight:normal; 131 | } 132 | 133 | 134 | 135 | .NavBarFont1:after, .NavBarFont1Rev:after { 136 | font-weight:normal; 137 | content: " \\"; 138 | } 139 | 140 | 141 | .NavBarFont1Rev { 142 | font-family: Arial, Helvetica, sans-serif; 143 | font-size:1.1em; 144 | } 145 | 146 | .NavBarFont1Rev b { 147 | font-family: Arial, Helvetica, sans-serif; 148 | font-size:1.1em; 149 | font-weight:normal; 150 | } 151 | 152 | .NavBarCell2 { 153 | font-family: Arial, Helvetica, sans-serif; 154 | } 155 | 156 | .NavBarCell3 { 157 | font-family: Arial, Helvetica, sans-serif; 158 | } 159 | 160 | 161 | 162 | font.FrameItemFont { 163 | font-family: Helvetica, Arial, sans-serif; 164 | font-size:1.1em; 165 | line-height:1.1em; 166 | } 167 | 168 | font.FrameHeadingFont { 169 | font-family: Helvetica, Arial, sans-serif; 170 | line-height:32px; 171 | } 172 | 173 | /* Font used in left-hand frame lists */ 174 | .FrameTitleFont { 175 | font-family: Helvetica, Arial, sans-serif 176 | } 177 | 178 | 179 | .toggleList { 180 | padding:0; 181 | margin:0; 182 | margin-top:12px; 183 | } 184 | 185 | .toggleList dt { 186 | font-weight:bold; 187 | font-size:12px; 188 | font-family:arial,sans-serif; 189 | padding:0px; 190 | margin:10px 0px 10px 0px; 191 | } 192 | 193 | .toggleList dt span { 194 | font-family: monospace; 195 | padding:0; 196 | margin:0; 197 | } 198 | 199 | 200 | .toggleList dd { 201 | margin:0; 202 | padding:0; 203 | } 204 | 205 | html.isjs .toggleList dd { 206 | display: none; 207 | } 208 | 209 | .toggleList pre { 210 | padding: 4px 4px 4px 4px; 211 | } 212 | 213 | 214 | 215 | 216 | 217 | /* COLORS */ 218 | 219 | pre, code { 220 | color: #000000; 221 | } 222 | 223 | 224 | body { 225 | color : #333333; 226 | background-color :#FFFFFF; 227 | } 228 | 229 | 230 | h1, h2, h3, h4, h5, h6 { 231 | color:#555; 232 | } 233 | 234 | a, 235 | .toggleList dt { 236 | color: #1a7eb0; 237 | } 238 | 239 | a:hover, 240 | a:active { 241 | color: #1a7eb0; 242 | } 243 | 244 | a:visited, 245 | a:link:visited { 246 | color: #1a7eb0; 247 | } 248 | 249 | td,tr { 250 | border-color: #999999; 251 | } 252 | 253 | hr { 254 | color:#999999; 255 | background:#999999; 256 | } 257 | 258 | 259 | .TableHeadingColor { 260 | background: #dcdcdc; 261 | color: #555; 262 | } 263 | 264 | 265 | .TableSubHeadingColor { 266 | background: #EEEEFF 267 | } 268 | 269 | .TableRowColor { 270 | background: #FFFFFF 271 | } 272 | 273 | 274 | .NavBarCell1 { 275 | background-color:#dcdcdc; 276 | color:#000; 277 | } 278 | 279 | .NavBarCell1 a { 280 | color:#333; 281 | } 282 | 283 | 284 | .NavBarCell1Rev { 285 | background-color:transparent; 286 | } 287 | 288 | .NavBarFont1 { 289 | color:#333; 290 | } 291 | 292 | 293 | .NavBarFont1Rev { 294 | color:#fff; 295 | } 296 | 297 | .NavBarCell2 { 298 | background-color:#999; 299 | } 300 | 301 | .NavBarCell2 a { 302 | color:#fff; 303 | } 304 | 305 | 306 | 307 | .NavBarCell3 { 308 | background-color:#dcdcdc; 309 | } 310 | 311 | -------------------------------------------------------------------------------- /reference/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Deprecated List (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |
81 |

82 | Deprecated API

83 |
84 |
85 | Contents 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 109 | 112 | 113 | 114 | 115 | 118 | 134 | 135 |
110 | 111 |
136 | 137 | 138 | 139 |
140 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 141 | 142 | 143 | -------------------------------------------------------------------------------- /reference/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Constant Field Values (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |
81 |

82 | Constant Field Values

83 |
84 |
85 | Contents 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 109 | 112 | 113 | 114 | 115 | 118 | 134 | 135 |
110 | 111 |
136 | 137 | 138 | 139 |
140 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 141 | 142 | 143 | -------------------------------------------------------------------------------- /src/KinectProjectorToolkit/ProjectedContour.java: -------------------------------------------------------------------------------- 1 | package KinectProjectorToolkit; 2 | 3 | /** 4 | * KinectProjectorToolkit is a Processing library which facilitates 5 | * the calibrated alignment of a Kinect depth camera with a video 6 | * projector. 7 | * 8 | * 2013 by Gene Kogan 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public License 12 | * as published by the Free Software Foundation; either version 2.1 13 | * of the License, or (at your option) any later version. 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General 20 | * Public License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | * Boston, MA 02111-1307 USA 23 | * 24 | * @author Gene Kogan (http://www.genekogan.com) 25 | * @modified Jan 2014 26 | * @version 1.0 27 | * @example TestBodyGraphics 28 | * 29 | */ 30 | 31 | import processing.core.PApplet; 32 | import processing.core.PVector; 33 | import java.awt.Rectangle; 34 | import java.util.ArrayList; 35 | 36 | public class ProjectedContour 37 | { 38 | KinectProjectorToolkit kpc; 39 | ArrayList contourPoints; 40 | ArrayList blobPoints; 41 | Rectangle boundingBox; 42 | 43 | /** 44 | * create projected contours from a set of OpenCV contour points and an instance of KinectProjectorToolkit 45 | * 46 | * @example TestBodyGraphics 47 | * @param theContourPoints 48 | * @param theKpc 49 | */ 50 | public ProjectedContour(ArrayList theContourPoints, KinectProjectorToolkit theKpc) { 51 | contourPoints = theContourPoints; 52 | kpc = theKpc; 53 | } 54 | 55 | /** 56 | * calculates the projected, dilated, and smoothed contour points 57 | * 58 | * @example TestBodyGraphics 59 | * @param blobDilate stretching factor of contour's bounding box (1.0 = no stretching) 60 | */ 61 | public void calculateProjectedContour(float blobDilate) 62 | { 63 | ArrayList projectedPoints = new ArrayList(); 64 | blobPoints = new ArrayList(); 65 | 66 | if (contourPoints.size() < 100) { 67 | blobPoints = new ArrayList(); 68 | return; 69 | } 70 | 71 | PVector bbTL = new PVector(kpc.width, kpc.height); 72 | PVector bbBR = new PVector(0, 0); 73 | for (PVector cp : contourPoints) { 74 | cp.x = PApplet.constrain(cp.x, 0, kpc.width-1); 75 | cp.y = PApplet.constrain(cp.y, 0, kpc.height-1); 76 | 77 | PVector kp = kpc.getDepthMapAt((int)cp.x, (int)cp.y); 78 | PVector pp = kpc.convertKinectToProjector(kp); 79 | projectedPoints.add(pp); 80 | if (pp.x < bbTL.x) bbTL.x = pp.x; 81 | else if (pp.x > bbBR.x) bbBR.x = pp.x; 82 | if (pp.y < bbTL.y) bbTL.y = pp.y; 83 | else if (pp.y > bbBR.y) bbBR.y = pp.y; 84 | } 85 | 86 | Rectangle bbOriginal = new Rectangle( 87 | (int)bbTL.x, (int)bbTL.y, 88 | (int)(bbBR.x - bbTL.x), (int)(bbBR.y - bbTL.y)); 89 | Rectangle bbDilated = new Rectangle( 90 | (int) (bbTL.x - 0.5 * bbOriginal.width * (blobDilate - 1.0)), (int)(bbTL.y - 0.5 * bbOriginal.height * (blobDilate - 1.0)), 91 | (int) (bbOriginal.width * blobDilate), (int) (bbOriginal.height * blobDilate)); 92 | 93 | // dilate bounding box 94 | for (PVector pp : projectedPoints) { 95 | pp.set(PApplet.map(pp.x, bbOriginal.x, bbOriginal.x + bbOriginal.width, bbDilated.x, bbDilated.x + bbDilated.width), 96 | PApplet.map(pp.y, bbOriginal.y, bbOriginal.y + bbOriginal.height, bbDilated.y, bbDilated.y + bbDilated.height)); 97 | } 98 | 99 | // smooth points and add to blobPoints 100 | for (int i=0; i getProjectedContours() { 131 | return blobPoints; 132 | } 133 | 134 | /** 135 | * get projected contour's bounding box (requires java.awt.*) 136 | * 137 | * @example TestBodyGraphics 138 | * @return boundingBox 139 | */ 140 | public Rectangle getBoundingBox() { 141 | return boundingBox; 142 | } 143 | 144 | /** 145 | * get a single contour point's coordinates for texture mapping 146 | * 147 | * @example TestBodyGraphics 148 | * @return PVector 149 | */ 150 | public PVector getTextureCoordinate(PVector p) { 151 | return new PVector((p.x - boundingBox.x) / boundingBox.width, 152 | (p.y - boundingBox.y) / boundingBox.height); 153 | } 154 | } -------------------------------------------------------------------------------- /reference/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Class Hierarchy (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |
81 |

82 | Hierarchy For All Packages

83 |
84 |
85 |
Package Hierarchies:
KinectProjectorToolkit
86 |
87 |

88 | Class Hierarchy 89 |

90 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 115 | 118 | 119 | 120 | 121 | 124 | 140 | 141 |
116 | 117 |
142 | 143 | 144 | 145 |
146 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 147 | 148 | 149 | -------------------------------------------------------------------------------- /reference/KinectProjectorToolkit/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | KinectProjectorToolkit Class Hierarchy (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |
81 |

82 | Hierarchy For Package KinectProjectorToolkit 83 |

84 |
85 |

86 | Class Hierarchy 87 |

88 | 92 |
93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 113 | 116 | 117 | 118 | 119 | 122 | 138 | 139 |
114 | 115 |
140 | 141 | 142 | 143 |
144 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 145 | 146 | 147 | -------------------------------------------------------------------------------- /reference/KinectProjectorToolkit/package-summary.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 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |

81 | Package KinectProjectorToolkit 82 |

83 | 84 | 85 | 86 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |
87 | Class Summary
KinectProjectorToolkit 
ProjectedContour 
98 |   99 | 100 |

101 |

102 |
103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 124 | 127 | 128 | 129 | 130 | 133 | 149 | 150 |
125 | 126 |
151 | 152 | 153 | 154 |
155 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 156 | 157 | 158 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Kinect Projector Toolkit 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 25 | 26 | 38 | 39 |
40 | 41 |
42 |

Kinect Projector Toolkit

43 |

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.

80 | 83 |
84 | 85 | 86 |
87 |

Tested

88 |

89 | 90 | Platform osx 91 | 92 | 93 |
Processing 2.0 94 | 95 | 96 |
Dependencies ? 97 |

98 |
99 | 100 | 101 | 102 | 114 | 115 | 116 | 121 | 122 | 123 | 127 | 128 | 129 |
130 |
131 | 132 | 135 |
136 | 137 | -------------------------------------------------------------------------------- /src/KinectProjectorToolkit/KinectProjectorToolkit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinect Projector Toolkit 3 | * A utility for calibrating a depth camera to a projector, enabling automated projection mapping 4 | * http://www.genekogan.com 5 | * 6 | * Copyright (c) 2013 Gene Kogan http://www.genekogan.com 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General 19 | * Public License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | * Boston, MA 02111-1307 USA 22 | * 23 | * @author Gene Kogan http://www.genekogan.com 24 | * @modified 01/13/2014 25 | * @version 1.0.0 (1) 26 | */ 27 | 28 | package KinectProjectorToolkit; 29 | 30 | /** 31 | * KinectProjectorToolkit is a Processing library which facilitates 32 | * the calibrated alignment of a Kinect depth camera with a video 33 | * projector. 34 | * 35 | * 2013 by Gene Kogan 36 | * 37 | * This library is free software; you can redistribute it and/or 38 | * modify it under the terms of the GNU Lesser General Public License 39 | * as published by the Free Software Foundation; either version 2.1 40 | * of the License, or (at your option) any later version. 41 | * This library is distributed in the hope that it will be useful, 42 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 43 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | * Lesser General Public License for more details. 45 | * 46 | * You should have received a copy of the GNU Lesser General 47 | * Public License along with this library; if not, write to the 48 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 49 | * Boston, MA 02111-1307 USA 50 | * 51 | * @author Gene Kogan (http://www.genekogan.com) 52 | * @modified Jan 2014 53 | * @version 1.0 54 | * @example TestBodyGraphics 55 | * 56 | */ 57 | 58 | 59 | import processing.core.*; 60 | import processing.opengl.*; 61 | import java.util.ArrayList; 62 | 63 | 64 | public class KinectProjectorToolkit 65 | { 66 | PApplet myParent; 67 | int width, height; 68 | float[] projectorMatrix; 69 | PVector[] depthMapRealWorld; 70 | PGraphics pgKinect; 71 | PShader userShader; 72 | float[] window; 73 | float totalWindow; 74 | int blobWindow, blobSkip; 75 | 76 | 77 | /** 78 | * create a new instance of KinectProjectorToolkit 79 | * 80 | * @example TestBodyGraphics 81 | * @param theParent 82 | * @param theWidth 83 | * @param theHeight 84 | */ 85 | public KinectProjectorToolkit(PApplet theParent, int theWidth, int theHeight) { 86 | myParent = theParent; 87 | width = theWidth; 88 | height = theHeight; 89 | pgKinect = myParent.createGraphics(width, height, PApplet.P2D); 90 | userShader = myParent.loadShader("kinectUser.glsl"); 91 | userShader.set("resolution", (float)pgKinect.width, (float)pgKinect.height); 92 | pgKinect.shader(userShader); 93 | setContourSmoothness(1); 94 | System.out.println("Kinect Projector Toolkit 1.0.0 by Gene Kogan http://www.genekogan.com"); 95 | } 96 | 97 | /** 98 | * load a previous calibration 99 | * 100 | * @param filepath 101 | * path to calibration file 102 | */ 103 | public void loadCalibration(String filename) { 104 | String[] s = myParent.loadStrings(myParent.dataPath(filename)); 105 | projectorMatrix = new float[s.length]; 106 | for (int i=0; i contourPoints, float blobDilate) { 183 | ProjectedContour projectedContour = new ProjectedContour(contourPoints, this); 184 | projectedContour.calculateProjectedContour(blobDilate); 185 | return projectedContour; 186 | } 187 | 188 | private void setupBlobWindow() { 189 | totalWindow = 1.0f; 190 | window = new float[blobWindow+1]; 191 | window[0] = 1.0f; 192 | for (int i=1; i<=blobWindow; i++) { 193 | window[i] = 1.0f - (i/(blobWindow+1)); 194 | totalWindow += 2*window[i]; 195 | } 196 | } 197 | } 198 | 199 | -------------------------------------------------------------------------------- /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 = 800; 5 | int pHeight = 600; 6 | String calibFilename = "calibration.txt"; 7 | 8 | 9 | //========================================================== 10 | //========================================================== 11 | 12 | import javax.swing.JFrame; 13 | import org.openkinect.freenect.*; 14 | import org.openkinect.freenect2.*; 15 | import org.openkinect.processing.*; 16 | 17 | import gab.opencv.*; 18 | import controlP5.*; 19 | import Jama.*; 20 | 21 | Kinect2 kinect; 22 | 23 | OpenCV opencv; 24 | ChessboardFrame frameBoard; 25 | ChessboardApplet ca; 26 | PVector[] depthMap; 27 | PImage src; 28 | ArrayList foundPoints = new ArrayList(); 29 | ArrayList projPoints = new ArrayList(); 30 | ArrayList ptsK, ptsP; 31 | PVector testPoint, testPointP; 32 | boolean isSearchingBoard = false; 33 | boolean calibrated = false; 34 | boolean testingMode = false; 35 | int cx, cy, cwidth; 36 | 37 | void setup() 38 | { 39 | surface.setSize(1200, 768); 40 | 41 | textFont(createFont("Courier", 24)); 42 | frameBoard = new ChessboardFrame(); 43 | 44 | // set up kinect 45 | kinect = new Kinect2(this); 46 | kinect.initDepth(); 47 | kinect.initVideo(); 48 | kinect.initRegistered(); 49 | kinect.initIR(); 50 | kinect.initDevice(); 51 | 52 | opencv = new OpenCV(this, kinect.depthWidth, kinect.depthHeight); 53 | 54 | depthMap = new PVector[kinect.depthWidth*kinect.depthHeight]; 55 | 56 | // matching pairs 57 | ptsK = new ArrayList(); 58 | ptsP = new ArrayList(); 59 | testPoint = new PVector(); 60 | testPointP = new PVector(); 61 | setupGui(); 62 | } 63 | 64 | void draw() 65 | { 66 | // draw chessboard onto scene 67 | projPoints = drawChessboard(cx, cy, cwidth); 68 | 69 | // update depth map 70 | depthMap = depthMapRealWorld(); 71 | 72 | src = kinect.getRegisteredImage(); 73 | 74 | // mirroring 75 | for (int h = 0; h < kinect.depthHeight; h++) 76 | { 77 | for (int r = 0; r < kinect.depthWidth / 2; r++) 78 | { 79 | PVector temp = depthMap[h*kinect.depthWidth + r]; 80 | depthMap[h*kinect.depthWidth + r] = depthMap[h*kinect.depthWidth + (kinect.depthWidth - r - 1)]; 81 | depthMap[h*kinect.depthWidth + (kinect.depthWidth - r - 1)] = temp; 82 | } 83 | } 84 | 85 | // mirroring 86 | for (int h = 0; h < src.height; h++) 87 | { 88 | for (int r = 0; r < src.width / 2; r++) 89 | { 90 | int temp2 = src.get(r, h); //h*src.width + r); 91 | src.set(r, h, src.get(src.width - r - 1, h)); 92 | src.set(src.width - r - 1, h, temp2); 93 | } 94 | } 95 | 96 | opencv.loadImage(src); 97 | opencv.gray(); 98 | 99 | if (isSearchingBoard) 100 | foundPoints = opencv.findChessboardCorners(4, 3); 101 | 102 | drawGui(); 103 | } 104 | 105 | void drawGui() 106 | { 107 | background(0, 100, 0); 108 | 109 | // draw the RGB image 110 | pushMatrix(); 111 | translate(30, 120); 112 | textSize(22); 113 | fill(255); 114 | image(src, 0, 0); 115 | 116 | // draw chessboard corners, if found 117 | if (isSearchingBoard) { 118 | int numFoundPoints = 0; 119 | for (PVector p : foundPoints) { 120 | if (getDepthMapAt((int)p.x, (int)p.y).z > 0) { 121 | fill(0, 255, 0); 122 | numFoundPoints += 1; 123 | } 124 | else fill(255, 0, 0); 125 | ellipse(p.x, p.y, 5, 5); 126 | } 127 | if (numFoundPoints == 12) guiAdd.show(); 128 | else guiAdd.hide(); 129 | } 130 | else guiAdd.hide(); 131 | if (calibrated && testingMode) { 132 | fill(255, 0, 0); 133 | ellipse(testPoint.x, testPoint.y, 10, 10); 134 | } 135 | popMatrix(); 136 | 137 | // draw GUI 138 | pushMatrix(); 139 | pushStyle(); 140 | translate(kinect.depthWidth+70, 40); // this is black box 141 | fill(0); 142 | rect(0, 0, 450, 680); // blackbox size 143 | fill(255); 144 | text(ptsP.size()+" pairs", 26, guiPos.y+525); 145 | popStyle(); 146 | popMatrix(); 147 | } 148 | 149 | ArrayList drawChessboard(int x0, int y0, int cwidth) { 150 | ArrayList projPoints = new ArrayList(); 151 | ca.redraw(); 152 | return projPoints; 153 | } 154 | 155 | 156 | void addPointPair() { 157 | if (projPoints.size() == foundPoints.size()) { 158 | println(getDepthMapAt((int) foundPoints.get(1).x, (int) foundPoints.get(1).y)); 159 | for (int i=0; i contourPoints)`. 84 | 85 | 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). 86 | 87 | 88 | ##Test applications 89 | 90 | Test applications have not yet been updated to work with this version of the toolkit. -------------------------------------------------------------------------------- /reference/help-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | API Help (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 |
80 |
81 |

82 | How This API Document Is Organized

83 |
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 |


156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 176 | 179 | 180 | 181 | 182 | 185 | 201 | 202 |
177 | 178 |
203 | 204 | 205 | 206 |
207 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 208 | 209 | 210 | -------------------------------------------------------------------------------- /reference/index-all.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Index (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 |
50 | 51 |
76 | 77 | 78 | 79 | C G K L P S
80 |

81 | C

82 |
83 |
calculateProjectedContour(float) - 84 | Method in class KinectProjectorToolkit.ProjectedContour 85 |
calculates the projected, dilated, and smoothed contour points 86 |
calculateProjectedContour() - 87 | Method in class KinectProjectorToolkit.ProjectedContour 88 |
calculates the projected, dilated, and smoothed contour points with no stretching 89 |
convertKinectToProjector(PVector) - 90 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 91 |
get 2d projector point of a 3d real world kinect point 92 |
93 |
94 |

95 | G

96 |
97 |
getBoundingBox() - 98 | Method in class KinectProjectorToolkit.ProjectedContour 99 |
get projected contour's bounding box (requires java.awt.*) 100 |
getDepthMapAt(int, int) - 101 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 102 |
get 3d real world kinect point from 640x480 Kinect depth map 103 |
getImage() - 104 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 105 |
get kinect depth image 106 |
getProjectedContour(ArrayList<PVector>, float) - 107 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 108 |
takes OpenCV body contours, returns projected contours 109 |
getProjectedContours() - 110 | Method in class KinectProjectorToolkit.ProjectedContour 111 |
get projected contour points 112 |
getTextureCoordinate(PVector) - 113 | Method in class KinectProjectorToolkit.ProjectedContour 114 |
get a single contour point's coordinates for texture mapping 115 |
116 |
117 |

118 | K

119 |
120 |
KinectProjectorToolkit - package KinectProjectorToolkit
 
KinectProjectorToolkit - Class in KinectProjectorToolkit
 
KinectProjectorToolkit(PApplet, int, int) - 121 | Constructor for class KinectProjectorToolkit.KinectProjectorToolkit 122 |
create a new instance of KinectProjectorToolkit 123 |
124 |
125 |

126 | L

127 |
128 |
loadCalibration(String) - 129 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 130 |
load a previous calibration 131 |
132 |
133 |

134 | P

135 |
136 |
ProjectedContour - Class in KinectProjectorToolkit
 
ProjectedContour(ArrayList<PVector>, KinectProjectorToolkit) - 137 | Constructor for class KinectProjectorToolkit.ProjectedContour 138 |
create projected contours from a set of OpenCV contour points and an instance of KinectProjectorToolkit 139 |
140 |
141 |

142 | S

143 |
144 |
setContourSmoothness(int) - 145 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 146 |
sets smoothness of found contours 147 |
setDepthMapRealWorld(PVector[]) - 148 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 149 |
update real world depth map 150 |
setKinectUserImage(PImage) - 151 | Method in class KinectProjectorToolkit.KinectProjectorToolkit 152 |
update kinect depth image 153 |
154 |
155 | C G K L P S 156 | 157 | 158 | 159 | 160 | 161 | 162 | 175 | 178 | 179 | 180 | 181 | 184 | 200 | 201 |
176 | 177 |
202 | 203 | 204 | 205 |
206 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 207 | 208 | 209 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 | 76 | 78 | 80 | 81 |
50 | 51 |
82 | 83 | 84 | 85 |
86 | 87 |

88 | 89 | KinectProjectorToolkit 90 |
91 | Class KinectProjectorToolkit

92 |
 93 | java.lang.Object
 94 |   extended by KinectProjectorToolkit.KinectProjectorToolkit
 95 | 
96 |
97 |
98 |
public class KinectProjectorToolkit
extends Object
99 | 100 | 101 |

102 |


103 | 104 |

105 | 106 | 107 | 108 | 109 | 110 | 111 | 113 | 114 | 115 | 121 | 122 |
112 | Constructor Summary
KinectProjectorToolkit(PApplet theParent, 116 | int theWidth, 117 | int theHeight) 118 | 119 |
120 |           create a new instance of KinectProjectorToolkit
123 |   124 | 125 | 126 | 127 | 128 | 129 | 131 | 132 | 133 | 135 | 139 | 140 | 141 | 143 | 148 | 149 | 150 | 152 | 156 | 157 | 158 | 160 | 165 | 166 | 167 | 169 | 173 | 174 | 175 | 177 | 181 | 182 | 183 | 185 | 189 | 190 | 191 | 193 | 197 | 198 |
130 | Method Summary
134 |  PVectorconvertKinectToProjector(PVector kinectPoint) 136 | 137 |
138 |           get 2d projector point of a 3d real world kinect point
142 |  PVectorgetDepthMapAt(int x, 144 | int y) 145 | 146 |
147 |           get 3d real world kinect point from 640x480 Kinect depth map
151 |  PGraphicsgetImage() 153 | 154 |
155 |           get kinect depth image
159 |  ProjectedContourgetProjectedContour(ArrayList<PVector> contourPoints, 161 | float blobDilate) 162 | 163 |
164 |           takes OpenCV body contours, returns projected contours
168 |  voidloadCalibration(String filename) 170 | 171 |
172 |           load a previous calibration
176 |  voidsetContourSmoothness(int smoothness) 178 | 179 |
180 |           sets smoothness of found contours
184 |  voidsetDepthMapRealWorld(PVector[] theDepthMapRealWorld) 186 | 187 |
188 |           update real world depth map
192 |  voidsetKinectUserImage(PImage theKinectUserImage) 194 | 195 |
196 |           update kinect depth image
199 |   200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 |
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
208 |   209 |

210 | 211 | 212 | 213 | 214 | 215 | 216 | 218 | 219 |
217 | Constructor Detail
220 | 221 |

222 | KinectProjectorToolkit

223 |
224 | public KinectProjectorToolkit(PApplet theParent,
225 |                               int theWidth,
226 |                               int theHeight)
227 |
228 |
create a new instance of KinectProjectorToolkit 229 |

230 |

231 |
Parameters:
theParent -
theWidth -
theHeight - 236 |
+Example
import gab.opencv.*;
237 | import SimpleOpenNI.*;
238 | import KinectProjectorToolkit.*;
239 | 
240 | SimpleOpenNI kinect;
241 | OpenCV opencv;
242 | KinectProjectorToolkit kpc;
243 | ArrayList projectedContours;
244 | ArrayList projectedGraphics;
245 | 
246 | void setup()
247 | {
248 |   size(displayWidth, displayHeight, P2D); 
249 | 
250 |   // setup Kinect
251 |   kinect = new SimpleOpenNI(this); 
252 |   kinect.enableDepth();
253 |   kinect.enableUser();
254 |   kinect.alternativeViewPointDepthToImage();
255 |   
256 |   // setup OpenCV
257 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
258 | 
259 |   // setup Kinect Projector Toolkit
260 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
261 |   kpc.loadCalibration("calibration.txt");
262 |   kpc.setContourSmoothness(4);
263 |   
264 |   projectedGraphics = initializeProjectedGraphics();
265 | }
266 | 
267 | void draw()
268 | {  
269 |   kinect.update();  
270 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
271 |   kpc.setKinectUserImage(kinect.userImage());
272 |   opencv.loadImage(kpc.getImage());
273 |   
274 |   // get projected contours
275 |   projectedContours = new ArrayList();
276 |   ArrayList contours = opencv.findContours();
277 |   for (Contour contour : contours) {
278 |     if (contour.area() > 2000) {
279 |       ArrayList cvContour = contour.getPoints();
280 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
281 |       projectedContours.add(projectedContour);
282 |     }
283 |   }
284 |   
285 |   // draw projected contours
286 |   background(0);
287 |   for (int i=0; i initializeProjectedGraphics() {
301 |   ArrayList projectedGraphics = new ArrayList();
302 |   for (int p=0; p<3; p++) {
303 |     color col = color(random(255), random(255), random(255));
304 |     PGraphics pg = createGraphics(800, 400, P2D);
305 |     pg.beginDraw();
306 |     pg.background(random(255));
307 |     pg.noStroke();
308 |     for (int i=0; i<100; i++) {
309 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
310 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
311 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
312 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
313 |     }
314 |     pg.endDraw();
315 |     projectedGraphics.add(pg);
316 |   }  
317 |   return projectedGraphics;
318 | }
319 | 
320 |
321 | 322 | 323 | 324 | 325 | 326 | 327 | 329 | 330 |
328 | Method Detail
331 | 332 |

333 | loadCalibration

334 |
335 | public void loadCalibration(String filename)
336 |
337 |
load a previous calibration 338 |

339 |

340 |
Parameters:
filepath - path to calibration file
341 |
342 |
343 |
344 | 345 |

346 | convertKinectToProjector

347 |
348 | public PVector convertKinectToProjector(PVector kinectPoint)
349 |
350 |
get 2d projector point of a 3d real world kinect point 351 |

352 |

353 |
Parameters:
kinectPoint - 3d point in Kinect real world space 354 |
Returns:
PVector
355 |
356 |
357 |
358 | 359 |

360 | getDepthMapAt

361 |
362 | public PVector getDepthMapAt(int x,
363 |                              int y)
364 |
365 |
get 3d real world kinect point from 640x480 Kinect depth map 366 |

367 |

368 |
Parameters:
x -
y - 369 |
Returns:
PVector
370 |
371 |
372 |
373 | 374 |

375 | setDepthMapRealWorld

376 |
377 | public void setDepthMapRealWorld(PVector[] theDepthMapRealWorld)
378 |
379 |
update real world depth map 380 |

381 |

382 |
Parameters:
theDepthMapRealWorld -
383 |
384 |
385 |
386 | 387 |

388 | setKinectUserImage

389 |
390 | public void setKinectUserImage(PImage theKinectUserImage)
391 |
392 |
update kinect depth image 393 |

394 |

395 |
Parameters:
theKinectUserImage -
396 |
397 |
398 |
399 | 400 |

401 | getImage

402 |
403 | public PGraphics getImage()
404 |
405 |
get kinect depth image 406 |

407 |

408 |
Parameters:
theKinectUserImage -
409 |
410 |
411 |
412 | 413 |

414 | setContourSmoothness

415 |
416 | public void setContourSmoothness(int smoothness)
417 |
418 |
sets smoothness of found contours 419 |

420 |

421 |
Parameters:
smoothness - number of contour points to average over
422 |
423 |
424 |
425 | 426 |

427 | getProjectedContour

428 |
429 | public ProjectedContour getProjectedContour(ArrayList<PVector> contourPoints,
430 |                                             float blobDilate)
431 |
432 |
takes OpenCV body contours, returns projected contours 433 |

434 |

435 |
Parameters:
contourPoints - blob contour points found by OpenCV
blobDilate - stretches bounding box of the contour (default 1.0 is no stretching) 436 |
Returns:
ProjectedContour
437 |
438 |
439 | 440 |
441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 461 | 464 | 465 | 466 | 467 | 470 | 486 | 487 | 488 | 490 | 492 | 493 |
462 | 463 |
494 | 495 | 496 | 497 |
498 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 499 | 500 | 501 | -------------------------------------------------------------------------------- /reference/KinectProjectorToolkit/ProjectedContour.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ProjectedContour (Javadocs: KinectProjectorToolkit) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 22 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 49 | 52 | 53 | 54 | 55 | 58 | 74 | 75 | 76 | 78 | 80 | 81 |
50 | 51 |
82 | 83 | 84 | 85 |
86 | 87 |

88 | 89 | KinectProjectorToolkit 90 |
91 | Class ProjectedContour

92 |
 93 | java.lang.Object
 94 |   extended by KinectProjectorToolkit.ProjectedContour
 95 | 
96 |
97 |
98 |
public class ProjectedContour
extends Object
99 | 100 | 101 |

102 |


103 | 104 |

105 | 106 | 107 | 108 | 109 | 110 | 111 | 113 | 114 | 115 | 120 | 121 |
112 | Constructor Summary
ProjectedContour(ArrayList<PVector> theContourPoints, 116 | KinectProjectorToolkit theKpc) 117 | 118 |
119 |           create projected contours from a set of OpenCV contour points and an instance of KinectProjectorToolkit
122 |   123 | 124 | 125 | 126 | 127 | 128 | 130 | 131 | 132 | 134 | 138 | 139 | 140 | 142 | 146 | 147 | 148 | 150 | 154 | 155 | 156 | 158 | 162 | 163 | 164 | 166 | 170 | 171 |
129 | Method Summary
133 |  voidcalculateProjectedContour() 135 | 136 |
137 |           calculates the projected, dilated, and smoothed contour points with no stretching
141 |  voidcalculateProjectedContour(float blobDilate) 143 | 144 |
145 |           calculates the projected, dilated, and smoothed contour points
149 |  RectanglegetBoundingBox() 151 | 152 |
153 |           get projected contour's bounding box (requires java.awt.*)
157 |  ArrayList<PVector>getProjectedContours() 159 | 160 |
161 |           get projected contour points
165 |  PVectorgetTextureCoordinate(PVector p) 167 | 168 |
169 |           get a single contour point's coordinates for texture mapping
172 |   173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 |
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
181 |   182 |

183 | 184 | 185 | 186 | 187 | 188 | 189 | 191 | 192 |
190 | Constructor Detail
193 | 194 |

195 | ProjectedContour

196 |
197 | public ProjectedContour(ArrayList<PVector> theContourPoints,
198 |                         KinectProjectorToolkit theKpc)
199 |
200 |
create projected contours from a set of OpenCV contour points and an instance of KinectProjectorToolkit 201 |

202 |

203 |
Parameters:
theContourPoints -
theKpc - 208 |
+Example
import gab.opencv.*;
209 | import SimpleOpenNI.*;
210 | import KinectProjectorToolkit.*;
211 | 
212 | SimpleOpenNI kinect;
213 | OpenCV opencv;
214 | KinectProjectorToolkit kpc;
215 | ArrayList projectedContours;
216 | ArrayList projectedGraphics;
217 | 
218 | void setup()
219 | {
220 |   size(displayWidth, displayHeight, P2D); 
221 | 
222 |   // setup Kinect
223 |   kinect = new SimpleOpenNI(this); 
224 |   kinect.enableDepth();
225 |   kinect.enableUser();
226 |   kinect.alternativeViewPointDepthToImage();
227 |   
228 |   // setup OpenCV
229 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
230 | 
231 |   // setup Kinect Projector Toolkit
232 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
233 |   kpc.loadCalibration("calibration.txt");
234 |   kpc.setContourSmoothness(4);
235 |   
236 |   projectedGraphics = initializeProjectedGraphics();
237 | }
238 | 
239 | void draw()
240 | {  
241 |   kinect.update();  
242 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
243 |   kpc.setKinectUserImage(kinect.userImage());
244 |   opencv.loadImage(kpc.getImage());
245 |   
246 |   // get projected contours
247 |   projectedContours = new ArrayList();
248 |   ArrayList contours = opencv.findContours();
249 |   for (Contour contour : contours) {
250 |     if (contour.area() > 2000) {
251 |       ArrayList cvContour = contour.getPoints();
252 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
253 |       projectedContours.add(projectedContour);
254 |     }
255 |   }
256 |   
257 |   // draw projected contours
258 |   background(0);
259 |   for (int i=0; i initializeProjectedGraphics() {
273 |   ArrayList projectedGraphics = new ArrayList();
274 |   for (int p=0; p<3; p++) {
275 |     color col = color(random(255), random(255), random(255));
276 |     PGraphics pg = createGraphics(800, 400, P2D);
277 |     pg.beginDraw();
278 |     pg.background(random(255));
279 |     pg.noStroke();
280 |     for (int i=0; i<100; i++) {
281 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
282 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
283 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
284 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
285 |     }
286 |     pg.endDraw();
287 |     projectedGraphics.add(pg);
288 |   }  
289 |   return projectedGraphics;
290 | }
291 | 
292 |
293 | 294 | 295 | 296 | 297 | 298 | 299 | 301 | 302 |
300 | Method Detail
303 | 304 |

305 | calculateProjectedContour

306 |
307 | public void calculateProjectedContour(float blobDilate)
308 |
309 |
calculates the projected, dilated, and smoothed contour points 310 |

311 |

312 |
Parameters:
blobDilate - stretching factor of contour's bounding box (1.0 = no stretching) 317 |
+Example
import gab.opencv.*;
318 | import SimpleOpenNI.*;
319 | import KinectProjectorToolkit.*;
320 | 
321 | SimpleOpenNI kinect;
322 | OpenCV opencv;
323 | KinectProjectorToolkit kpc;
324 | ArrayList projectedContours;
325 | ArrayList projectedGraphics;
326 | 
327 | void setup()
328 | {
329 |   size(displayWidth, displayHeight, P2D); 
330 | 
331 |   // setup Kinect
332 |   kinect = new SimpleOpenNI(this); 
333 |   kinect.enableDepth();
334 |   kinect.enableUser();
335 |   kinect.alternativeViewPointDepthToImage();
336 |   
337 |   // setup OpenCV
338 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
339 | 
340 |   // setup Kinect Projector Toolkit
341 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
342 |   kpc.loadCalibration("calibration.txt");
343 |   kpc.setContourSmoothness(4);
344 |   
345 |   projectedGraphics = initializeProjectedGraphics();
346 | }
347 | 
348 | void draw()
349 | {  
350 |   kinect.update();  
351 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
352 |   kpc.setKinectUserImage(kinect.userImage());
353 |   opencv.loadImage(kpc.getImage());
354 |   
355 |   // get projected contours
356 |   projectedContours = new ArrayList();
357 |   ArrayList contours = opencv.findContours();
358 |   for (Contour contour : contours) {
359 |     if (contour.area() > 2000) {
360 |       ArrayList cvContour = contour.getPoints();
361 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
362 |       projectedContours.add(projectedContour);
363 |     }
364 |   }
365 |   
366 |   // draw projected contours
367 |   background(0);
368 |   for (int i=0; i initializeProjectedGraphics() {
382 |   ArrayList projectedGraphics = new ArrayList();
383 |   for (int p=0; p<3; p++) {
384 |     color col = color(random(255), random(255), random(255));
385 |     PGraphics pg = createGraphics(800, 400, P2D);
386 |     pg.beginDraw();
387 |     pg.background(random(255));
388 |     pg.noStroke();
389 |     for (int i=0; i<100; i++) {
390 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
391 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
392 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
393 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
394 |     }
395 |     pg.endDraw();
396 |     projectedGraphics.add(pg);
397 |   }  
398 |   return projectedGraphics;
399 | }
400 | 
401 |
402 |
403 |
404 | 405 |

406 | calculateProjectedContour

407 |
408 | public void calculateProjectedContour()
409 |
410 |
calculates the projected, dilated, and smoothed contour points with no stretching 411 |

412 |

413 | 418 |
+Example
import gab.opencv.*;
419 | import SimpleOpenNI.*;
420 | import KinectProjectorToolkit.*;
421 | 
422 | SimpleOpenNI kinect;
423 | OpenCV opencv;
424 | KinectProjectorToolkit kpc;
425 | ArrayList projectedContours;
426 | ArrayList projectedGraphics;
427 | 
428 | void setup()
429 | {
430 |   size(displayWidth, displayHeight, P2D); 
431 | 
432 |   // setup Kinect
433 |   kinect = new SimpleOpenNI(this); 
434 |   kinect.enableDepth();
435 |   kinect.enableUser();
436 |   kinect.alternativeViewPointDepthToImage();
437 |   
438 |   // setup OpenCV
439 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
440 | 
441 |   // setup Kinect Projector Toolkit
442 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
443 |   kpc.loadCalibration("calibration.txt");
444 |   kpc.setContourSmoothness(4);
445 |   
446 |   projectedGraphics = initializeProjectedGraphics();
447 | }
448 | 
449 | void draw()
450 | {  
451 |   kinect.update();  
452 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
453 |   kpc.setKinectUserImage(kinect.userImage());
454 |   opencv.loadImage(kpc.getImage());
455 |   
456 |   // get projected contours
457 |   projectedContours = new ArrayList();
458 |   ArrayList contours = opencv.findContours();
459 |   for (Contour contour : contours) {
460 |     if (contour.area() > 2000) {
461 |       ArrayList cvContour = contour.getPoints();
462 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
463 |       projectedContours.add(projectedContour);
464 |     }
465 |   }
466 |   
467 |   // draw projected contours
468 |   background(0);
469 |   for (int i=0; i initializeProjectedGraphics() {
483 |   ArrayList projectedGraphics = new ArrayList();
484 |   for (int p=0; p<3; p++) {
485 |     color col = color(random(255), random(255), random(255));
486 |     PGraphics pg = createGraphics(800, 400, P2D);
487 |     pg.beginDraw();
488 |     pg.background(random(255));
489 |     pg.noStroke();
490 |     for (int i=0; i<100; i++) {
491 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
492 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
493 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
494 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
495 |     }
496 |     pg.endDraw();
497 |     projectedGraphics.add(pg);
498 |   }  
499 |   return projectedGraphics;
500 | }
501 | 
502 |
503 |
504 |
505 | 506 |

507 | getProjectedContours

508 |
509 | public ArrayList<PVector> getProjectedContours()
510 |
511 |
get projected contour points 512 |

513 |

514 | 515 |
Returns:
blobPoints 520 |
+Example
import gab.opencv.*;
521 | import SimpleOpenNI.*;
522 | import KinectProjectorToolkit.*;
523 | 
524 | SimpleOpenNI kinect;
525 | OpenCV opencv;
526 | KinectProjectorToolkit kpc;
527 | ArrayList projectedContours;
528 | ArrayList projectedGraphics;
529 | 
530 | void setup()
531 | {
532 |   size(displayWidth, displayHeight, P2D); 
533 | 
534 |   // setup Kinect
535 |   kinect = new SimpleOpenNI(this); 
536 |   kinect.enableDepth();
537 |   kinect.enableUser();
538 |   kinect.alternativeViewPointDepthToImage();
539 |   
540 |   // setup OpenCV
541 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
542 | 
543 |   // setup Kinect Projector Toolkit
544 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
545 |   kpc.loadCalibration("calibration.txt");
546 |   kpc.setContourSmoothness(4);
547 |   
548 |   projectedGraphics = initializeProjectedGraphics();
549 | }
550 | 
551 | void draw()
552 | {  
553 |   kinect.update();  
554 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
555 |   kpc.setKinectUserImage(kinect.userImage());
556 |   opencv.loadImage(kpc.getImage());
557 |   
558 |   // get projected contours
559 |   projectedContours = new ArrayList();
560 |   ArrayList contours = opencv.findContours();
561 |   for (Contour contour : contours) {
562 |     if (contour.area() > 2000) {
563 |       ArrayList cvContour = contour.getPoints();
564 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
565 |       projectedContours.add(projectedContour);
566 |     }
567 |   }
568 |   
569 |   // draw projected contours
570 |   background(0);
571 |   for (int i=0; i initializeProjectedGraphics() {
585 |   ArrayList projectedGraphics = new ArrayList();
586 |   for (int p=0; p<3; p++) {
587 |     color col = color(random(255), random(255), random(255));
588 |     PGraphics pg = createGraphics(800, 400, P2D);
589 |     pg.beginDraw();
590 |     pg.background(random(255));
591 |     pg.noStroke();
592 |     for (int i=0; i<100; i++) {
593 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
594 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
595 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
596 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
597 |     }
598 |     pg.endDraw();
599 |     projectedGraphics.add(pg);
600 |   }  
601 |   return projectedGraphics;
602 | }
603 | 
604 |
605 |
606 |
607 | 608 |

609 | getBoundingBox

610 |
611 | public Rectangle getBoundingBox()
612 |
613 |
get projected contour's bounding box (requires java.awt.*) 614 |

615 |

616 | 617 |
Returns:
boundingBox 622 |
+Example
import gab.opencv.*;
623 | import SimpleOpenNI.*;
624 | import KinectProjectorToolkit.*;
625 | 
626 | SimpleOpenNI kinect;
627 | OpenCV opencv;
628 | KinectProjectorToolkit kpc;
629 | ArrayList projectedContours;
630 | ArrayList projectedGraphics;
631 | 
632 | void setup()
633 | {
634 |   size(displayWidth, displayHeight, P2D); 
635 | 
636 |   // setup Kinect
637 |   kinect = new SimpleOpenNI(this); 
638 |   kinect.enableDepth();
639 |   kinect.enableUser();
640 |   kinect.alternativeViewPointDepthToImage();
641 |   
642 |   // setup OpenCV
643 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
644 | 
645 |   // setup Kinect Projector Toolkit
646 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
647 |   kpc.loadCalibration("calibration.txt");
648 |   kpc.setContourSmoothness(4);
649 |   
650 |   projectedGraphics = initializeProjectedGraphics();
651 | }
652 | 
653 | void draw()
654 | {  
655 |   kinect.update();  
656 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
657 |   kpc.setKinectUserImage(kinect.userImage());
658 |   opencv.loadImage(kpc.getImage());
659 |   
660 |   // get projected contours
661 |   projectedContours = new ArrayList();
662 |   ArrayList contours = opencv.findContours();
663 |   for (Contour contour : contours) {
664 |     if (contour.area() > 2000) {
665 |       ArrayList cvContour = contour.getPoints();
666 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
667 |       projectedContours.add(projectedContour);
668 |     }
669 |   }
670 |   
671 |   // draw projected contours
672 |   background(0);
673 |   for (int i=0; i initializeProjectedGraphics() {
687 |   ArrayList projectedGraphics = new ArrayList();
688 |   for (int p=0; p<3; p++) {
689 |     color col = color(random(255), random(255), random(255));
690 |     PGraphics pg = createGraphics(800, 400, P2D);
691 |     pg.beginDraw();
692 |     pg.background(random(255));
693 |     pg.noStroke();
694 |     for (int i=0; i<100; i++) {
695 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
696 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
697 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
698 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
699 |     }
700 |     pg.endDraw();
701 |     projectedGraphics.add(pg);
702 |   }  
703 |   return projectedGraphics;
704 | }
705 | 
706 |
707 |
708 |
709 | 710 |

711 | getTextureCoordinate

712 |
713 | public PVector getTextureCoordinate(PVector p)
714 |
715 |
get a single contour point's coordinates for texture mapping 716 |

717 |

718 | 719 |
Returns:
PVector 724 |
+Example
import gab.opencv.*;
725 | import SimpleOpenNI.*;
726 | import KinectProjectorToolkit.*;
727 | 
728 | SimpleOpenNI kinect;
729 | OpenCV opencv;
730 | KinectProjectorToolkit kpc;
731 | ArrayList projectedContours;
732 | ArrayList projectedGraphics;
733 | 
734 | void setup()
735 | {
736 |   size(displayWidth, displayHeight, P2D); 
737 | 
738 |   // setup Kinect
739 |   kinect = new SimpleOpenNI(this); 
740 |   kinect.enableDepth();
741 |   kinect.enableUser();
742 |   kinect.alternativeViewPointDepthToImage();
743 |   
744 |   // setup OpenCV
745 |   opencv = new OpenCV(this, kinect.depthWidth(), kinect.depthHeight());
746 | 
747 |   // setup Kinect Projector Toolkit
748 |   kpc = new KinectProjectorToolkit(this, kinect.depthWidth(), kinect.depthHeight());
749 |   kpc.loadCalibration("calibration.txt");
750 |   kpc.setContourSmoothness(4);
751 |   
752 |   projectedGraphics = initializeProjectedGraphics();
753 | }
754 | 
755 | void draw()
756 | {  
757 |   kinect.update();  
758 |   kpc.setDepthMapRealWorld(kinect.depthMapRealWorld()); 
759 |   kpc.setKinectUserImage(kinect.userImage());
760 |   opencv.loadImage(kpc.getImage());
761 |   
762 |   // get projected contours
763 |   projectedContours = new ArrayList();
764 |   ArrayList contours = opencv.findContours();
765 |   for (Contour contour : contours) {
766 |     if (contour.area() > 2000) {
767 |       ArrayList cvContour = contour.getPoints();
768 |       ProjectedContour projectedContour = kpc.getProjectedContour(cvContour, 1.0);
769 |       projectedContours.add(projectedContour);
770 |     }
771 |   }
772 |   
773 |   // draw projected contours
774 |   background(0);
775 |   for (int i=0; i initializeProjectedGraphics() {
789 |   ArrayList projectedGraphics = new ArrayList();
790 |   for (int p=0; p<3; p++) {
791 |     color col = color(random(255), random(255), random(255));
792 |     PGraphics pg = createGraphics(800, 400, P2D);
793 |     pg.beginDraw();
794 |     pg.background(random(255));
795 |     pg.noStroke();
796 |     for (int i=0; i<100; i++) {
797 |       pg.fill(red(col)+(int)random(-30,30), green(col)+(int)random(-30,30), blue(col)+(int)random(-30,30)); 
798 |       if      (p==0)  pg.ellipse(random(pg.width), random(pg.height), random(200), random(200));
799 |       else if (p==1)  pg.rect(random(pg.width), random(pg.height), random(200), random(200));
800 |       else if (p==2)  pg.triangle(random(pg.width), random(pg.height), random(pg.width), random(pg.height), random(pg.width), random(pg.height));
801 |     }
802 |     pg.endDraw();
803 |     projectedGraphics.add(pg);
804 |   }  
805 |   return projectedGraphics;
806 | }
807 | 
808 |
809 |
810 | 811 |
812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 832 | 835 | 836 | 837 | 838 | 841 | 857 | 858 | 859 | 861 | 863 | 864 |
833 | 834 |
865 | 866 | 867 | 868 |
869 | Processing library KinectProjectorToolkit by Gene Kogan. (c) 2013 870 | 871 | 872 | --------------------------------------------------------------------------------