Code:
class CameraClass
{
public:
virtual char * GetImageFirstBytePointer(unsigned int i)=0;
};
class CameraPros:public CameraClass
{
private :
tProsFrame Frame[FRAME_NUMBER];
public:
char * GetImageFirstBytePointer(unsigned int i)
{//checks on i..
return( (char*)Frame[i].ImageBuffer );
}
};
class CameraVend2:public CameraClass
{
private :
Vend2Frame Frame[FRAME_NUMBER];
public:
char * GetImageFirstBytePointer(unsigned int i)
{//checks on i..
return( (char*)Frame[i].ImagePointer );
}
};
where of course tProsFrame and Vend2Frame are different structures of two different APIs which MUST satisfy the following
"tProsFrame.ImageBuffer" "Vend2Frame.ImagePointer" must address two iimages of the same format (for instance BGR24 which is Pixel1Blue8bits,Pixel1Red8Bits,Pixel1Green8bits,Pi xel2Blue8bits,Pixel2Red8Bits..
The images will be eaten by the same procedures to analyze them
Is this quite correct??