PDA

View Full Version : Overlay Lines missing when image zoomed smaller



Terry Sopkow
June 24, 2011, 21:14:55
In Labview I am trying to create an application where I can adjust the position of horizontal and vertical lines of a cross hair. I am finding that as I move the horizontal line (up or down) it will disappear at certain increments. In my application I am setting the live display height and width to the size of the Imaging Control (this usually reduces the size to the live display). This is when the problem occurs. If I do not resize the live display, everything is ok. The same thing happens if I use the livedisplayzoomfactor. Values less than 1 have the same effect on the overlaybitmap.

Looking around, I found one Thread in the .Net Forum that was similar to the problem I am having, but I could not determine the solution.

Hoping you will have some way to correct this.

Thanks

Terry.

Stefan Geissler
June 27, 2011, 13:08:23
Hello Terry,

the substitution of pixels is the reason for removing the lines, if the image size is reduced. I have no idea, how to solve this problem in LabVIEW. In C++ I would draw the image using the CGrabberListener::frameReady() event in an MemoryDeviceContext in the desired display size. Then I would draw the extra lines on this and after doing so, the image in the Memory Device Context is blitted in the Device Context of the Windowhandle that shows the image for the user.

In LabVIEW, the first attempt is using the ImageAvailable event to capture the images and forward them to a picture box or what LabVIEW uses. Then the crosshair is drawn on this picture box. I do not know, whether this works, I have too less LabVIEW knowledge for this.