Research Article
Efficient Parallel Implementation of Active Appearance Model Fitting Algorithm on GPU
Algorithm 4
GPU-based method for calculating
.
// : the ID of pixel. | // : the number of threads in grid. | // np: the number of pixels. | // VID: gets the IDs of three vertices of the triangle | // that the given pixel belongs to. | // S: the shape vector. | // α, , : the transformation parameters. | // BI: conducts a bilinear interpolation. | // img: the intensity matrix of the image. | () i blockId * gridDim + threadId; | () N gridDim * blockDim; | () while i < np | () (v1, v2, v3) VID(i). | () ; | () ; | () ; | () ; | () end while |
|