#12874 Score: 0
Yousazoe
Participant

也许你需要更改一下 Texture.hpp:

diff
    Eigen::Vector3f getColor(float u, float v)
    {
+       if(u < 0) u = 0;
+       if(v < 0) v = 0;
+       if(u > 1) u = 1;
+       if(v > 1) v = 1;

        auto u_img = u * width;
        auto v_img = (1 - v) * height;
        auto color = image_data.at<cv::Vec3b>(v_img, u_img);
        return Eigen::Vector3f(color[0], color[1], color[2]);
    }

因为你可以看一下 models/spot/spot_triangulated_good.obj 的范围,需要做一下预处理。