Obtaining Camera Serial Number or ID from Argus library

Hi Jerry,

Yes, the calibration file is used for stereo image matching and processing. It is different for each stereo camera pair. In the calibration file, the guids or serial numbers of each camera in the stereo camera pair are recorded. For the application, I will need to read the guid or SN from cameras and compare with the ones inside calibration file. This way, it can be sure that we are using the correct calibration file.

So I guess if getUUID() works, then I can use ICameraProperties::getUUID() to identify each cameras. right? Note that I am using L4T32.5, and I would like to confirm that getUUID() works properly on L4T32.5?

I read through Is Argus::ICameraProperties::getUUID() not unique?, could you clarify that is this UUID unique for all the cameras I use? We are using leopard IMX577.

Update 1 [2021-12-06]

I have read the UUID by getUUID(). For left camera, I got GUID=1 and for right camera, I got GUID=0. That seems not correct. I have used the gdb to inspect the struct of UUID. Here is the code I used to obtain the GUID:

uint64_t IMX577StereoCamera::getCameraUUID(Argus::CameraDevice* pCam)
{
    uint64_t camGUID = UINT64_MAX;

    if(pCam != nullptr)
    {
        ICameraProperties *iCameraProperties = interface_cast<ICameraProperties>(pCam);
        if(iCameraProperties != nullptr)
        {
            UUID camUUID = iCameraProperties->getUUID();
            camGUID = 0;
            for(int i = 0; i < 6; ++i)
            {
                camGUID |= (camUUID.node[i] << (64 - 8 * (i + 1)));
            }
            camGUID |= camUUID.clock_seq;
        }
        else
        {
            std::cerr << FUNC_LINE(__func__, __LINE__) << "cannot get camera properties" << std::endl;
        }
    }
    else
    {
        std::cerr << FUNC_LINE(__func__, __LINE__) << "null ptr found" << std::endl;
    }
    return camGUID;
}

Thanks,

Jon