-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uploading Kinect pointcloud fusion package
- Loading branch information
1 parent
6796be7
commit 1245cba
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function [outputArg1] = makePointCloud(inputArg1, inputArg2) | ||
% Turns Depth Image into Pointcloud | ||
% inputArg1 is Depth Image, inputArg2 is Color Image | ||
[s1, s2] = size(inputArg1); | ||
% Preallocate 3D Matrix to put x,y and Depth Data | ||
Punkte = zeros(s2, s1, 3); | ||
for i = 1:s1 | ||
for j = 1:s2 | ||
Punkte(j,i,1) = j; | ||
Punkte(j,i,2) = i; | ||
Punkte(j,i,3) = inputArg1(i,j)*255; | ||
end | ||
end | ||
% Transpose Image to fit Pointcloud data dimensions | ||
rgbtranspose = pagetranspose(inputArg2); | ||
outputArg1 = pointCloud(Punkte, 'Color',rgbtranspose); | ||
end |