OpenThermal / libseek-thermal

SEEK thermal compact camera driver supporting the thermal Compact, thermal CompactXR and and thermal CompactPRO
MIT License
294 stars 100 forks source link

Frame ID never changes from 4 on linux virtual machine #15

Open zeroKilo opened 7 years ago

zeroKilo commented 7 years ago
bool SeekCam::grab()
{
    int i;

    for (i=0; i<10; i++) {
        if(!get_frame()) {
            error("Error: frame acquisition failed\n");
            return false;
        }

        if (frame_id() == 3) {
            return true;

        } else if (frame_id() == 1) {
            m_raw_frame.copyTo(m_flat_field_calibration_frame);
        }
    }

    return false;
}

if I understand this code right, it waits for the incoming frame data to have a frame id of 3 (3rd 16bit value in frame) but my camera never changes from 4, what would trigger it to change? I made a few edits to the code to have better output:

https://pastebin.com/hEB2wuFV

it fails with:

/home/tester/code/thermal/2/src/SeekCam.cpp:174:open_cam(): Error: first grab failed

what can I do? is there a documentation to the frame data structure?

maartenvds commented 7 years ago

Did you try this from a linux virtual machine or native linux? What camera type did you use?

zeroKilo commented 7 years ago

I used linux mint in vmware player, and I have PID=0011, "Seek Thermal Compact Pro"

Achref-Dachraoui commented 6 years ago

Hi, i have the same problem here, did you find a solution ? Ty

maartenvds commented 6 years ago

Nope, sorry it is known not to work stable via a virtual machine. I'm currently not planning to provide support for VM's.

twhitloc commented 6 years ago

I faced a similar issue with the Jetson TX2, and had very similar debug output. It also failed on the grab and would not initialize successfully. I could hear the camera shutter though.

After updating, rebooting and re-attaching the camera I noticed there was an additional message from opencv about not having ShowImage implemented as well as another gtk2.0. After installing the gtk2.0 dependency and recompiling opencv I was able to run this successfully.

I am not saying this is a solution per-say, but this solved my issue that on the face of it had similar behavior.