简体   繁体   English

C ++图像库-查找颜色的像素并使它们变为白色,其他一切变为黑色

[英]C++ image library - finding pixels of a colour and making them white, everything else black

I'm looking for a C++ image processing library with which I would be able to find all pixels of a certain colour, with a user-specified tolerance, and colour them white and everything else in the picture black. 我正在寻找一个C ++图像处理库,通过该库,我可以找到具有用户指定公差的某种颜色的所有像素,并将它们着色为白色,并将图片中的所有其他颜色着色为黑色。 Do you know of any? 你知道吗

If it were a C++ library, not one of plain C ones, which I'm allergic to, it would be a bonus. 如果它是一个C ++库,而不是我过敏的普通C库之一,那将是一个额外的好处。

You should check OpenCV. 您应该检查OpenCV。 It has both C and C++ (based on OO principles) APIs. 它同时具有C和C ++(基于OO原理)API。

OpenCV可以完成此任务以及更多!

Or perhaps a CImg - a wonderful header-only image manipulation library. 或CImg-一个很棒的仅标头图像处理库。

http://cimg.sf.net http://cimg.sf.net

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM