Closed DanGoodrick closed 9 years ago
Your camera does not support 7.5 Hz framerate under the given conditions.
That’s what I figured the error was about. I tried several other framerates (15 and 1_875 – which I assumed was 1Hz) but got the same error for each one.
What does the datasheet say? Are the other settings valid? Did you try deleting that line?
In the SDK, I can dial in any frame rate but the units are in units of seconds between frames (.5 = 2 fps). If I comment out the set_video_mode_and_frame_rate and get_video_mode_and_frame_rate lines, the test script completes.
From: Robert Jördens [mailto:notifications@github.com] Sent: Thursday, August 06, 2015 9:52 AM To: jordens/pyflycapture2 Cc: Goodrick, Daniel S. (AFRC-RT) Subject: Re: [pyflycapture2] flycapture2.ApiError (#8)
What does the datasheet say? Are the other settings valid? Did you try deleting that line?
— Reply to this email directly or view it on GitHubhttps://github.com/jordens/pyflycapture2/issues/8#issuecomment-128439006.
I am running into the similar problem. I looked at all possible settings for mode and framerate that fc2 provides but couldn't a pair that matches mine.
My camera is Chameleon3 monochrome of resolution 1928 x 1448@13 FPS. But the possible modes and framerates I can find in fc2 are as follows:
fc2.FRAMERATE_120 fc2.FRAMERATE_15 fc2.FRAMERATE_1_875 fc2.FRAMERATE_240 fc2.FRAMERATE_30 fc2.FRAMERATE_3_75 fc2.FRAMERATE_60 fc2.FRAMERATE_7_5
and
fc2.VIDEOMODE_1024x768RGB fc2.VIDEOMODE_1024x768Y16 fc2.VIDEOMODE_1024x768Y8 fc2.VIDEOMODE_1024x768YUV422 fc2.VIDEOMODE_1280x960RGB fc2.VIDEOMODE_1280x960Y16 fc2.VIDEOMODE_1280x960Y8 fc2.VIDEOMODE_1280x960YUV422 fc2.VIDEOMODE_1600x1200RGB fc2.VIDEOMODE_1600x1200Y16 fc2.VIDEOMODE_1600x1200Y8 fc2.VIDEOMODE_1600x1200YUV422 fc2.VIDEOMODE_160x120YUV444 fc2.VIDEOMODE_320x240YUV422 fc2.VIDEOMODE_640x480RGB fc2.VIDEOMODE_640x480Y16 fc2.VIDEOMODE_640x480Y8 fc2.VIDEOMODE_640x480YUV411 fc2.VIDEOMODE_640x480YUV422 fc2.VIDEOMODE_800x600RGB fc2.VIDEOMODE_800x600Y16 fc2.VIDEOMODE_800x600Y8 fc2.VIDEOMODE_800x600YUV422
So how should I set the framerate and video mode?
The camera will downsample if you choose one of the standard non-native modes AFAIK. If you want the native (non-standard) format, you will probably need a format7 mode.
@jordens thanks. Can you give me an example about using format7 in pyflycapture?
I currently don't have access to the hardware. You should read the flycapture2 documentation and then use: https://github.com/jordens/pyflycapture2/blob/master/src/flycapture2.pyx#L298
After installing a C compiler on my 64bit windows machine and getting the 64 bit Anaconda, I am able to install the package, but when I try to run the test file, I get the following traceback:
C:\Users\dsgoodri\Documents\pyflycapture2>python test_flycapture2.py {'major': 2L, 'type': 3L, 'build': 18L, 'minor': 7L} 1 {'sensor_resolution': '2736x2192', 'firmware_build_time': 'Wed Oct 08 22:13:47 2014', 'sensor_info': 'Sony ICX694 (2736x2192 CCD 'serial_number': 14435834L, 'firmware_version': '2.7.3.2', 'vendor_name': 'Point Grey Research', 'model_name': 'Grasshopper3 GS3 60QS6M'} Traceback (most recent call last): File "test_flycapture2.py", line 47, in
test()
File "test_flycapture2.py", line 30, in test
fc2.FRAMERATE_7_5)
File "src\flycapture2.pyx", line 144, in flycapture2.Context.set_video_mode_and_frame_rate (src\flycapture2.c:3742)
raise_error(r)
File "src\flycapture2.pyx", line 40, in flycapture2.raise_error (src\flycapture2.c:2031)
raise ApiError(e, fc2ErrorToDescription(e))
flycapture2.ApiError: (7, 'Parameter passed to function is invalid.')
What causes this error? Sorry if there is an obvious answer - I'm kind of a noob at this.