Page 1 of 1

Missing attributes?

Posted: Sun May 28, 2017 6:07 pm
by putty tat
Creating and learning to create scripts. I can set Exposure and gain and can see the changes on the screen.
However, Brightness, Gamma and Contrast works neither on camera controls nor on display settings.
These work manually. I'm assuming SharpCap works on both 32 and 64 Bit systems. Any ideas please

putty tat

Re: Missing attributes?

Posted: Sun May 28, 2017 8:03 pm
by admin
Can you share your script and also what camera you are using.

thanks,

Robin

Re: Missing attributes?

Posted: Mon May 29, 2017 8:48 pm
by putty tat
SharpCap is latest version
Camera ia ASI120MC-S
My system is Win 7 Prop 64 Bit

My Script

SharpCap.SelectedCamera.GetControl(CommonPropertyIDs.Exposure).Value = 0.3


SharpCap.SelectedCamera.GetControl(CommonPropertyIDs.Gain).Value = 1

SharpCap.SelectedCamera.GetControl(CommonPropertyIDs.Brightness).Value = 5

#import enough to run the above samples in a custom script
import clr ; clr.AddReference("SharpCap.Base") ; from SharpCap.Base.PropertyControls import CommonPropertyIDs;

Re: Missing attributes?

Posted: Mon May 29, 2017 9:04 pm
by admin
Ah, there is no CommonPropertyId for brightness (really because brightness isn't a control all cameras agree on, so if you are planning on adjusting it you are already dealing with camera specific information).

You need to find the property by name, like this

Code: Select all

print SharpCap.SelectedCamera.Controls.Find(lambda x:x.Name == "Brightness").Value
cheers,

Robin