- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Running into issues with IPP 2019.3.203, but not specific to this release, and access violation using ippiHoughProbLine.
Using
Windows 10 1809 17763.475
Visual Studio 2017 15.9.12.
Processor Intel Xeon CPU E5-2623 v3 @ 3.00GHz
Attached is an example solution reproducing the issue.
Any help with this issue would be appreciated.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Brian!
When using a BMP file as an image, CImage::GetBits() returns memory address which points to the bottom line in memory (in BMP format, by the standard, scan lines are stored bottom to top instead of top to bottom). Because of that CImage::GetPitch() returns you a negative pitch which should be used without taking its absolute value.
An example solution is in the attachment.
Always glad to help.
Kind regards,
Ivan Galanin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick response. In the reproduction I used an ATL image class and didn’t notice the buffer being bottom up. Your suggestion worked, however if I attempt to use the image as top down is where I get the original exception. In the example case if I change it so it is top-down and the step is positive I get a read access violation. This mirrors what happens in my application however using your suggestion and treating the image a bottom-up seems to resolve the issue.
auto step = image.GetStepSize();
// make bottom-up
Ipp8u* imgBuffer = (Ipp8u*)image.GetBuffer() + ((imageSize.height - 1) * step);
step = -step;
Any thoughts on why top down is not working?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Brian!
Thank you for your feedback!
We have analyzed the problem, there is an issue with IPP, which we will fix in the upcoming releases.
Best regards,
Ivan Galanin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked the problem on my side (win10, 64 bit, IPP 2019 u4). Everything passed well.
here is the VS2017 Output:
The thread 0x5d4 has exited with code 0 (0x0).
HoughProbLine.cpp(63) : atlTraceGeneral - ippMalloc_8u_L... 0000000006BA4080
HoughProbLine.cpp(67) : atlTraceGeneral - ippMalloc_8u_L array... 00000000001E6D40
The thread 0x5184 has exited with code 0 (0x0).
The thread 0x1c28 has exited with code 0 (0x0).
The thread 0xb7c has exited with code 0 (0x0).
The thread 0xb6c has exited with code 0 (0x0).
The program '[21108] ProbHoughC5.exe' has exited with code 0 (0x0).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also added to the main function this code to print version of IPP used:
const IppLibraryVersion* lib = ippiGetLibVersion();
printf("\t ======================================================================== \n");
printf("\t\t version of IPP is: %s %s %d.%d.%d.%d\n", lib->Name, lib->Version,
lib->major, lib->minor, lib->majorBuild, lib->build);
printf("\t ======================================================================== \n");
and here is the console output:
========================================================================
version of IPP is: ippIP AVX2 (l9) 2019.0.4 (r62443) 2019.0.4.62443
========================================================================
Forums\IPP\ipp_u809796\ProbHoughC5\x64\Debug\ProbHoughC5.exe (process 21300) exited with code 0.
Press any key to close this window . . .

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