Home > Back-end >  C functions into Delphi for help
C functions into Delphi for help

Time:09-27

Function void CalcFeature (const emxArray_uint8_T * image, double level, emxArray_real_T * FV)

The emxArray_uint8_T type:
Struct emxArray_uint8_T
{
Unsigned char * data;
Int * size;
Int allocatedSize;
Int numDimensions;
Unsigned char canFreeData;
};

EmxArray_real_T type:
Struct emxArray_real_T
{
Double * data;
Int * size;
Int allocatedSize;
Int numDimensions;
Unsigned char canFreeData;
};

CodePudding user response:

No one, his top

CodePudding user response:

Type
//which emxArray_uint8_T type:
EmxArray_uint8_T=record
Data: ^ char;
Size: ^ integer;
AllocatedSize: integer;
NumDimensions: integer;
CanFreeData: char;
end;

//emxArray_real_T type:
EmxArray_real_T=record
Data: ^ double;
Size: ^ integer;
AllocatedSize: integer;
NumDimensions: integer;
CanFreeData: char;
end;

Procedure CalcFeature (emxArray_uint8: ^ emxArray_uint8_T, level: double, emxArray_real: ^ emxArray_real_T);
The begin

end;

Something like this on the grammar, but the image and type * * C FV can't do that should be defined in the DELPHI

CodePudding user response:

Pay attention to the choice of C code compile time on its way, function directly into the Delphi must pay attention to the calling convention, unless otherwise stipulated in the C convention, is cdecl

CodePudding user response:

Type
//which emxArray_uint8_T type:
EmxArray_uint8_T=record
Data: PUChar;
Size: ^ integer;
AllocatedSize: integer;
NumDimensions: integer;
CanFreeData: Byte;
end;

//emxArray_real_T type:
EmxArray_real_T=record
Data: ^ double;
Size: ^ integer;
AllocatedSize: integer;
NumDimensions: integer;
CanFreeData: Byte;
end;

Procedure CalcFeature (var emxArray_uint8: emxArray_uint8_T; Level: double; Var emxArray_real: emxArray_real_T);
The begin

end;

  • Related