1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| CFP::CFP(int num_choc, std::string nom_cfp)
: numero_choc(num_choc), nom_composant(nom_cfp)
{
zone = 0;
setImageVisible();
setImageIR();
ajusterTailleVisibleEtIR();
// Création des Points de Controle
PDC(coeff_mul);
}
CFP::ajusterTailleVisibleEtIR()
{
coeff_mul = 0.5f*( static_cast<float>(LARGEUR_ECRAN) /static_cast<float>(IR.dimx()) );
IR.resize(static_cast<int>(-100*coeff_mul), static_cast<int>(-100*coeff_mul), 1, 3, 1);
visible.resize(IR.dimx(), IR.dimy(), 1, 3, 1);
}
CFP::setNomComposant(std::string nom_cfp){nom_composant = nom_cfp;}
CFP::getNomComposant {return nom_composant;}
CFP::setImageVisible()
{
CImg <unsigned short> visible (nom_composant);
image_visible = visible;
}
CFP::setImageIR(int num_choc)
{
int num_cam = camera.getNumeroCamera();
int *nbimages = new int[1];
int cr = IRnb_images(numchoc, numcam, &nbimages);
importImage(num_choc, num_cam, static_cast<long> floor(nbimages*0.5 ), static_cast<long> floor(nbimages*0.5 ), ;
delete[] nbimages;
} |
Partager