Use GIL

来源:互联网 发布:有关人工智能英语作文 编辑:程序博客网 时间:2024/06/14 18:40

This article is a simple example about how to use GIL to generate histogram.

 

usually, a png file is managed as a image view of gil. also, a image view could be treated as 2D array. To generate histogram, we should just make a relation between the histogram element value and the pixel value.

 

In the following example, firstly generate a png file with a histogram, then read back to histogram from the generated png file.

 

 

 

Reference:

 

http://www.cppprog.com/boost_doc/libs/gil/doc/index.html

 

http://www.cppprog.com/2009/0305/76.html

 

http://pastebin.com/7V92Npm9


原创粉丝点击