I have a Teledyne DALSA nano camera c1930. I am trying to recorde the video by using the sample code from here.
For this I have installed the cvb suit on Linux and I am able to capture images but unable to record the video
# CVBpy Example Script # # 1. Starts a stream from device # 2. Starts recording. # 3. Writes images to movie file. # 4. Stops recording. # 5. Stops the device's stream. # import os import cvb import cvb.movie2 with cvb.DeviceFactory.open(os.path.join(cvb.install_path(), "drivers", "CVMock.vin"), port=0) as device: stream = device.stream stream.start() # Replay cvrv file with Common Vision Blox Viewer output_file = os.path.expanduser('~/Movie2ExampleVideo.cvrv') # Raw video settings raw_video_settings = cvb.movie2.RawVideoSettings() # Define pixel format pixel_format = cvb.movie2.RecorderPixelFormat.Color if len(device.device_image.planes) == 1: pixel_format = cvb.movie2.RecorderPixelFormat.Mono # Create the recorder with cvb.movie2.Recorder(output_file, device.device_image.size, pixel_format, raw_video_settings) as recorder: print("Start recording 100 frames:") for i in range(100): image, status = stream.wait() if status == cvb.WaitStatus.Ok: # Write image to file recorder.write(image) print(".", end="") stream.abort() print("\nMovie file written to: " + output_file)
and getting the following error when I try to run the above sample code:
ModuleNotFoundError: No module named 'cvb.movie2'
I have looked everywhere for help to install the movie2 API but there was no success. I don’tt know where I can find it, for this even I visited the stemmer imaging website but no success. Is it that I have to purchase the movie2 software or API ?
Last question, I know I can configure the camera from the GENICAM browser, which is good. However, Is it possible to configure the camera from the PYTHON API or not? I know we can, for instance, given the example code in, I can set the exposure time
But I would like to know is it possible to set advance configuration for the camera via CVBPython API. For example before I start to capture a video or image, I should be able to set some options or check whether the PTP is locked and synced etc… and such kind of configuration or only record if PTP is in slave mode and is atcive.
Any help would be appreciated.