Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set relative properties through C# #21

Open
Skullface9512 opened this issue Oct 17, 2024 · 1 comment
Open

How to set relative properties through C# #21

Skullface9512 opened this issue Oct 17, 2024 · 1 comment
Labels
dotnet dotnet specific issue question Request for information/clarifications.

Comments

@Skullface9512
Copy link

I'm working on debugging the camera by C#, but i don't know how to set its camera properties, such as exposure time and gain, and if i want to take a specified number of photos, what should i modified in here.

@TIS-Edgar
Copy link
Member

The example you link shows you how to set properties.
You can simply copy the lines and modify the property IDs and values like so:

propertyMap.SetValue(ic4.PropId.ExposureAuto, "Off");
propertyMap.SetValue(ic4.PropId.ExposureTime, 3000.0);

propertyMap.SetValue(ic4.PropId.GainAuto, "Off");
propertyMap.SetValue(ic4.PropId.Gain, 30.0);

An overview over available property IDs can be found in our documentation:
https://www.theimagingsource.com/en-us/documentation/ic4dotnet/api/ic4.PropId.html

If you want to only save a limited amount of images you should modify the while loop that fires TriggerSoftware to stop after the image count you need.

@TIS-Edgar TIS-Edgar added question Request for information/clarifications. dotnet dotnet specific issue labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet dotnet specific issue question Request for information/clarifications.
Projects
None yet
Development

No branches or pull requests

2 participants