Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #7045 Score: 0
      Participant

      我发现模型文件中的uv坐标会有负值,麻烦问下uv坐标可以为负吗,opencv在用负数uv坐标取颜色值的时候会报错

      Attachments:
      You must be logged in to view attached files.
    • #7058 Score: 0
      汤包喵喵喵
      Participant
      2 pts

      UV坐标不能为负。11章Texture Mapping里提到了,UV的区间是[0,1]²

    • #7063 Score: 0
      汤包喵喵喵
      Participant
      2 pts

      emmmm我自己也发现了,模型里给的uv有很少的情况小于0或者大于1,但是超出不多。然后如果用负值uv调用getColor(),就会导致opencv报错。
      我觉得因为超出值很小,大部分值还是落在[0,1]之间,这应该是类似存储误差的问题。。?所以我现在的处理办法是如果小于0,就取0。也能显示奶牛。

      Attachments:
      You must be logged in to view attached files.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.