How to passively get picture frames, externally triggered?

Ok, I admit the title is not clear, let me clarify:

I have an industrial IP camera, which take pictures whenever its sensor is activated ( similar to the tilt button on Webcams ). It means that I will not continously read the camera, but the Java application will be rather expected to be awaiting for ( interrupt ) events to instantiate the whole image processing process.

I’m tempted to try reading a live video stream continously, taking frames one-by-one, starting the process of interest just after received an external TCP command ( a resource yet to be implemented ), but I feel this is not an ellegant nor efficient approach.

Is there any way to achieve that funcionality ?


define “externally triggered”.

does the camera’s exposure get triggered? then just keep reading those frames. they’ll only get made when triggered, and they’ll arrive as they’re made.

you make it sound as if you’d only open a VideoCapture object once every while, expect to read a picture, and then close it again.

since you have an industrial IP camera, please investigate their driver/SDK. they’ll give you access to every function that is typically expected of industrial cameras.

I don’t have the camera SDK, and honestly I’m not inclined to make a code manufacturer-dependent, it is always prefereable to keep it as general as possible.

As per your question “define externaly triggered”, it is a quite standard feature on these devices which consists of a hardware input on the camera that take a snapshot upon an electric signal, eg. changing from low to high logic state.

Just to update:

I got the SDK with C/C++ samples and I was able to do that with a weird solution which worked fine so far: Once having the input triggered, the camera issue an event notification to the software warning about a just started image acquisition, and after that, the software read the last captured picture.

I was expecting to use some kind of system interrupt instead of a polling approach as such, anyway it works fine with the current speed, something about 4 pictures per second.