Results 1 to 3 of 3

Thread: Difficulty with Zoom and Overlay. v3.2, VB.Net DFK72AUC02

  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Difficulty with Zoom and Overlay. v3.2, VB.Net DFK72AUC02

    I have been having difficulty with the Zoom factor and the overlay working together well and was looking for some guidance.

    The portion of my application causing difficulty is simply enlarging (zooming) a live video image with a crosshair drawn when you double click on the picture.

    I'm reading the clicked position value via:
    _Cross(0).X1 = e.X 'Mouse coordinates to locate master curser
    _Cross(0).Y1 = e.Y
    This works great when you are at 100% zoom factor. This even enlarges the overlay hairs correctly when you zoom in via:

    IcImagingControl1.LiveDisplayZoomFactor = sldZoom.Value / 10
    ' set via a slider, control named sldZoom

    The problem comes in when your zoomfactor is set, then you double click on the imaging control, the cross hair seems to scale for you.

    My logical response was to multiply the e.X and e.Y values by my zoom factor e.g. 125% = 1.25 and the response is not what I'd expected.

    Could you provide any guidance as to why the e.X and e.Y values would not scale correctly? thanks, Joe...

  2. #2
    Join Date
    Jul 2010
    Location
    Bremen, Germany
    Posts
    92

    Re: Difficulty with Zoom and Overlay. v3.2, VB.Net DFK72AUC02

    Hello Joe,

    my first guess is that you are using the coordinates of the cursor on the imaging control. You need to calculate the relative position on the bitmap to get the cross hair at the correct position. If you do so, do not forget about the offset values.
    Best regards
    Michael

  3. #3
    Join Date
    Apr 2012
    Posts
    3

    Re: Difficulty with Zoom and Overlay. v3.2, VB.Net DFK72AUC02

    Michael,
    Thanks for the reply, It turns out that I was attempting the correct thing however I had made a simple mathematical error.

    After plugging my coordinates to a statusbar for troubleshooting it became quickly apparent that I had Multiplied the correction rather than divided. The simplified working solution was:


    Private Sub IcImagingControl1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles IcImagingControl1.MouseDoubleClick

    _Cross(0).X1 = e.X / IcImagingControl1.LiveDisplayZoomFactor 'Mouse coordinates to locate master curser
    _Cross(0).Y1 = e.Y / IcImagingControl1.LiveDisplayZoomFactor

    Thanks for the reply.
    Joe...

Similar Threads

  1. DBK 21AU04.AS focus and zoom toolbar.
    By Elizabeth in forum Astronomy Cameras Support Forum
    Replies: 2
    Last Post: November 25, 2010, 10:46:45
  2. Difficulty accessing data from mvp
    By Unregistered in forum MontiVision Development Kit
    Replies: 2
    Last Post: August 24, 2005, 21:41:14
  3. Remote Pan, Tilt , Zoom
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: July 23, 2003, 10:23:57
  4. Zoom questions
    By MikeG in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: June 6, 2003, 08:18:05
  5. Controling Zoom of Sony DCR TRV-730
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: October 9, 2002, 20:22:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •