[cpp]Imaging::BitmapData^ bmpData =this->buffer->LockBits(my question is...."is these thing good?"
System::Drawing::Rectangle(Point(0,0),this->buffer->Size),
Imaging::ImageLockMode::ReadOnly,
this->buffer->PixelFormat);
Imaging::BitmapData^ bmpData2 =this->buffer2->LockBits(
System::Drawing::Rectangle(Point(0,0),this->buffer2->Size),
Imaging::ImageLockMode::WriteOnly,
this->buffer2->PixelFormat);
Ipp8u* pPixelData = (Ipp8u*) bmpData->Scan0.ToPointer();
IppiSize roiSz;
roiSz.width = this->buffer->Width;
roiSz.height = this->buffer->Height;
Ipp8u* pPixelDataDst = (Ipp8u*) bmpData2->Scan0.ToPointer();
/* setting various lut trasformation
............
*/
ippiLUT_8u_C3R(pPixelData,
bmpData->Stride,
pPixelDataDst,
bmpData2->Stride,
roiSz,
lutval,
lutval2,
numblevel
);[/cpp]
Or modify at least pLevel or pValue.
for example,
for (int i = 1; i <= 255; i++ ) {
redvals = i;
grnvals = this->trackBar1->Value;
bluvals = this->trackBar2->Value;
}
Because according to the manual,
<* Pixels in the pSrc image that are not in the range [pLevels[0], pLevels[nLevels-1]) are copied to the pDst image without any transformation. *>
If you has
numblevel[1] = 256;
numblevel[2] = 256;
and
for (int i = 0; i <= 255; i++ ) {
redvals = i;
grnvals = this->trackBar1->Value;
bluvals = this->trackBar2->Value;
}
Then the grn and blu's pLevels[0]=pLevels[1]=....=pLevels[255]= (trackBar value). Thus
the pixel =(trackBar value) map to =(trackBar value)
the pixel !=(trackBar value) map to orig pSrc.the result image isalways same as Src image, which is not you wanted, isn't?
Regards,
Ying
Or modify at least pLevel or pValue.
for example,
for (int i = 1; i <= 255; i++ ) {
redvals = i;
grnvals = this->trackBar1->Value;
bluvals = this->trackBar2->Value;
}
Because according to the manual,
<* Pixels in the pSrc image that are not in the range [pLevels[0], pLevels[nLevels-1]) are copied to the pDst image without any transformation. *>
If you has
numblevel[1] = 256;
numblevel[2] = 256;
and
for (int i = 0; i <= 255; i++ ) {
redvals = i;
grnvals = this->trackBar1->Value;
bluvals = this->trackBar2->Value;
}
Then the grn and blu's pLevels[0]=pLevels[1]=....=pLevels[255]= (trackBar value). Thus
the pixel =(trackBar value) map to =(trackBar value)
the pixel !=(trackBar value) map to orig pSrc.the result image isalways same as Src image, which is not you wanted, isn't?
Regards,
Ying
For more complete information about compiler optimizations, see our Optimization Notice.