genicam / harvesters

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

Acquisition Mode - Recommended, not Mandatory. #420

Closed saki87 closed 1 month ago

saki87 commented 1 year ago

Harvesters gives the following exception once you call ia.start()

_genapi.LogicalErrorException: Node not existing : when acq_mode = self.remote_device.node_map.AcquisitionMode.value is called on line 2199.

It is because my camera is a custom that does not have an acquisition node. This acquisition mode register is 'recommended' according to SFNC v2.7.1.

Could it be fixed?

To Reproduce create and start acquirer object with a remote device (camera) which has no acquisition mode register.

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

Expected Behavior In such a case, I would expect the continuous mode as default.

Screenshots

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 month ago

Hi @saki87 Hi @quatrejuin

I'm not sure if this issue and PR https://github.com/genicam/harvesters/pull/445 make sense. If you have a streaming device, it should expose the current AcquisitionMode to the producer. With just ignoring the AcquisitionMode it's not clear in which mode your camera is and the producer (like Harvesters) doesn't know how to handle the stream.

I would say, Yes AcquisitionMode is somehow Recommended (like AcquisitionStart) but as soon as you have a streaming device both and many others are Required.

@saki87 Which kind of producer or camera do you use where you observe this issue?

quatrejuin commented 1 month ago

Hi @sunavlis

Thanks for the reply.

I'm using Teledyne dalsa xtium2-clhs fx8 framegrabber.

AcquisitionMode is not a mandatory feature for CLHS devices (cameras or framegrabbers) and may not be present at all in the XML. It may also not be present in CXP cameras or framegrabbers.

Even for GigeVision, the AcquisitionMode feature has only one mandatory value – “Continuous”. So our suggestion is that we assume "continuous" as a default for all producers that don’t have AcquisitionMode present.

sunavlis commented 1 month ago

Hi @quatrejuin

Thank you for your explanations. I wasn't aware of the fact that CLHS and CXP may not have the AcquisitionMode feature and default to Continuous.

There are no further objections with your PR from my side. With your explanation it make sens to default to Continuous mode. Thank you for your contribution!