Search code examples
c#winformsip-camera

How to perform PTZ programmatically for Axis Camera Control in C#


Here I get an IP camera from Axis and Axis camera control showing the live view in my Winform program.

I am now going to write mouse dragging and scrolling event to perform Pan–tilt–zoom(PTZ) in the C# Program.

However, I can't find any answer even though I have been read all the manuals from Axis and searching quite a lot in Google. (Adding a param continuouszoommove in the Url is not working.)

Please help. Many thanks!


Solution

  • I just find out the answer today, it takes me two days for searching..

    And here you get the answer:

    viewer.PTZControlURL = "http://{{ipaddress}}/axis-cgi/com/ptz.cgi";
    viewer.EnableAreaZoom = true;
    viewer.OneClicllkZoom = true;
    viewer.UIMode = "ptz-user-setting"
    

    For the option of UIMode:

    http://wiki.cinemaronline.com/index.php?title=Axis_Client_Side_ActiveX_Streaming_Video_Window

    Alternatively, you can add some event like KeyUp/KeyDown to customize your camera control by adding params: pan, tilt and zoom.

    Read the manual below about the params:

    http://www.axis.com/files/manuals/vapix_ptz_52933_en_1307.pdf