- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i used quite the same code with opencv and it function so maybe i have some problem getting the image information, what i do is:
[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]
1) Ipp8u* pPixelData = (Ipp8u*) bmpData->Scan0.ToPointer();
i attach a simple example on how it doesn't function :(
thank in advance, Andreoli Carlo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may try to change the
numblevel[0] = 257;
numblevel[1] = 257;
numblevel[2] = 257;
and see ifitworks?
(as the setting inLUT sampleof ippiDemo.exe. (It'ssource code areipp-samplesimage-processingimage-processing-functions)
Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Thank you man, with this i get it :)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page