Commit db7ff032 authored by Eric Wait's avatar Eric Wait

Name changed to Hydra Image Processor (HIP)

parent 45167174
#Hydra Signal Processor
#Hydra Image Processor
##BSD 3-Clause License
......@@ -15,7 +15,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Hydra Signal Processor nor the names of its
* Neither the name of Hydra Image Processor nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
......
<img src=logo.png width="300px" height="250px"/>
Hydra Signal Processor (HSP)
Hydra Image Processor (HIP)
===
Hydra Signal Processor is a hardware accelerated signal processing library written with [CUDA](https://developer.nvidia.com/cuda-zone). HSP aims to create a signal processing library that can be incorporated into many software tools. This library is licensed under BSD 3-Clause to encourage use in open-source and commercial software. My only plea is that if you find bugs or make changes that you contribute them back to this repository. Happy processing and enjoy!
Hydra Image Processor is a hardware accelerated signal processing library written with [CUDA](https://developer.nvidia.com/cuda-zone). HIP aims to create a signal processing library that can be incorporated into many software tools. This library is licensed under BSD 3-Clause to encourage use in open-source and commercial software. My only plea is that if you find bugs or make changes that you contribute them back to this repository. Happy processing and enjoy!
##Dependencies
......
......@@ -3,6 +3,6 @@ function arrayOut = HighPassFilter(arrayIn,sigmas,device,suppressWarning)
warning('Falling back to matlab.');
end
arrayOut = HSP.Local.Gaussian(arrayIn,sigmas,[],[],true);
arrayOut = HIP.Local.Gaussian(arrayIn,sigmas,[],[],true);
arrayOut = arrayOut - arrayIn;
end
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HSP.Cuda.Closure(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.Closure(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = Closure(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('Closure',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('Closure',arrayIn,kernel,numIterations,device);
end
% DeviceCount - This will return the number of Cuda devices available, and their memory.
% [numCudaDevices,memoryStats] = HSP.Cuda.DeviceCount()
% [numCudaDevices,memoryStats] = HIP.Cuda.DeviceCount()
% NumCudaDevices -- this is the number of Cuda devices available.
% MemoryStats -- this is an array of structures where each entry corresponds to a Cuda device.
% The memory structure contains the total memory on the device and the memory available for a Cuda call.
function [numCudaDevices,memoryStats] = DeviceCount()
[numCudaDevices,memoryStats] = HSP.Cuda.Mex('DeviceCount');
[numCudaDevices,memoryStats] = HIP.Cuda.Mex('DeviceCount');
end
% DeviceStats - This will return the statistics of each Cuda capable device installed.
% deviceStatsArray = HSP.Cuda.DeviceStats()
% deviceStatsArray = HIP.Cuda.DeviceStats()
% DeviceStatsArray -- this is an array of structs, one struct per device.
% The struct has these fields: name, major, minor, constMem, sharedMem, totalMem, tccDriver, mpCount, threadsPerMP, warpSize, maxThreads.
function deviceStatsArray = DeviceStats()
[deviceStatsArray] = HSP.Cuda.Mex('DeviceStats');
[deviceStatsArray] = HIP.Cuda.Mex('DeviceStats');
end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HSP.Cuda.ElementWiseDifference(array1In,array2In,[device])
% arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,[device])
% image1In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -14,5 +14,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = ElementWiseDifference(array1In,array2In,device)
[arrayOut] = HSP.Cuda.Mex('ElementWiseDifference',array1In,array2In,device);
[arrayOut] = HIP.Cuda.Mex('ElementWiseDifference',array1In,array2In,device);
end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HSP.Cuda.EntropyFilter(arrayIn,kernel,[device])
% arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -14,5 +14,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = EntropyFilter(arrayIn,kernel,device)
[arrayOut] = HSP.Cuda.Mex('EntropyFilter',arrayIn,kernel,device);
[arrayOut] = HIP.Cuda.Mex('EntropyFilter',arrayIn,kernel,device);
end
% Gaussian - Gaussian smoothing.
% arrayOut = HSP.Cuda.Gaussian(arrayIn,sigmas,[numIterations],[device])
% arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -17,5 +17,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = Gaussian(arrayIn,sigmas,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('Gaussian',arrayIn,sigmas,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('Gaussian',arrayIn,sigmas,numIterations,device);
end
% GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HSP.Cuda.GetMinMax(arrayIn,[device])
% [minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
......@@ -9,5 +9,5 @@
% minValue = This is the lowest value found in the array.
% maxValue = This is the highest value found in the array.
function [minValue,maxValue] = GetMinMax(arrayIn,device)
[minValue,maxValue] = HSP.Cuda.Mex('GetMinMax',arrayIn,device);
[minValue,maxValue] = HIP.Cuda.Mex('GetMinMax',arrayIn,device);
end
% Help - Help on a specified command.
% HSP.Cuda.Help(command)
% HIP.Cuda.Help(command)
% Print detailed usage information for the specified command.
function Help(command)
HSP.Cuda.Mex('Help',command);
HIP.Cuda.Mex('Help',command);
end
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HSP.Cuda.HighPassFilter(arrayIn,sigmas,[device])
% arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -13,5 +13,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = HighPassFilter(arrayIn,sigmas,device)
[arrayOut] = HSP.Cuda.Mex('HighPassFilter',arrayIn,sigmas,device);
[arrayOut] = HIP.Cuda.Mex('HighPassFilter',arrayIn,sigmas,device);
end
% Info - Get information on all available mex commands.
% commandInfo = HSP.Cuda.Info()
% commandInfo = HIP.Cuda.Info()
% Returns commandInfo structure array containing information on all mex commands.
% commandInfo.command - Command string
% commandInfo.outArgs - Cell array of output arguments
% commandInfo.inArgs - Cell array of input arguments
% commandInfo.helpLines - Cell array of input arguments
function commandInfo = Info()
[commandInfo] = HSP.Cuda.Mex('Info');
[commandInfo] = HIP.Cuda.Mex('Info');
end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HSP.Cuda.LoG(arrayIn,sigmas,[device])
% arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -13,5 +13,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = LoG(arrayIn,sigmas,device)
[arrayOut] = HSP.Cuda.Mex('LoG',arrayIn,sigmas,device);
[arrayOut] = HIP.Cuda.Mex('LoG',arrayIn,sigmas,device);
end
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HSP.Cuda.MaxFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = MaxFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('MaxFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('MaxFilter',arrayIn,kernel,numIterations,device);
end
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HSP.Cuda.MeanFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = MeanFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('MeanFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('MeanFilter',arrayIn,kernel,numIterations,device);
end
% MedianFilter - This will calculate the median for each neighborhood defined by the kernel.
% arrayOut = HSP.Cuda.MedianFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.MedianFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = MedianFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('MedianFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('MedianFilter',arrayIn,kernel,numIterations,device);
end
% MinFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HSP.Cuda.MinFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.MinFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = MinFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('MinFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('MinFilter',arrayIn,kernel,numIterations,device);
end
% MinMax - This returns the global min and max values.
% [minOut,maxOut] = HSP.Cuda.MinMax(arrayIn,[device])
% [minOut,maxOut] = HIP.Cuda.MinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -11,5 +11,5 @@
% minOut = This is the minimum value found in the input.
% maxOut = This is the maximum value found in the input.
function [minOut,maxOut] = MinMax(arrayIn,device)
[minOut,maxOut] = HSP.Cuda.Mex('MinMax',arrayIn,device);
[minOut,maxOut] = HIP.Cuda.Mex('MinMax',arrayIn,device);
end
% MultiplySum - Multiplies the kernel with the neighboring values and sums these new values.
% arrayOut = HSP.Cuda.MultiplySum(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.MultiplySum(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = MultiplySum(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('MultiplySum',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('MultiplySum',arrayIn,kernel,numIterations,device);
end
% Opener - This kernel will erode follow by a dilation.
% arrayOut = HSP.Cuda.Opener(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.Opener(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = Opener(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('Opener',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('Opener',arrayIn,kernel,numIterations,device);
end
% StdFilter - This will take the standard deviation of the given neighborhood.
% arrayOut = HSP.Cuda.StdFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.StdFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = StdFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('StdFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('StdFilter',arrayIn,kernel,numIterations,device);
end
% Sum - This sums up the entire array in.
% valueOut = HSP.Cuda.Sum(arrayIn,[device])
% valueOut = HIP.Cuda.Sum(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -10,5 +10,5 @@
%
% valueOut = This is the summation of the entire array.
function valueOut = Sum(arrayIn,device)
[valueOut] = HSP.Cuda.Mex('Sum',arrayIn,device);
[valueOut] = HIP.Cuda.Mex('Sum',arrayIn,device);
end
% VarFilter - This will take the variance deviation of the given neighborhood.
% arrayOut = HSP.Cuda.VarFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Cuda.VarFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = VarFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('VarFilter',arrayIn,kernel,numIterations,device);
[arrayOut] = HIP.Cuda.Mex('VarFilter',arrayIn,kernel,numIterations,device);
end
% WienerFilter - A Wiener filter aims to denoise an image in a linear fashion.
% arrayOut = HSP.Cuda.WienerFilter(arrayIn,[kernel],[noiseVariance],[device])
% arrayOut = HIP.Cuda.WienerFilter(arrayIn,[kernel],[noiseVariance],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -18,5 +18,5 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = WienerFilter(arrayIn,kernel,noiseVariance,device)
[arrayOut] = HSP.Cuda.Mex('WienerFilter',arrayIn,kernel,noiseVariance,device);
[arrayOut] = HIP.Cuda.Mex('WienerFilter',arrayIn,kernel,noiseVariance,device);
end
......@@ -12,11 +12,11 @@ excludeList = ...
curPath = pwd();
% find where the image processing package is
cudaPath = fileparts(which('HSP.BuildMexObject'));
cudaPath = fileparts(which('HIP.BuildMexObject'));
cd(cudaPath)
% create the m files that correspond to the commands in the mex interface
HSP.BuildMexObject('..\..\c\Mex.mexw64','Cuda','HSP');
HIP.BuildMexObject('..\..\c\Mex.mexw64','Cuda','HIP');
packagePath = cudaPath;
cudaPath = fullfile(cudaPath,'@Cuda');
......@@ -77,9 +77,9 @@ for i=1:length(dList)
funcCallFilled = funcCall;
fprintf(f,'\nfunction %s = %s(%s)\n',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' try\n');
fprintf(f,' %s = HSP.Cuda.%s(%s);\n',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' %s = HIP.Cuda.%s(%s);\n',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' catch errMsg\n');
localFuctionCall = sprintf('%s = HSP.Local.%s(%s)',funcCall.out,funcCall.name,funcCall.param);
localFuctionCall = sprintf('%s = HIP.Local.%s(%s)',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' warning(errMsg.message);\n');
fprintf(f,' %s;\n', localFuctionCall);
fprintf(f,' end\n');
......@@ -136,6 +136,6 @@ for i=1:length(dList)
end
end
fprintf('HSP BuildScript wrote %d functions\n',numFunctions);
fprintf('HIP BuildScript wrote %d functions\n',numFunctions);
% go back to the original directory
cd(curPath)
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HSP.Closure(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.Closure(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -20,9 +20,9 @@
function arrayOut = Closure(arrayIn,kernel,numIterations,device)
try
arrayOut = HSP.Cuda.Closure(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Cuda.Closure(arrayIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.Closure(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Local.Closure(arrayIn,kernel,numIterations,device);
end
end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HSP.ElementWiseDifference(array1In,array2In,[device])
% arrayOut = HIP.ElementWiseDifference(array1In,array2In,[device])
% image1In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -16,9 +16,9 @@
function arrayOut = ElementWiseDifference(array1In,array2In,device)
try
arrayOut = HSP.Cuda.ElementWiseDifference(array1In,array2In,device);
arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.ElementWiseDifference(array1In,array2In,device);
arrayOut = HIP.Local.ElementWiseDifference(array1In,array2In,device);
end
end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HSP.EntropyFilter(arrayIn,kernel,[device])
% arrayOut = HIP.EntropyFilter(arrayIn,kernel,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -16,9 +16,9 @@
function arrayOut = EntropyFilter(arrayIn,kernel,device)
try
arrayOut = HSP.Cuda.EntropyFilter(arrayIn,kernel,device);
arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.EntropyFilter(arrayIn,kernel,device);
arrayOut = HIP.Local.EntropyFilter(arrayIn,kernel,device);
end
end
% Gaussian - Gaussian smoothing.
% arrayOut = HSP.Gaussian(arrayIn,sigmas,[numIterations],[device])
% arrayOut = HIP.Gaussian(arrayIn,sigmas,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -19,9 +19,9 @@
function arrayOut = Gaussian(arrayIn,sigmas,numIterations,device)
try
arrayOut = HSP.Cuda.Gaussian(arrayIn,sigmas,numIterations,device);
arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.Gaussian(arrayIn,sigmas,numIterations,device);
arrayOut = HIP.Local.Gaussian(arrayIn,sigmas,numIterations,device);
end
end
% GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HSP.GetMinMax(arrayIn,[device])
% [minValue,maxValue] = HIP.GetMinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
......@@ -11,9 +11,9 @@
function [minValue,maxValue] = GetMinMax(arrayIn,device)
try
[minValue,maxValue] = HSP.Cuda.GetMinMax(arrayIn,device);
[minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,device);
catch errMsg
warning(errMsg.message);
[minValue,maxValue] = HSP.Local.GetMinMax(arrayIn,device);
[minValue,maxValue] = HIP.Local.GetMinMax(arrayIn,device);
end
end
% Help - Help on a specified command.
% HSP.Help(command)
% HIP.Help(command)
% Print detailed usage information for the specified command.
function Help(command)
end
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HSP.HighPassFilter(arrayIn,sigmas,[device])
% arrayOut = HIP.HighPassFilter(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -15,9 +15,9 @@
function arrayOut = HighPassFilter(arrayIn,sigmas,device)
try
arrayOut = HSP.Cuda.HighPassFilter(arrayIn,sigmas,device);
arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.HighPassFilter(arrayIn,sigmas,device);
arrayOut = HIP.Local.HighPassFilter(arrayIn,sigmas,device);
end
end
% Info - Get information on all available mex commands.
% commandInfo = HSP.Info()
% commandInfo = HIP.Info()
% Returns commandInfo structure array containing information on all mex commands.
% commandInfo.command - Command string
% commandInfo.outArgs - Cell array of output arguments
......@@ -8,9 +8,9 @@
function commandInfo = Info()
try
commandInfo = HSP.Cuda.Info();
commandInfo = HIP.Cuda.Info();
catch errMsg
warning(errMsg.message);
commandInfo = HSP.Local.Info();
commandInfo = HIP.Local.Info();
end
end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HSP.LoG(arrayIn,sigmas,[device])
% arrayOut = HIP.LoG(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -15,9 +15,9 @@
function arrayOut = LoG(arrayIn,sigmas,device)
try
arrayOut = HSP.Cuda.LoG(arrayIn,sigmas,device);
arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.LoG(arrayIn,sigmas,device);
arrayOut = HIP.Local.LoG(arrayIn,sigmas,device);
end
end
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HSP.MaxFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.MaxFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -20,9 +20,9 @@
function arrayOut = MaxFilter(arrayIn,kernel,numIterations,device)
try
arrayOut = HSP.Cuda.MaxFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.MaxFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Local.MaxFilter(arrayIn,kernel,numIterations,device);
end
end
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HSP.MeanFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.MeanFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -20,9 +20,9 @@
function arrayOut = MeanFilter(arrayIn,kernel,numIterations,device)
try
arrayOut = HSP.Cuda.MeanFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.MeanFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Local.MeanFilter(arrayIn,kernel,numIterations,device);
end
end
% MedianFilter - This will calculate the median for each neighborhood defined by the kernel.
% arrayOut = HSP.MedianFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.MedianFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -20,9 +20,9 @@
function arrayOut = MedianFilter(arrayIn,kernel,numIterations,device)
try
arrayOut = HSP.Cuda.MedianFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Cuda.MedianFilter(arrayIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.MedianFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Local.MedianFilter(arrayIn,kernel,numIterations,device);
end
end
% MinFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HSP.MinFilter(arrayIn,kernel,[numIterations],[device])
% arrayOut = HIP.MinFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -20,9 +20,9 @@
function arrayOut = MinFilter(arrayIn,kernel,numIterations,device)
try
arrayOut = HSP.Cuda.MinFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Cuda.MinFilter(arrayIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HSP.Local.MinFilter(arrayIn,kernel,numIterations,device);
arrayOut = HIP.Local.MinFilter(arrayIn,kernel,numIterations,device);
end
end
% MinMax - This returns the global min and max values.
% [minOut,maxOut] = HSP.MinMax(arrayIn,[device])
% [minOut,maxOut] = HIP.MinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
......@@ -13,9 +13,9 @@
function [minOut,maxOut] = MinMax(arrayIn,device)