CUDA Segmentation class. More...
#include <cudasegment.h>
Public Member Functions | |
void | CopyProbsToDevice (Image< float > **probs_h) |
Copy probabilities to GPU. | |
CudaSegment (int width, int height) | |
Constructor. | |
void | Execute (FgBgSegment &segment, Image< uchar > &cimg, Image< float > &dimg, int numFigures, bool download=true) |
Execute Segmentation. | |
~CudaSegment () | |
Static Public Attributes | |
static const int | max_figures = 8 |
Maximum number of foreground objects. | |
Private Member Functions | |
float | ComputeBeta (uchar *image_d) |
Compute the surface parameter beta. | |
void | CreateHistograms (FgBgSegment &segment) |
Create all histograms. | |
void | SetGradientCosts (uchar *image_d, float beta, float gamma) |
Set gradient costs. | |
Private Attributes | |
uchar * | allocated_d |
Memory allocation block pointer. | |
float * | beliefs_d [max_figures+2] |
Posterior label beliefs. | |
uint * | bins_d |
Colour histogram bin indices. | |
uchar * | cimd_d |
Colour image. | |
float * | costh_d |
Horizontal Gradient costs. | |
float * | costv_d |
Vertical Gradient costs. | |
float * | dimd_d |
Disparity map. | |
int | height |
Image height. | |
float * | priors_d [max_figures+2] |
Prior label probabilities. | |
float * | probs_d [max_figures+2] |
Posterior label probabilities. | |
int * | sums_d |
Partial gradient magnitude sums. | |
uchar * | vimd_d |
Gray-level image. | |
int | width |
Image width. |
CUDA Segmentation class.
Definition at line 43 of file cudasegment.h.
CudaSegment::CudaSegment | ( | int | width, |
int | height | ||
) |
float CudaSegment::ComputeBeta | ( | uchar * | image_d | ) | [private] |
Compute the surface parameter beta.
Compute the surface parameter beta
image_d | Disparity image |
void CudaSegment::CopyProbsToDevice | ( | Image< float > ** | probs_h | ) |
Copy probabilities to GPU.
void CudaSegment::CreateHistograms | ( | FgBgSegment & | segment | ) | [private] |
Create all histograms.
Create all histograms for foreground, background and flat surface hypotheses. Currently not used because works only for smal histograms.
segment | Segmentation object |
void CudaSegment::Execute | ( | FgBgSegment & | segment, |
Image< uchar > & | cimg, | ||
Image< float > & | dimg, | ||
int | numFigures, | ||
bool | download = true |
||
) |
void CudaSegment::SetGradientCosts | ( | uchar * | image_d, |
float | beta, | ||
float | gamma | ||
) | [private] |
Set gradient costs.
Set gradient costs
image_d | Disparity image |
beta | surface parameter beta |
gamma |
uchar* CudaSegment::allocated_d [private] |
Memory allocation block pointer.
Definition at line 54 of file cudasegment.h.
float* CudaSegment::beliefs_d[max_figures+2] [private] |
Posterior label beliefs.
Definition at line 72 of file cudasegment.h.
uint* CudaSegment::bins_d [private] |
Colour histogram bin indices.
Definition at line 62 of file cudasegment.h.
uchar* CudaSegment::cimd_d [private] |
Colour image.
Definition at line 56 of file cudasegment.h.
float* CudaSegment::costh_d [private] |
Horizontal Gradient costs.
Definition at line 66 of file cudasegment.h.
float* CudaSegment::costv_d [private] |
Vertical Gradient costs.
Definition at line 68 of file cudasegment.h.
float* CudaSegment::dimd_d [private] |
Disparity map.
Definition at line 60 of file cudasegment.h.
int CudaSegment::height [private] |
Image height.
Definition at line 52 of file cudasegment.h.
const int CudaSegment::max_figures = 8 [static] |
Maximum number of foreground objects.
Definition at line 47 of file cudasegment.h.
float* CudaSegment::priors_d[max_figures+2] [private] |
Prior label probabilities.
Definition at line 70 of file cudasegment.h.
float* CudaSegment::probs_d[max_figures+2] [private] |
Posterior label probabilities.
Definition at line 74 of file cudasegment.h.
int* CudaSegment::sums_d [private] |
Partial gradient magnitude sums.
Definition at line 64 of file cudasegment.h.
uchar* CudaSegment::vimd_d [private] |
Gray-level image.
Definition at line 58 of file cudasegment.h.
int CudaSegment::width [private] |
Image width.
Definition at line 50 of file cudasegment.h.