[英]Processing png in c++ with opencv and png++
Here is link for png++ : http://savannah.nongnu.org/projects/pngpp/这是 png++ 的链接: http : //savannah.nongnu.org/projects/pngpp/
What I'm doing wrong?我做错了什么? I installed opencv for OS X by command in terminal:"brew install opencv" and I have problems with using library png++.
我通过终端中的命令为 OS X 安装了 opencv:“brew install opencv”,但我在使用库 png++ 时遇到了问题。
#include <iostream>
#include "png++/png.hpp"
using namespace std;
int main(int argc, const char * argv[])
{
png::image< png::rgb_pixel > image("74");
for(int i=0;i<image.get_width();i++)
{
for(int j=0;j<image.get_height();j++)
{
image[i][j]=png::rgb_pixel(255-image[i][j].red, 255-image[i][j].green, 255-image[i][j].blue);
}
}
image.write("output.png");
return 0;
}
And I have next errors:我还有下一个错误:
Problem was, that I install opencv with brew, which I installed on Yosemite.问题是,我用 brew 安装了 opencv,我在优胜美地安装了它。 When I updated brew on ElCapitan and reinstalled opencv, errors disappeared.
当我在 ElCapitan 上更新 brew 并重新安装 opencv 时,错误消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.