0

I'm trying to run Matrox Image Library's example code for frame grabbing. When the application runs, all I get is a black screen for the display image.

I know my configuration is correct, since when I try Matrox Intellicam software, I'm able to grab an image, which makes it more weird. It's just something in the software I need to change that I'm not aware of.

I've found this, but it was not helpful really. Frame Capture using Matrox Commands

This is the code I have.

       /* Allocate 2 display buffers and clear them. */
       MbufAlloc2d(MilSystem,
                   (MIL_INT)(MdigInquire(MilDigitizer[0], M_SIZE_X, M_NULL)*GRAB_SCALE),
                   (MIL_INT)(MdigInquire(MilDigitizer[0], M_SIZE_Y, M_NULL)*GRAB_SCALE),
                   8L+M_UNSIGNED,
                   M_IMAGE+M_GRAB+M_PROC+M_DISP, &MilImageDisp[0]);
       MbufClear(MilImageDisp[0], 0x0);
       MbufAlloc2d(MilSystem,
                   (MIL_INT)(MdigInquire(MilDigitizer1, M_SIZE_X, M_NULL)*GRAB_SCALE),
                   (MIL_INT)(MdigInquire(MilDigitizer1, M_SIZE_Y, M_NULL)*GRAB_SCALE),
                   8L+M_UNSIGNED,
                   M_IMAGE+M_GRAB+M_PROC+M_DISP, &MilImageDisp1);
       MbufClear(MilImageDisp1, 0x80);

   /* Display the buffers. */
   MdispSelect(MilDisplay[0], MilImageDisp[0]);
   MdispSelect(MilDisplay[1], MilImageDisp[1]);

   /* Grab continuously on displays at the specified scale. */
   MdigControl(MilDigitizer[0], M_GRAB_SCALE, GRAB_SCALE);
   MdigGrabContinuous(MilDigitizer[0],MilImageDisp[0]);
   MdigControl(MilDigitizer[1], M_GRAB_SCALE, GRAB_SCALE);
   MdigGrabContinuous(MilDigitizer[1],MilImageDisp[1]); 

I'm quite stuck and I would appreciate any idea that suggests what might be wrong.

aek8
  • 319
  • 1
  • 8
  • 22
  • 2
    Could you post a [mcve] that replicates your problem? – Jesper Juhl Jan 22 '18 at 19:58
  • What framework are you using? opencv? Please tag your question accordingly. –  Jan 22 '18 at 19:58
  • 1
    @user9212993 it's MIL (Matrox Image Library) and there's no tag for Matrox/MIL/Matrox-Image-Library – aek8 Jan 22 '18 at 20:23
  • @aek8 _"This is more of a software/hardware configuration problem."_ The here is the wrong place to ask. –  Jan 22 '18 at 20:30

1 Answers1

0

Frame grabber loses synchronization because either no default digitizer format is set or it's not the correct format for the camera.

To solve this issue, either set the DCF in code or manually in config file.

aek8
  • 319
  • 1
  • 8
  • 22