Single frame capture in milliseconds or seconds

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
danielrivet
Posts: 9
Joined: Wed Sep 09, 2020 10:08 pm

Single frame capture in milliseconds or seconds

#1

Post by danielrivet »

I have a really strange problem with one of my scripts. On laptop#1, my script interpret the entry in milliseconds, so I enter 25 and the captured frame is 25ms. I copy the script on laptop#2, same sharpcap configuration, same camera… when I enter 25, the capture is 25 seconds instead of 25ms …. Has to be external to sharpcap that there is a difference. Any idea where to look?
Thanks.
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Single frame capture in milliseconds or seconds

#2

Post by admin »

Hi,

first guess would be the language settings of the laptops - if one is set to English and the other to a non-english setting that uses comma as the decimal separator, that might be it.

Another possibility is that it will depend on the camera in use - the 'Exposure' control value is related to how the camera internally measures exposure, so some cameras measure in milliseconds, some in seconds, some in microseconds. For a consistent value, use the 'ExposureMs' property which is always measured in milliseconds (you can set that property too).

cheers,

Robin
danielrivet
Posts: 9
Joined: Wed Sep 09, 2020 10:08 pm

Re: Single frame capture in milliseconds or seconds

#3

Post by danielrivet »

Thanks. Will try this and let you know.
danielrivet
Posts: 9
Joined: Wed Sep 09, 2020 10:08 pm

Re: Single frame capture in milliseconds or seconds

#4

Post by danielrivet »

Did not find the cause of this behavior, it is not the locale settings on the laptops and not the camera since I was using the same cameras on both laptops. In any case, the ExposureMs solved the problem. It is probably even better since it will work regardless of other OS settings.

Thanks a lot. (I will still work at finding the root cause of this and let you know if I find.j

Daniel

P.s. where can I find a detailed description of the SharpCap attributes for Python. Some are obvious but some others are shard to figure out.
User avatar
admin
Site Admin
Posts: 13348
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Single frame capture in milliseconds or seconds

#5

Post by admin »

Hi,

unfortunately we don't create full documentation for the python API, so the best sources are this area of the forums and the 'help()' function in Python.

cheers,

Robin
Post Reply