#include <Halcon.h>
Go to the source code of this file.
Defines | |
#define | CPYIMG_COMPLEX2CV(depth, channels, width, height, type) |
#define | CPYIMG_STRUCT2CV(depth, channels, width, height, type) |
Functions | |
template<class type > | |
IplImage * | CPYIMG2CV (Hlong **himg, CvSize size, INT depth, INT channels, INT width, INT height) |
IplImage * | HImage2IplImage (Hlong **himg, INT channels, INT width, INT height, INT type) |
converts a HALCON image structure into an openCV Image |
#define CPYIMG_COMPLEX2CV | ( | depth, | |
channels, | |||
width, | |||
height, | |||
type | |||
) |
{ \ int pixelItLines = 1; \ int pixelItColumns = 1; \ int channelIt = 0; \ iplimg = cvCreateImage(size, depth, channels); \ for (pixelItLines = 0; pixelItLines < height ;pixelItLines++ ) \ { \ for (pixelItColumns = 0;pixelItColumns < width; pixelItColumns++) \ { \ CvScalar csv; \ for(channelIt = 0; channelIt < channels / 2; channelIt++) \ { \ csv.val[((channels/2- 1) - channelIt) * 2 ] = himg[channelIt][pixelItLines * width + pixelItColumns]; \ csv.val[((channels/2- 1) - channelIt) * 2 + 1] = himg[channelIt][pixelItLines * width + pixelItColumns]; \ } \ cvSet2D(iplimg,pixelItLines,pixelItColumns,csv); \ } \ } \ }
Definition at line 83 of file himage2iplimage.h.
#define CPYIMG_STRUCT2CV | ( | depth, | |
channels, | |||
width, | |||
height, | |||
type | |||
) |
{ \ int pixelItLines = 1; \ int pixelItColumns = 1; \ int channelIt = 0; \ iplimg = cvCreateImage(size, depth, channels); \ for (pixelItLines = 0; pixelItLines < height ;pixelItLines++ ) \ { \ for (pixelItColumns = 0;pixelItColumns < width; pixelItColumns++) \ { \ CvScalar csv; \ for(channelIt = 0; channelIt < channels; channelIt++) \ csv.val[(channels - 1) - channelIt] = himg[channelIt][pixelItLines * width + pixelItColumns]; \ cvSet2D(iplimg,pixelItLines,pixelItColumns,csv); \ } \ } \ }
Definition at line 64 of file himage2iplimage.h.
IplImage* CPYIMG2CV | ( | Hlong ** | himg, |
CvSize | size, | ||
INT | depth, | ||
INT | channels, | ||
INT | width, | ||
INT | height | ||
) |
Definition at line 31 of file himage2iplimage.h.
IplImage* HImage2IplImage | ( | Hlong ** | himg, |
INT | channels, | ||
INT | width, | ||
INT | height, | ||
INT | type | ||
) |
converts a HALCON image structure into an openCV Image
himg | The source image in an Halcon image format as an array of channels |
channels | Number of channels int the array given by himg, this information can not be extracted without proc_handle, so it has to be extracted before |
Definition at line 114 of file himage2iplimage.h.