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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
   |  
const
  _HdegVectorDim = 60;  // nombre de secteurs angulaires dans CIE h°
  _HDegVectorStep = 6;  // Largeur en degré d'un secteur angulaire
  _ExePathMask = 'DATA\CALIB\MASK.TXT';
 
type
  // Vecteur couleurs pour l'analyse image agro-alimentaire ISO 11037 angles 6°
  TNbrPixelsByHdeg = array[0..pred(_HdegVectorDim)] of Integer;
  TPeekDualVector= array[0..1] of TNbrPixelsByHdeg;
  TPeekDualVectorPtr = ^TPeekDualVector;
 
  // Type Gamut LCh
  TPeekGamutLCH = record
    CheckInclude   :  boolean;
    CheckHue       :  boolean;
    CheckChroma    :  boolean;
    CheckLuminance :  boolean;
    maxHDegree     :  Single;
    maxChroma      :  Single;
    maxLuminance   :  Single;
    minHDegree     :  Single;
    minChroma      :  Single;
    minLuminance   :  Single;
    ImgName        :  AnsiString;
  end;
  TPeekGamutLCHPtr = ^TPeekGamutLCH;
 
  // Paramétrage ColorVector
  TPeekVectorParams = record
    frstCMin: single;
    TwinVector: boolean;
    CMin,
    Lmin,
    LMax: single;
    ImgName: AnsiString;
  end;
  TPeekVectorParamsPtr = ^TPeekVectorParams;var
 
  PEEKCOLOR_PATH: AnsiString; // Chemin de l'exe
  BMPCopy: TBitmap;// Pour disposer d'une copie bitmap de l'image JPeg
  MaskFileName: AnsiString; // Chemin du masque de calibration
 
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Fonctions de PeekISO11037.DLL
// Initialisation dePeekISO11037.DLL
function PEEKDLL_InitISO11037DLL_OK( ExePath: AnsiString) : boolean;
                stdCall; external 'PeekISO11037_02.dll';
 
 
function PEEKDLL_MakeCalibrate: single;
                stdCall; external 'PeekISO11037_02.dll';
 
 
function PEEKDLL_CreatChartMaskOk( ChartPtr: HBitmap): boolean;
                stdCall; external 'PeekISO11037_02.dll';
 
 
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Fonctions de PeekIndusVision_02.DLL
// Initialisation de PeekVisionDLL
function PEEKVEC_DLLInit(ExePath: AnsiString): single;
                stdCall; external 'PeekIndusVision_02.dll';
 
 
// Retourne un vecteur de segments angulaires 36 secteurs de 6°
function PEEKVEC_ColorVectorFromImage( BMPPtr:HBitmap;
                                       ImgFileName,OperName: AnsiString;
                                       VecTorParamsPtr: TPeekVectorParamsPtr;
                                       VecPtr: TPeekDualVectorPtr ):Boolean;
                stdCall; external 'PeekIndusVision_02.dll';
 
 
// Dessine un graph pour afficher un vecteur couleur d'une image
procedure PEEKVEC_DrawChromaticGraph( BMPPtr: HBitmap;
                                      VecTorParamsPtr: TPeekVectorParamsPtr;
                                      VecPtr: TPeekDualVectorPtr);
                stdCall; external 'PeekIndusVision_02.dll';
 
// Affiche couleurs gamut sélectionné en affichant colorExclude sur les autres
function PEEKVEC_CalcGamut( BMPPtr: HBitmap; GamutPtr: TPeekGamutLCHPtr;
                            ImgFileName,OperName: AnsiString;
                            ColorExclude: TColor ): Integer;
                stdCall; external 'PeekIndusVision_02.dll'; | 
Partager