AbelCam Forum
Download AbelCam buy Pro
 
 
 
Welcome Anonymous User
11/23/2024 - 10:18 AM
Quick Search:
Quick Jump:
 
Announcements
Latest Topics
 
Configuration of Brightness/contrast etc
By: GregH
Rank: Frequent User
Topics: 17
From: n/a
Added: 05/30/2007 - 10:19 AM

Hello,

I have a logitech Orbit (or sphere or whatever) and would like to have two different confiurations (one for day one for night). The easiest way to do this, seems to be to identify where the settings are stored, and update those at a specific time.

Problem is, I don't know where the brightness/contrast information is stored. Does anyone here know?

I have been trying to get the info from Logitech, but as you would expect, they are taking forever to even reply..
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 05/30/2007 - 12:50 PM

It's all in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\xxxx\Settings

where "xxxx" is some 4-digit number unique to your setup. Each of the (possibly many) "xxxx" folders contains info about one Imaging Class device. Look around a bit in these "xxxx" folders and you can figure out which one is your camera. Then look in that "xxxx" folder's Settings sub-folder and you will see all the settings you are looking for.

If you know how to code in C++ is should be easy to cook up something that changes the settings in the registry. Then set up your prog as a scheduled task that executes at the desired time(s).

Now here's the tricky part... how to get the driver to realize that the settings in the registry changed, and read them into its working storage?? I don't have a ready answer for this. Probably you will need to force the driver to reload itself. I suspect this could be done by using a few SetupAPI calls in your registry modifying program (SetupDiSetClassInstallParams() and SetupDiChangeState() in particular) but I don't have time right now to write code to find out.
By: GregH
Rank: Frequent User
Topics: 17
From: n/a
Added: 05/30/2007 - 01:46 PM

Crikey. Sounds complicated.

Thanks for the location, I will take a look there and see if I can find it.

Didn't think about getting the registry settings to reload. If worst comes to worst, I will schedule a reboot.

Cheers
Greg
By: GregH
Rank: Frequent User
Topics: 17
From: n/a
Added: 05/30/2007 - 01:55 PM

Ah, just noticed, the fact that they call it LVUVC_Brighness rather than LVUVC_Brightness is probably one reason why I couldn't find it Smile
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 05/30/2007 - 02:06 PM

Maybe I was thinking too complicated. Scheduling a reboot (or maybe just a shutdown + re-start of AbelCam - not sure) would take care of the reloading issue.

Perhaps an easier method of handling the registry changes would be to make a couple .reg files with your various settings in them. Then make a real simple batch file that merges the desired .reg file and schedule the batch file. Seems like it should work. I know that registry merges work from the command line (eg. type "foo.reg" and if foo.reg exists it will be merged into the registry) so putting them in something schedule-able like a bat file should work too.

Basically a "zero programming" solution!
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 05/30/2007 - 02:08 PM

From GregH:
Ah, just noticed, the fact that they call it LVUVC_Brighness rather than LVUVC_Brightness is probably one reason why I couldn't find it Smile


I didn't even notice they spelled it wrong! Frin

I searched for "contrast" and got to it fairly quickly. Just had to plow through a few different devices to figure out which camera was what.
By: GregH
Rank: Frequent User
Topics: 17
From: n/a
Added: 06/21/2007 - 10:52 PM

Well, I am getting somewhere with this.

I have several scheduled tasks, which basically do the following:

Abelmorning.bat
net stop abelservice
regedit /s c:\winnt\system32\daytime.reg
copy "C:\Documents and Settings\All Users\Application Data\Seiz System Engineering\AbelCam\camLogitech QuickCam PTZ-1\daylocalsave.xml" "C:\Documents and Settings\All Users\Application Data\Seiz System Engineering\AbelCam\camLogitech QuickCam PTZ-1\localsave.xml" /y
net start abelservice
pause

abelnight.bat
net stop abelservice
regedit /s c:\winnt\system32\nighttime.reg
copy "C:\Documents and Settings\All Users\Application Data\Seiz System Engineering\AbelCam\camLogitech QuickCam PTZ-1\nightlocalsave.xml" "C:\Documents and Settings\All Users\Application Data\Seiz System Engineering\AbelCam\camLogitech QuickCam PTZ-1\localsave.xml" /y
net start abelservice
pause


The files run, the registry settings are imported, and the cam file is overwritten. The problem is, when the service starts again, it changes the actual registry entires Shocked

So, if for example, I manually stop the Abelcam service, change the Brightness setting to 108, and then start the service again, something is automatically updating it to 213 (a setting I did manually).

So is this Abelcam re-writing the registry info from somewhere, or something to do with the logitech software?
By: GregH
Rank: Frequent User
Topics: 17
From: n/a
Added: 06/21/2007 - 10:58 PM

Just a bit more info, a reboot after applying the new registry values, but before restarting the service seems to sort things out..
By: MelvinG
Rank: Magna Cum Laude
Topics: 661
From: Los Angeles, USA
Added: 06/22/2007 - 03:53 AM

Given that last bit about the reboot, I'm pretty sure that the Logitech driver is writing out its "last given" config to the registry when it's "awakened" by AbelCam connecting to it. Seems like poor behaviour by the driver...

Having said that, all I can think to suggest is looking for a way to stop/unload and reload/start the actual driver process from your batch jobs. Probably there is a way to do that with NET commands but I don't know that for sure. Doing it from a C/C++ program would not be hard - I have code around here somewhere that manipulates kernel mode drivers, but not precisely in the manner you need.