Home | Develop | Download | Contact
test_matrix_export_bmp3.cpp
1 
24 #include <cmath>
25 #include <Pds/Ra>
26 #include <Pds/Sp>
27 
28 int main(void)
29 {
30  Pds::Matrix Z;
31  unsigned int N=480;
32 
33  Z=Pds::Peaks(N);
34  Pds::Matrix::ExportBmpFile(Z.Scale(0,255),Z.Scale(0,255),Z.Scale(0,255),"ColormapRGB.bmp");
35 
36  std::vector<Pds::Matrix> Block;
37  Block=Pds::Matrix::ImportBmpFile("IMG-20200503-WA0011.bmp");
38  //Block=Pds::Matrix::ImportBmpFile("ColormapRGB.bmp");
39 
40  std::vector<Pds::Matrix> CC;
42  if(CC.size()!=0)
43  Pds::Matrix::ExportBmpFile(CC[0],CC[1],CC[2],"ColormapRGB_cc.bmp");
44 
45  std::vector<Pds::Matrix> WPI;
46  WPI=Pds::Image::WhitePatch(Block);
47  if(WPI.size()==3)
48  Pds::Matrix::ExportBmpFile(WPI[0],WPI[1],WPI[2],"ColormapRGB_wp.bmp");
49 
50 
51  if(Block.size()==1)
52  Block[0].Scale(0,255).ExportBmpFile(Pds::Colormap::Jet,"ColormapRGB_new.bmp");
53 
54  if(Block.size()==3)
55  Pds::Matrix::ExportBmpFile(Block[0],Block[1],Block[2],"ColormapRGB_new.bmp");
56 
57  return 0;
58 }
std::vector< Pds::Matrix > ChromaticityCoordinates(const std::vector< Pds::Matrix > &Block, double factor=1.0)
Retorna un bloque de matrices en coordenadas cromáticas.
std::vector< Pds::Matrix > WhitePatch(const std::vector< Pds::Matrix > &Block)
Retorna un bloque de matrices con WhitePatch.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed