Community
cancel
Showing results for 
Search instead for 
Did you mean: 
arrahul
Beginner
78 Views

Histogram Equalization Input Image

Hai

Could any one please help me as to how we should provide the input image for a particular IPP Image processing fuction. My input image is in .bmp format. I am stuck with how to read this file format and set the Region of Interest. Should I use the normal fopen function and read the file byte by byte or should i go for some other method?The function in the IPP sample - iplHistoEqualize has the folowing input arguments -

IplImage* srcImage,
IplImage* dstImage,
IplLUT** lut

Please help.

Thanks
Rahul

0 Kudos
3 Replies
Anthony_P_Intel
Employee
78 Views

Hi Rahul,

You may want to look at some of the code samples provided here. (Search for BMP on this web page).

Hope this helps.

-Tony

Ying_H_Intel
Employee
78 Views

Hi Rahul

Did you referred to IPL migration documentation? This is an article about how to migrate from IPL to IPP.

http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-domain-li...

Regards,

Ying

SergeyKostrov
Valued Contributor II
78 Views

...Should I use the normal fopen function...

Yes. You can use any set of I/O functions:

- In case of CRT-functions:
fopen, fseek,fread, fclose;
or
_open, _filelength, _read, _close;

- In case of Win32-functions: CreateFile, GetFileSIze,ReadFile, CloseHandle;

...read the file byte by byte or should i go for some other method?..

- Byte-by-Byte reading isslow and ineffective;
- Read thefile completely in a buffer.

In general a better way is as follows:

- open a bmp-file
- getthe length
- allocate a buffer with malloc or new
- read data
- process
- save results
- deallocate the buffer with free or delete

Also, there is an example in IPL documentation onhow iplHistoEqualize must be used.

Best regards,
Sergey
Reply