genicam / harvesters

Image Acquisition Library for GenICam-based Machine Vision System
Apache License 2.0
500 stars 86 forks source link

Following tutorial can't get h.device_info_list to list any devices #462

Open y2k0999 opened 1 week ago

y2k0999 commented 1 week ago

Describe the Issue Using the first few lines of the tutorial code my output already varies from the output of the machine in the tutorial. When I get to h.device_info_list the output of the list is empty. I have used an absolute path to the TLSimu.cti file.

To Reproduce

  1. pip3 install harvesters (I tried cloning project as well)
  2. use sample code from tutorial

Sample Code I can show a piece of code that demonstrates the reported phenomenon:

If yes, please provide a sample code:

from harvesters.core import Harvester
import numpy as np
import time

h = Harvester()
h.add_file("/home/gavin/.local/lib/python3.10/site-packages/genicam/TLSimu.cti")

print(h.files)
h.update()
time.sleep(1)
print(h.device_info_list)

If applicable, please paste the actual output (its whole traceback, etc) here:

>>> python3 main.py
['/home/gavin/.local/lib/python3.10/site-packages/genicam/TLSimu.cti']
[]

Expected Behavior h.device_info_list outputs the "[{'display_name': 'TLSimuMono (SN_InterfaceA0)', 'id': 'TLSimuMono', 'model': 'TLSimuMono',......" as seen in the tutorial. Screenshots If applicable, add screenshots to help explain your problem; Note that it is not necessary to put everything as a screenshot! If the source is a text just paste the text because that is much helpful for us.

Configuration

Reproducibility

This phenomenon can be stably reproduced:

If applicable, please provide your observation about the reproducibility.

Actions You Have Taken

Additional context Add any other context about the problem here.

sunavlis commented 1 week ago

Hi @y2k0999

Thanks for using Harvesters and asking the question about how it works.

I'm aware of the issue with TLSimu.cti as well the wrong information in the tutorial. Today, I have no solution for this because I'm not sure about the state of TLSimu.cti... Maybe this question could help you to solve the issue: https://github.com/genicam/harvesters/issues/205

For the future I'm looking for another simple solution to get a emulated camera working with Harvesters. As soon as I have the solution, I would inform you here and update the tutorial.

What you can do: You wrote, that you woule use the Telesyne DALSA camera. You may can directly use there GenTL producer and the real hardware (if you already have the device). The other parts of the tutorial should be more or less identically.

y2k0999 commented 1 week ago

I found a few things while digging.

  1. Matrix vision's cti file is just an so file.
  2. This so file is compiled against GLIBC_2.2.5 which is from 2002
  3. The virtualFG.dll file mentioned in that other issue you linked likely originates from here and FG stands for frame grabber. The timing (2000) matches as well. It's also around the time when people were still using encoded binary in bash scripts like the one used to install the matrix vision cti file.