Strumenti Utente

Strumenti Sito


magistraleinformaticanetworking:spm:cimglib1718

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

magistraleinformaticanetworking:spm:cimglib1718 [16/01/2018 alle 09:43 (7 anni fa)] – creata Marco Daneluttomagistraleinformaticanetworking:spm:cimglib1718 [16/01/2018 alle 09:46 (7 anni fa)] (versione attuale) Marco Danelutto
Linea 1: Linea 1:
 ===== Read and write images from files ===== ===== Read and write images from files =====
  
-To run the Histogram project, students may consider to use the [[http://cimg.eu/|CImg]] library. The library consists in a single header file to be included and compiled linking the pthread and the X11 library +To run the Histogram project, students may consider to use the [[http://cimg.eu/|CImg]] library. The library consists in a single header file to be included and compiled linking the pthread and the X11 library 
 <code> g++/icc -pthread -lX11 file.cpp -o ... </code> <code> g++/icc -pthread -lX11 file.cpp -o ... </code>
  
 +The library has been tested working on the ninja.itc.unipi.it PHI KNL machine, and a copy of the header file may be found on the machine under /home/marcod/CImg/CImg.h:
 +
 +<code> icc -I /home/marcod/CImg -pthread -lX11 ... </code>
 + 
 In order to read images from disk and to save images to dist, the <code>cimg_library::CImg</code> constructor and the <code>save</code> method may be used.  In order to read images from disk and to save images to dist, the <code>cimg_library::CImg</code> constructor and the <code>save</code> method may be used. 
 Pixels are accessed through 3 dim coordinates (x, y, color channel). The following code reads a JPEG image from disk, changes some pixels and writes it back with a different name: Pixels are accessed through 3 dim coordinates (x, y, color channel). The following code reads a JPEG image from disk, changes some pixels and writes it back with a different name:
magistraleinformaticanetworking/spm/cimglib1718.txt · Ultima modifica: 16/01/2018 alle 09:46 (7 anni fa) da Marco Danelutto

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki