Cyan

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: 作业二如何保存图片 #9563 Score: 0
    Cyan
    Participant

    好了我这里说下根据main.cpp中可看到,int main(int argc, const char** argv)
    if (argc == 2)
    {
    command_line = true;
    filename = std::string(argv[1]);
    }

    if (command_line)
    {
    ……
    cv::imwrite(filename, image);
    return 0;
    }
    这两段是保存图片也就是说当argc == 2时,即可保存图片,最后终端输入./Rasterizer xxx.png即可满足argc == 2即可保存图片

Viewing 1 post (of 1 total)