Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Matrox MIL-Lite with IPL

111 views
Skip to first unread message

New developer

unread,
Apr 30, 2003, 1:20:36 PM4/30/03
to
Hi,
I am using Matrox-Meteor II and want to use IPL to process images
captured with it. I am not sure how to do this. I found we can create
device independent bitmaps with Mil-lite and take a pointer to this
which can be used to create an iplImage. But I am having a trouble
with this...

Specifically I have this piece of code..

numBands = 3;
Height = 240;
Width = 384;
depth = 8;
BITMAPINFO bitMap;
MbufAllocColor(MilSystem,numBands,Width,Height,depth +
M_UNSIGNED,M_IMAGE+ M_GRAB + M_DIB ,&MilColorImage);
MdigGrab(MilDigId, MilColorImage);
MbufInquire(MilColorImage,M_WINDOW_DIB_HEADER,&bitMap);

But I am never getting any data in the bitMap structure.

1. Is this the correct way to do the intended?
2. If yes, what might be going wrong? ( I have also tried changing the
milsetup.h but it did not work).

BS

unread,
May 5, 2003, 12:25:21 PM5/5/03
to
Use MbufGet (or is it MbufPut?) to put your video frame data into an array
you created.
Then use the IPL functions to fill an IPL allocated image with the data from
the array.
You can then process your IPL image.
This is cumbersome and slow but it works. It is faster if you copy the array
line by line into the IPL image

Bob

"New developer" <soma...@hotmail.com> a écrit dans le message de news:
fc8c74ea.03043...@posting.google.com...

Matrox Imaging

unread,
May 9, 2003, 3:52:24 PM5/9/03
to
Try the following example, it has been verified with MIL-Lite 6.1 and
7.1:

void main(void)
{
MIL_ID MilApplication, MilSystem, M_NULL, MilDigitizer, MilImage;
BITMAPINFO bitMap;

MappAllocDefault(M_SETUP, &MilApplication, &MilSystem, &MilDisplay,
&MilDigitizer, M_NULL);
MbufAllocColor(MilSystem, 3, 640, 480, 8+M_UNSIGNED,
M_GRAB+M_DISP+M_IMAGE+ M_DIB, &MilImage);
MdigGrab(MilDigitizer, MilImage);
MbufInquire(MilImage, M_WINDOW_DIB_HEADER, &bitMap);
printf("%d.\n", bitMap);
printf("Press <Enter> to end.\n");
getchar();
MappFreeDefault(MilApplication, MilSystem, M_NULL, MilDigitizer,
MilImage);
}

Also, please note that Matrox Imaging does host a Developers' Forum
specifically for questions and issues related to Matrox Imaging
products.

http://www.matrox.com/imaging/support/dev_forum/home.cfm

Technical Marketing,
Matrox Imaging

soma...@hotmail.com (New developer) wrote in message news:<fc8c74ea.03043...@posting.google.com>...

0 new messages