begin process at 2012 05 29 09:10:17
  Trouver un code source :
 
dans
 
Accueil > Forum > 

C++ & C++ .NET

 > 

Windows

 > 

DirectX

 > 

How to access the register's value when using the IAMVideoProAmp


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

How to access the register's value when using the IAMVideoProAmp

vendredi 21 juillet 2006 à 10:32:35 | How to access the register's value when using the IAMVideoProAmp

retinex

Hi,

I am a newbie to DirectShow. Recently I am developing an Image Acquisition
software for a microscope. I want to save the parameters such as brightness,
hue and whitebalance, which are got from the IAMVideoProAmp interface to be
the default parameters for the next startup. However, I found if I set the
ColorEnable property to be manual, the saved values can not make a correct
display, especially the color, while the vidcap32.exe can. The following is
copied from the camera driver info ( *.set file):

;[OVT.9600.Properties]
;Standard properties
ROPSETID_VIDCAP_VIDEOPROCAMP
; KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS, // RW O 0
; KSPROPERTY_VIDEOPROCAMP_CONTRAST, // RW O 1
; KSPROPERTY_VIDEOPROCAMP_HUE, // RW O 2
; KSPROPERTY_VIDEOPROCAMP_SATURATION, // RW O 3
; KSPROPERTY_VIDEOPROCAMP_SHARPNESS, // RW O 4
; KSPROPERTY_VIDEOPROCAMP_GAMMA, // RW O 5
; KSPROPERTY_VIDEOPROCAMP_COLORENABLE, // RW O 6
; KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE, // RW O 7
; KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,// RW O 8
HKR,%9600Brit%,PropertyId,0x10001, 0
;Control method 0-->just write calculated value to register (one register)
;Control method 1-->Range look up table, write one or more registers for
value within a range
HKR,%9600Brit%,MapMethod,0x10001, 0
HKR,%9600Brit%,RelatedRegister,1,6
;true or false
HKR,%9600Brit%,RelateUsbRegister,1,0

HKR,%9600Brit%,SupportAuto,0x10001,0 ;0 not support, 1 support
;Auto control method 0-->when turn off auto, just write current value to
register
;Auto control method 1-->when turn off auto, just read register value as
current value

HKR,%9600Brit%,PropertyId,0x10001, 0
HKR,%9600Brit%,MapMethod,0x10001, 0
HKR,%9600Brit%,RelatedRegister,1,ec
;true or false
HKR,%9600Brit%,RelateUsbRegister,1,1

HKR,%9600Brit%,DefaultValue,0x10001, 0x00
HKR,%9600Brit%,DefaultFlags,0x10001, 1
HKR,%9600Brit%,MinValue,0x10001, 0xffffff80
HKR,%9600Brit%,MaxValue,0x10001, 0x7f
HKR,%9600Brit%,Step,0x10001, 1

;#####################################

HKR,%9600Cntr%,PropertyId,0x10001, 1
HKR,%9600Cntr%,MapMethod,0x10001, 0
HKR,%9600Cntr%,RelatedRegister,1,eb
;true or false
HKR,%9600Cntr%,RelateUsbRegister,1,1

HKR,%9600Cntr%,DefaultValue,0x10001, 0x80
HKR,%9600Cntr%,DefaultFlags,0x10001, 1
HKR,%9600Cntr%,MinValue,0x10001, 0
HKR,%9600Cntr%,MaxValue,0x10001, 255
HKR,%9600Cntr%,Step,0x10001, 1

;#####################################

HKR,%9600Col%,PropertyId,0x10001, 6
HKR,%9600Col%,MapMethod,0x10001, 1
HKR,%9600Col%,NumberOfValues,0x10001, 2
HKR,%9600Col%\0000,Value,0x10001, 0
HKR,%9600Col%\0000,UsbRegisters,1, f0,00,ff
HKR,%9600Col%\0000,CamRegisters,1, 01,80,ff,02,80,ff,24,80,ff,25,70,ff
HKR,%9600Col%\0001,Value,0x10001, 1
HKR,%9600Col%\0001,UsbRegisters,1, f0,01,ff
HKR,%9600Col%\0001,CamRegisters,1, 24,b0,ff,25,90,ff

HKR,%9600Col%,DefaultValue,0x10001, 1
HKR,%9600Col%,MinValue,0x10001, 0
HKR,%9600Col%,MaxValue,0x10001, 1
HKR,%9600Col%,Step,0x10001, 1

;#####################################

;HKR,%9600Wb%,Registers,0x10001,
;#####################################
;HKR,%9600Wb%,PropertyId,0x10001, 7

;HKR,%9600Wb%,MapMethod,0x10001, 0
;HKR,%9600Wb%,RelatedRegister,1,01

;HKR,%9600Wb%,DefaultValue,0x10001, 80
;HKR,%9600Wb%,DefaultFlags,0x10001, 1
;HKR,%9600Wb%,MinValue,0x10001, 0
;HKR,%9600Wb%,MaxValue,0x10001, 255
;HKR,%9600Wb%,Step,0x10001, 1

I guess the vidcap32.exe buffers the register values. How can I read/write
the registers?

Any comments should be appreciated!
vendredi 21 juillet 2006 à 10:37:31 | Re : How to access the register's value when using the IAMVideoProAmp

retinex

Let me detail the problem.

I use IAMVideoProAmp to Get/Set the properties to control the video display. I get the properties and save them in an ini file. I found a question:
1. I set the ColorEnable property to be the Auto mode to obtain a correct color display;
2. then I switch the ColorEnable Item to be the Manual mode(after this,the video display does not change the color);
3. now I save all the properties that I can get from IAMVideoProAmp.
4. However, when I restart my program to read the ini file to set the saved properties to the camera, the color display is not the original one.

The same procedures are taken by using vidcap32 except that the properties can not be saved. Namely,
1. open the video source dialog to set the ColorEnable item to be the auto mode to obtain a correct color display;
2. then switch it to manual mode (after this,the video display does not change the color);
3. close the vidcap32.
4. If I restart the vidcap32, the color display remains the same as it was before I close the vidcap32.

I have checked the Registry but I did not find any solution. So I guess the vidcap32 buffers the video register values. How can I read/write the values?

Thanks a lot.
vendredi 21 juillet 2006 à 10:41:04 | Re : How to access the register's value when using the IAMVideoProAmp

buno

Administrateur CodeS-SourceS
More information can be found on MSDN here:
[ Lien ]

Buno
----------------------------------------
L'urgent est fait, l'impossible est en cours. Pour les miracles, prévoir un délai...
Le site de mon mariage
samedi 22 juillet 2006 à 11:48:20 | Re : How to access the register's value when using the IAMVideoProAmp

retinex

Thanks for your kind reply:)

I have tried your suggestion. If the USB camera is connected to the PC or the PC is not turned off, no matter how many times I restart the vidcap32 or my program, the display will not be changed(the ColorEnable property is manual mode); however, if the camera is pluged off or the PC is restarted, the display will be shifted. Therefore, I guess that some properties that compensate the color display are buffered in the hardware rather than stored in the Registry to control the display. How to get those parameters or access the related hardware buffers thru directshow interfaces?

I found a third software that is not specially designed for my camera can store the parameters to obtain the correct color display. I am curious about how it achieves this.

Thanks for any suggestion.


Cette discussion est classée dans : 0x10001, 9600brit, 9600col, hkr, videoprocamp


Répondre à ce message

Sujets en rapport avec ce message



Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,140 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales