Hi
I would like to ask is it possible in opencv to set manually all mat properties. I am using a specialised camera were it is not possible to recognise it with opencv funcions. I would like to vizualise the data image of the camera using opencv but combining it with the opening funcitons offered by the manufacturer. I saw that when the image is ready there is a variable structure that has the following parameters:
typedef struct tag_mexImg { unsigned long Version; //!< [in] Version, currently it must be 'V003' (MEXIMGVERSION) unsigned long Bytes; //!< [in] Amount of bytes of this struct (sizeof(mexImg)). int dimX; //!< [in/out] Horizontal pixel dimension of image int dimY; //!< [in/out] Vertical pixel dimension of image void* pBw; //!< [in/out] Pointer to memory for monochrome image or for the \link page27 DIB-format \endlink void* pRed; //!< [in/out] Pointer to memory for red image channel void* pGreen; //!< [in/out] Pointer to memory for green image channel void* pBlue; //!< [in/out] Pointer to memory for blue image channel int channels; //!< [in] to take from enum mex_channels unsigned int bitmask; //!< [out] Bitmask of significant bits in image pixel data unsigned long stdTicks; //!< [out] Realized exposure standard ticks unsigned long addTicks; //!< [out] Realized exposure additional ticks unsigned long channelBytes; //!< [in/out] Realized amount of bytes per color channel int posX; //!< [out] X-position code of a single image from an unassembled scan (::mexAcquisParams::runas = runas_scan) int posY; //!< [out] Y-position code of a single image from an unassembled scan (::mexAcquisParams::runas = runas_scan) unsigned long bytesperPixel; //!< [in/out] Bytes per pixel and color (should be 1 or 2) unsigned long orientation; //!< [out] Flip conditions with respect to ::mex_orientation unsigned long exposuretime; //!< [out] exposure time - [microseconds} int colorMask; //!< [out] A value from enum ::mexColorMask unsigned __int64 timestamp; //!< [out] timestamp unsigned long user_index; //!< [in/out] instead of reserved[user_index] unsigned long HdNr; //!< Identifier, coming from frame header unsigned long Time[4]; //!< time stamps for logging purposes unsigned long reserved[4]; //!< Reserved for future use } mexImg;
I saw that my variable Mat frame has different parameters as: Mat frame; frame.addref(); frame.allocator; frame.channels(); frame.cols; frame.rows; frame.data; frame.datastart; frame.dataend; frame.datalimit; frame.depth(); frame.dims; frame.flags; frame.refcount; frame.reserve(); frame.size; frame.step; I think that if I want to visualize the image by imshow("image", frame); I have to set all the parameters of the Mat structure.
Could you help to resolve the problem?