Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. How to access the register's value when using the IAMVideoProAmp

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

Scheduled Pinned Locked Moved Hardware & Devices
tutorial
2 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    retinex
    wrote on last edited by
    #1

    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 ;PROPSETID_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 ;#########################

    R 1 Reply Last reply
    0
    • R 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 ;PROPSETID_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 ;#########################

      R Offline
      R Offline
      retinex
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups