2012-07-24 08:58:22 -0500 | commented answer | Bilinear sampling from a GpuMat It says I need >50 points to accept my answer. I'm new here :) |

2012-07-23 13:43:48 -0500 | received badge | ● Nice Answer (source) |

2012-07-23 09:45:32 -0500 | received badge | ● Teacher (source) |

2012-07-23 09:45:32 -0500 | received badge | ● Self-Learner (source) |

2012-07-23 09:40:03 -0500 | answered a question | Bilinear sampling from a GpuMat I've found the solution: gpu::buildWarpAffineMaps - to build matrices of x and y coordinates containing the lookup coordinates gpu::remap - to sample the image given the lookup coordinates |

2012-07-23 04:14:42 -0500 | received badge | ● Student (source) |

2012-07-23 04:04:02 -0500 | received badge | ● Editor (source) |

2012-07-23 03:57:42 -0500 | asked a question | Bilinear sampling from a GpuMat Hi everyone, I'm writing a GPU-based shape/appearance model, for which I have to crop patches centered on given key points. The patches are square but not necessarily aligned with the image axes, so I cannot just use a rowRange/colRange. My plan is to create a fixed matrix of coordinate offsets, O: In Homogeneous coordinates. I will store this matrix on the GPU. When I want to sample a patch around X = [x, y, 1]^T, I simply transform the coordinates by a similarity transformation matrix M (which performs translation, rotation and scaling). So P will again have the same layout as O, but with transformed coordinates.
Alternatively, I could rotate/scale the whole image and then crop an axis-aligned patch, but this seems less efficient. Thanks in advance |

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.