C# SDK Image Acquire

  • Hello.


    I am developing a C# program with reference to the C# SDK wrapper.


    If image acquisition is restarted after stopping image acquisition, the image cannot be acquired unless the grabber resources are released and reallocated.


    Should I stop acquiring the image and reallocate the resources before acquiring the image again?


    // FrameGrabber Initialization

    Fg_Struct fg = SiSoCsRt.Fg_Init("Acq_FullAreaGray8", (uint)0);


    // Allocate DMA

    dma_mem memHandle = SiSoCsRt.Fg_AllocMemEx(fg, totalBufferSize, nbBuffers);


    // Acquire Start

    SiSoCsRt.Fg_AcquireEx(fg, camPort, -1, SiSoCsRt.ACQ_STANDARD, memHandle);


    // Acquire Stop

    SiSoCsRt.Fg_stopAcquireEx(fg, camPort, memHandle, unchecked((int)FgStopAcquireFlags.STOP_SYNC));


    // Freeing the grabber resource

    Fg_stopAcquireEx(fg,nCamPort,memHandle);

    Fg_FreeMemEx(fg, memHandle);

    Fg_FreeGrabber(fg);