Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

LUT(image, lut_channels[k], Plane_images); //crash here

merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

LUT(image, lut_channels[k], Plane_images); //crash here

merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

for (double j = 0; j <= glevl; ++j) { double color = j / glevl; lut.at<vec3s>(j)[0] = glevlcolorr; lut.at<vec3s>(j)[1] = glevlcolorg; lut.at<vec3s>(j)[2] = glevlcolorb;

}

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

LUT(image, lut_channels[k], Plane_images); //crash here

merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

for (double j = 0; j <= glevl; ++j) { ++j)

{

double color = j / glevl;
        lut.at<vec3s>(j)[0] = glevlcolorr; 
        lut.at<vec3s>(j)[1] = glevlcolorg;
        lut.at<vec3s>(j)[2] = glevlcolorb;

}

lut.at<Vec3s>(j)[0] = glevl*color*r; 

lut.at<Vec3s>(j)[1] = glevl*color*g;

lut.at<Vec3s>(j)[2] = glevl*color*b;

}

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

 Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

image.type())); LUT(image, lut_channels[k], Plane_images); //crash here

merge_elem.push_back(Plane_images);

here merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

for (double j = 0; j <= glevl; ++j)

{

double color = j / glevl;

lut.at<Vec3s>(j)[0] = glevl*color*r; 

lut.at<Vec3s>(j)[1] = glevl*color*g;

lut.at<Vec3s>(j)[2] = glevl*color*b;

}

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

    Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

    LUT(image, lut_channels[k], Plane_images);    //crash here

     merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

for (double j = 0; j <= glevl; ++j)

{

double color = j / glevl;

lut.at<Vec3s>(j)[0] = glevl*color*r; 

lut.at<Vec3s>(j)[1] = glevl*color*g;

lut.at<Vec3s>(j)[2] = glevl*color*b;

}

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

    Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

    LUT(image, lut_channels[k], Plane_images);    //crash here

     merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.

LUT for 16bit image

Hi,

I want to do lookuptable for 16 bit image. I have image of 16 bit(CV_16UC1), then i naormalize image with RGB give value and store in Mat variable called lut(type - CV_16UC3). After that, i split Mat lut and store in lut_channels.

int planes = 3;

vector<mat> lut_channels(planes);

vector<mat> merge_elem;

int glevl = 65535;

int dim(glevl + 1);

Mat lut(1, &dim, CV_16UC3);

for (double j = 0; j <= glevl; ++j)

{

double color = j / glevl;

lut.at<Vec3s>(j)[0] = glevl*color*r; 

lut.at<Vec3s>(j)[1] = glevl*color*g;

lut.at<Vec3s>(j)[2] = glevl*color*b;

}

split(lut, lut_channels);

for (int k = 0; k < planes; ++k)

{

    Mat Plane_images = Mat(Mat::zeros(image.size(), image.type()));

    LUT(image, lut_channels[k], Plane_images);    //crash here

     merge_elem.push_back(Plane_images);

}

It is crashes in LUT function.

Can someone help me to solve this problem.

Thanks in advance.