IT++ Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pnm.h
Go to the documentation of this file.
1 
29 #ifndef PNM_H
30 #define PNM_H
31 
32 #include <itpp/base/mat.h>
33 
34 
35 namespace itpp
36 {
37 
50 //--------------------------------------------------------------
51 // General PNM functions
59 char pnm_type(const std::string & filename);
60 
71 bool pnm_info(const std::string & filename,
72  char & pnm_type,
73  int & width,
74  int & height,
75  int & max_val,
76  std::string & comments);
77 
78 //--------------------------------------------------------------
79 // PGM related functions (gray images)
89 bool pgm_read(const std::string & filename, imat & m,
90  std::string & comments);
91 
92 
103 bool pgm_read(const std::string & filename, imat &m,
104  int r1, int r2, int c1, int c2);
105 
106 
114 imat pgm_read(const std::string & filename);
115 
116 
126 bool pgm_write(const std::string & filename,
127  const imat &m,
128  const std::string & comments = "Generated by IT++ (http://itpp.sourceforge.net)");
129 
130 
131 //--------------------------------------------------------------
132 // PPM related functions (color images)
145 bool ppm_read(const std::string & filename,
146  imat &r, imat &g, imat &b,
147  std::string & comments);
148 
149 
158 bool ppm_read(const std::string & filename,
159  imat &r, imat &g, imat &b);
160 
161 
169 bool ppm_read(const std::string & filename,
170  imat &r, imat &g, imat &b,
171  int r1, int r2, int c1, int c2);
172 
184 bool ppm_write(const std::string & filename,
185  const imat &r,
186  const imat &g,
187  const imat &b,
188  const std::string & comments = "Generated by IT++ (http://itpp.sourceforge.net)",
189  int max_val = 255);
190 
206 imat img_double2int(const mat & m,
207  int max_val = 255,
208  double double_min = 0 ,
209  double double_max = 1);
210 
223 mat img_int2double(const imat & m,
224  int max_val = 255,
225  double double_min = 0,
226  double double_max = 1);
227 
228 } // namespace itpp
229 
230 #endif // #ifndef PNM_H
SourceForge Logo

Generated on Fri Mar 21 2014 17:14:14 for IT++ by Doxygen 1.8.1.2