Skip to content

getSimilarityTransform得到的rotation是谁对谁的? #19

@Turlan

Description

@Turlan

我单独把getSimilarityTransform的程序来出来跑了一下,发现得到的rotation是
shape_to * rotation = shape_from
从代码里来看,注释写的是
// get the rotation and scale parameters by transferring shape_from to shape_to, shape_to = M*shape_from
但是regressor.cpp 108这一段:
regression_targets[i] = ProjectShape(augmented_ground_truth_shapes[i], augmented_bboxes[i])
- ProjectShape(augmented_current_shapes[i], augmented_bboxes[i]);
cv::Mat_ rotation;
double scale;
getSimilarityTransform(params_.mean_shape_, ProjectShape(augmented_current_shapes[i], augmented_bboxes[i]), rotation, scale);
cv::transpose(rotation, rotation);
regression_targets[i] = scale * regression_targets[i] * rotation;
getSimilarityTransform(ProjectShape(augmented_current_shapes[i], augmented_bboxes[i]), params_.mean_shape_, rotation, scale);
rotations_[i] = rotation;
scales_[i] = scale;
第一次调用后对求得的rotation进行了转置(求逆),去得到论文中所表示的回归目标,即rotatiaon实际上是 M的逆?而且如果对rotation进行了转置,为何scale没有对应的取倒数?
rotations_[i]对应的就是第一次调用所求得的rotation的转置,即从projectshape到mean_shape的变换矩阵,这样的话,在后续求解randomforest的时候关系就乱了?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions