質問

I'm trying to use IAMVideoProcAmp (directshow.net C#) to set brightness for a microsoft camera (lifecam studio). I refer the solution from here. This solution uses IAMVideoProcAmp to set brightness for camera. After i connect to device by calling

DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);

i set the brightness of camera. But it's seem to be not work when i call Set() function of IAMVideoProcAmp

int Set(
          VideoProcAmpProperty Property, // VideoProcAmpProperty
          int lValue,          // Value to set
          VideoProcAmpFlags Flags  // VideoProcAmp_Flags_* 
       );

I tried to set various valid values for this function but there no effect on camera. I can get the max/min/default value of brightness property of camera by function:

int GetRange(
            VideoProcAmpProperty Property,         // Which property to query
            out int pMin,          // Range minimum
            out int pMax,          // Range maxumum
            out int pSteppingDelta,// Step size
            out int pDefault,      // Default value
            out VideoProcAmpFlags pCapsFlags     // VideoProcAmpFlags
            );

And it gave me max = 255, min = 30, default = 133, pCapsFlags = manual.

I also used Microsoft lifecam software to adjust the brightness and it makes effect on camera immediately. but the max/min value of brightness are max = 2.5, min = -2.5 Please show me the way to set brightness of camera and why the max/min values that i get are different from value on property pages?

Thank you a lot.

役に立ちましたか?

解決

At last i figured out that IAMVideoProcAmp::Set is not work because Microsoft lifecam software. This software is installed along with installing of camera driver. The TrueColor feature of this software is the point of this problem, when i turn TrueColor on from this software, then i cannot use IAMVideoProcAmp::Set to adjust the brightness from my app anymore. Just uninstall Microsoft lifecam then it works as my desire. Hope this info will help someone get same problem to me.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top