Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect text scaling with zoom on IMAQ Image overlay

I seem to have run into a couple of bugs bug in the display of text overlays in the Vision 8.6 package (running under LV 8.2.1).

 

1).  When I draw a text with a certain font size, it scales nicely (vector-based) when I zoom in.  If I want to cover this text with a rectangle, however, I see some anomalies when Zooming.  It seems like the text is not being scaled properly for the changes in ZOOM level.  I use the Rectangle shown as an area of interest which responds as expected, thus seemingly excluding the possibility that the rectangle and not the text is being scaled incorrectly.

 

Text at Zoom 1.PNG Text as displayed at Zoom 1 (Expanded for clarity)

 

Text at zoom 11.PNGText and Rectangle at Zoom 10 (not scaled)

 

Drawing bug?

 

2).  On a related note, when using the"Application" font choise, the text does not seem tos cale at ALL when zooming.  I see no mention of this behaviour at all in the HELP. 

 

Text (application font) at zoom 11.PNG Application font Text at Zoom 11

 

Documentation bug or Font scaling bug?

 

Shane.

 

Ps Please bear in mind that ALL images shown have the SAME SIZE rectangles drawn (Except for the lowest example where the font is different - therefore different size bounding box)

Message Edited by Intaris on 05-29-2009 06:59 AM
Message Edited by Intaris on 05-29-2009 07:00 AM
0 Kudos
Message 1 of 10
(5,421 Views)

Hi,

 

could you please send me the VI you tested?

 

Best regards

Rüdiger

0 Kudos
Message 2 of 10
(5,366 Views)

Sure,

 

here's a small example you can see the problem on.

 

Setting font to "Application font" stops the text scaling when the image is zoomed and setting it to "Arial" (for example) results in wrong scailing when zoomed.

 

Regards

 

Shane.

 

Ps Forgot to mention the VI is written in LV 8.2.1 with Vision 8.6 installed.

Message Edited by Intaris on 06-08-2009 04:20 AM
0 Kudos
Message 3 of 10
(5,364 Views)

Forgot to make "Vertical Alignment" for the text to be "top" by default, otherwise the text is not displayed.

 

Shane.

0 Kudos
Message 4 of 10
(5,358 Views)

Hi,

 

you have to use "merge overlay" and call the picture event case again. Please see the attached VI.

 

Best regards

Rüdiger

0 Kudos
Message 5 of 10
(5,335 Views)

I need the VI as LabVIEW 8.2.1 version (as mentioned twice in my posts above)

 

Vision components can be 8.6 as this is what I'm using but the development environmant for LabVIEW itself on my maching is 8.2.1.

 

Shane.

Message Edited by Intaris on 06-09-2009 01:50 PM
0 Kudos
Message 6 of 10
(5,328 Views)

Anybody? Please?

 

Shane.

0 Kudos
Message 7 of 10
(5,311 Views)

Shane,

 

I think there are no serious bugs, but some "undocumented" behavior.

 

At the first, "Application" font not scaled with zoom. From my point of view its not so bad. I using this fact when I want to place some text for mark ROIs, for example. When Image with ROIs zoomed, then marks are not zoomed (otherwise they will too big and stay out of image).

 

For second trouble with zoom for vector-based fonts here is small drawing bug, caused by resizing vector-based fonts. For example, you have put Arial 12 pt and cover it with rectangle and all looks good with Zoom = 1. Now with Zoom factor 5x font is rescaled, probably with size 60 pt. This caused misplacement text and rectangle.

 

You have three possibilities:

- merge overlay into another image,  then show this as bitmap overlay in zoomed image (but you will not get nice vector fonts in this case, of course)

- recalculate rectangle bounds depends from zoom factor and used font (here no recipes - just try this with different zoom ratio)

- submit feature request to NI - then probably you will get this in Vision x.x

 

Andrey.

 

0 Kudos
Message 8 of 10
(5,295 Views)

I disagree.

 

The bahaviour of the Application (and System font BTW), while possible very useful are not described anywhere that I could find.  This makes it at least a documentation bug.

 

As to the incorrect scaling of the fonts, I don't see merging as a solution because this is modifying the original image, something which Overlays should NOT do.  It also loses a lot of fidelity when zooming and just looks bad.

 

The fonts are being scaled improperly so I will submit it as a bug.

 

I will also suggest fixing the documentation to mention that not all font types will be scaled.

 

Shane.

0 Kudos
Message 9 of 10
(5,290 Views)

Hi,

 

here from my side the VI in version 8.2.

 

Best regards

Rüdiger

0 Kudos
Message 10 of 10
(5,278 Views)