IplImage to Bitmap

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IplImage to Bitmap

srikanta
Dear all, I am working in VC++ 2010 with Opencv library. I have a question
regarding to the Bitmap image. How can I convert the IplImage to its Bitmap
version in the platform of VC++. Because the bitmap is a structure of
windows .Net version.
Reply | Threaded
Open this post in threaded view
|

Re: IplImage to Bitmap

Francisco Ares
Hi

If you need to save a bitmap image, the file manipulation resources are
described here:

http://opencv.itseez.com/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=file#CvMat*%20cvLoadImageM%28const%20char*%20filename,%20int%20flags%29

If you plan to use the image in a user interface, I would sugest you to use
Qt instead of .Net, as you may create a QImage (the basic image
manipulation type in Qt) from the image characteristics, as width, height,
channels, etc. and the same binary data buffer used by the cv::Mat image
type from OpenCV. An also keep your application multi-target,

On the other hand, if you really need to use a bitmap image structure, you
might create that structure in your program using the same characteristics
of your IplImage and copying pixel by pixel. Something like this:

http://umanga.wordpress.com/2010/04/19/how-to-covert-qt-qimage-into-opencv-iplimage-and-wise-versa/

Or, this one, just "googling" on the subject:

http://opencv-users.1802565.n2.nabble.com/Convert-IplImage-to-Bitmap-td3784378.html

Hope this helps.
Francisco



On Tue, Apr 3, 2012 at 12:03 AM, srikanta mondal <[hidden email]>wrote:

> **
>
>
> Dear all, I am working in VC++ 2010 with Opencv library. I have a question
> regarding to the Bitmap image. How can I convert the IplImage to its Bitmap
> version in the platform of VC++. Because the bitmap is a structure of
> windows .Net version.
>  
>



--
"If you have an apple and I have an apple and we exchange apples then you
and I will still each have one apple. But if you have an idea and I have
one idea and we exchange these ideas, then each of us will have two ideas."
- George Bernard Shaw
Reply | Threaded
Open this post in threaded view
|

Re: IplImage to Bitmap

srikanta
Thank you very much. I have done this by the following links.

Thanks and regards
Srikanta Mondal

On Tue, Apr 3, 2012 at 9:26 AM, Francisco Ares <[hidden email]> wrote:

> **
>
>
> Hi
>
> If you need to save a bitmap image, the file manipulation resources are
> described here:
>
>
> http://opencv.itseez.com/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=file#CvMat*%20cvLoadImageM%28const%20char*%20filename,%20int%20flags%29
>
> If you plan to use the image in a user interface, I would sugest you to
> use Qt instead of .Net, as you may create a QImage (the basic image
> manipulation type in Qt) from the image characteristics, as width, height,
> channels, etc. and the same binary data buffer used by the cv::Mat image
> type from OpenCV. An also keep your application multi-target,
>
> On the other hand, if you really need to use a bitmap image structure, you
> might create that structure in your program using the same characteristics
> of your IplImage and copying pixel by pixel. Something like this:
>
>
> http://umanga.wordpress.com/2010/04/19/how-to-covert-qt-qimage-into-opencv-iplimage-and-wise-versa/
>
> Or, this one, just "googling" on the subject:
>
>
> http://opencv-users.1802565.n2.nabble.com/Convert-IplImage-to-Bitmap-td3784378.html
>
> Hope this helps.
> Francisco
>
>
>
>
> On Tue, Apr 3, 2012 at 12:03 AM, srikanta mondal <[hidden email]>wrote:
>
>> **
>>
>>
>> Dear all, I am working in VC++ 2010 with Opencv library. I have a
>> question regarding to the Bitmap image. How can I convert the IplImage to
>> its Bitmap version in the platform of VC++. Because the bitmap is a
>> structure of windows .Net version.
>>
>
>
>
> --
> "If you have an apple and I have an apple and we exchange apples then you
> and I will still each have one apple. But if you have an idea and I have
> one idea and we exchange these ideas, then each of us will have two ideas."
> - George Bernard Shaw
>
>  
>