Rank: 1155 based on 67 downloads (last 30 days) and 2 files submitted
photo

Nathan Orloff

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Nathan View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
31 May 2013 Create a colored, tilted 2D error ellipse scatter plot. Create a colored, tilted 2D error ellipse scatter plot. Author: Nathan Orloff ellipse, error, errorplot, 2d, uncertainty 25 0
30 May 2013 Fit 2D Gaussian with Optimization Toolbox Fit a 2D rotated gaussian. http://en.wikipedia.org/wiki/Gaussian_function Author: Nathan Orloff image processing, optimization, signal processing, matrix, gaussian, surface 42 1
Comments and Ratings by Nathan View all
Updated File Comments Rating
12 Jun 2013 ImadjustGUI Launches an interactive GUI for modifying the parameters of IMADJUST. Author: Brett Shoelson

I really like this. I wish you made it do imadjust on all 3 channels separately. That way you could tweak the color of an image pretty easily. Let me know if you can add this.

28 May 2013 Fit 2D Gaussian with Optimization Toolbox Fit a 2D rotated gaussian. http://en.wikipedia.org/wiki/Gaussian_function Author: Nathan Orloff

I edited this a little. The fit is better with z bounds. I will post it soon... If you have already downloaded this just add the following.

%% Set up the startpoint
[amp, ind] = max(zData); % amp is the amplitude.
xo = xData(ind); % guess that it is at the maximum
yo = yData(ind); % guess that it is at the maximum
ang = 45; % angle in degrees.
sy = 1;
sx = 1;
zo = median(zData(:))-std(zData(:));
xmax = max(xData)+2;
ymax = max(yData)+2;
zmax = amp*2; % amp is the amplitude.
xmin = min(xData)-2;
ymin = min(yData)-2;
zmin = min(zData)/2; % amp is the amplitude.

%% Set up fittype and options.
Lower = [0, eps, 0, 0, xmin, ymin, zmin];
Upper = [Inf, 180, Inf, Inf, xmax, ymax, zmax]; % angles greater than 90 are redundant
StartPoint = [amp, ang, sx, sy, xo, yo, zo];%[amp, sx, sxy, sy, xo, yo, zo];

20 May 2013 label2rgb3D Creates a 4D rgb image from a 3D label image. Author: payel ghosh

function rgbcell = label2rgb3d(lblstack)
%label2rgb3d(lblstack) take a labeled stack and turn it into a truecolor image.
% get all of the unique ind
ind = unique(lblstack);
cmap = jet(numel(ind));
images = stack2cell(lblstack);
rgbcell = cellfun(@(x) im2double(label2rgb(x, cmap, 'k')), images, 'UniformOutput', false);

function images = stack2cell(stack)
%stack2cell(stack) convert a stack of data into a cell array
% Detailed explanation goes here
% See also cell2stack
images = num2cell(zeros(size(stack,3),1));
if numel(size(stack)) == 3 % bw and grayscale images
for ii = 1:size(stack,3)
images{ii} = stack(:,:,ii);
end
elseif numel(size(stack)) == 4 % truecolor data
for ii = 1:size(stack,4)
images{ii} = stack(:,:,:,ii);
end
end
end

function stack = cell2stack(images)
%cell2stack converts a cell array of images to a stack (or cube of images)
% converts a cell array of images to a stack (or cube of images)
p = numel(images);
dims = size(images{1});
stack = zeros([dims,p]);
if numel(dims) == 2 % bw and grayscale images
for ii = 1:p
stack(:,:,ii) = images{ii};
end
elseif numel(dims) == 3 % truecolor data
for ii = 1:p
stack(:,:,:,ii) = images{ii};
end
end

end

This should be all you need to do this. While manipulating multidimensional data I found cell2stack and stack2cell incredibly useful. Also, cellfun is a very fast way to implement many of the image processing routines. HTH- Nate

20 May 2013 label2rgb3D Creates a 4D rgb image from a 3D label image. Author: payel ghosh

I think this might be better. Also, I tried your code and I got a incorrect results, but I didn't really try very hard to make it work.

ind = unique(lblstack);
cmap = jet(numel(ind));
images = cell2stack(lblstack);
rgbcell = cellfun(@(x) label2rgb(x, cmap, 'k'), images, 'UniformOutput', false);

13 Mar 2013 Upload a Video to YouTube™ Using the Youtube™ data API, upload a video directly from MATLAB®. Author: Matthew Simoneau

I get emailed about this a lot. This code is not so useful. You should install the google command line utility and then do it that way.

Yeah. It can be done. You need to install the google command line utility and all the associated api's. Then you have to enable your youtube account as a developer. Then you can do it.

This guys code is basically useless. I had to do it all myself. The easiest way to do it is through the command line. That way you dont have to modify all the .jar files on the path. Also, it is much faster and matlab is really prone to memory leaks.

Once you get all that stuff setup, which is by no means straightforward. Something like the following should work.

function req_url = im_uploadmovie(game_id,moviedir,game_str)
% im_uploadmovie
% im_uploadmovie automatically uploads a game movie to youtube.

% See also im_makemovie

% HISTORY:
% Version 1.0, 2011-10-21..
movie_file = [moviedir '\movie_game_id_' num2str(game_id) '.mp4'];
commandline_str = ['google youtube post ' ...
'--category Games '....
'--summary "' strrep(game_str,sprintf('\n'),' ') '"'...
' "' movie_file '"'];
[~, results_str] = system(commandline_str);
ind = strfind(results_str,'Video uploaded:');
raw_url = results_str(ind:end);

Comments and Ratings on Nathan's Files
Updated File Comment by Comments Rating
28 May 2013 Fit 2D Gaussian with Optimization Toolbox Fit a 2D rotated gaussian. http://en.wikipedia.org/wiki/Gaussian_function Author: Nathan Orloff Orloff, Nathan

I edited this a little. The fit is better with z bounds. I will post it soon... If you have already downloaded this just add the following.

%% Set up the startpoint
[amp, ind] = max(zData); % amp is the amplitude.
xo = xData(ind); % guess that it is at the maximum
yo = yData(ind); % guess that it is at the maximum
ang = 45; % angle in degrees.
sy = 1;
sx = 1;
zo = median(zData(:))-std(zData(:));
xmax = max(xData)+2;
ymax = max(yData)+2;
zmax = amp*2; % amp is the amplitude.
xmin = min(xData)-2;
ymin = min(yData)-2;
zmin = min(zData)/2; % amp is the amplitude.

%% Set up fittype and options.
Lower = [0, eps, 0, 0, xmin, ymin, zmin];
Upper = [Inf, 180, Inf, Inf, xmax, ymax, zmax]; % angles greater than 90 are redundant
StartPoint = [amp, ang, sx, sy, xo, yo, zo];%[amp, sx, sxy, sy, xo, yo, zo];

Top Tags Applied by Nathan
2d, ellipse, error, errorplot, gaussian
Files Tagged by Nathan View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
31 May 2013 Create a colored, tilted 2D error ellipse scatter plot. Create a colored, tilted 2D error ellipse scatter plot. Author: Nathan Orloff ellipse, error, errorplot, 2d, uncertainty 25 0
30 May 2013 Fit 2D Gaussian with Optimization Toolbox Fit a 2D rotated gaussian. http://en.wikipedia.org/wiki/Gaussian_function Author: Nathan Orloff image processing, optimization, signal processing, matrix, gaussian, surface 42 1

Contact us