05-06-2020 02:46 AM
I tried using IMAQ Set Overlay properties with property as "scale" and behavior as "transform" for the image I wanted to resample. The text overlays looks as if they got stretched. Is there any white paper that I can refer regarding the behavior IMAQ Overlay Text and IMAQ Set overlay properties?
The first image is of resolution 800x641
The second image is resampled and its resolution is 200x154
05-06-2020 08:19 AM
You will help us immensely (to help you) by posting your code. We don't know what you did, so we can't easily tell you (and explain to you) what you did that was either incorrect or incomplete. It would also help to include a sample Image.
If you are using LabVIEW Project, and all of the Project Files (and, perhaps, the Sample Image) are in the same Folder, compress the Folder and attach the resulting .zip file.
Bob Schor
05-06-2020 11:10 AM
Hi,
I've attached a sample vi and image.
05-06-2020 01:19 PM
Thanks. Here are a few interesting "facts":
Some conclusions:
I think it has something to do with the size/shape of the Image and the size of the screen (and possibly shape of the screen's pixels, i.e square vs rectangle). I'd say that the phenomenon is "real", but I'm not certain if this is a "bug" or a "feature". The fact that it seems to have a pretty sharp "discontinuity" near 0 and 90 makes me think "bug", but as I don't have an Image to test against, it might only be a quirk of IMAQ's rendering of Text that's the problem.
Bob Schor
05-06-2020 11:18 PM
Thanks.
I have observed the same.
Is there any white paper/document/blogs that I can refer to understand about IMAQ Overlay Text function?
05-07-2020 09:09 AM
I doubt it. We are clearly talking about some strange behavior "buried in the weeds" underlying the algorithm NI is using. I'm sure that there are texts written about Computer Graphics that go into going into and out of various implementation of images-as-pixels -- you could try doing a Web search for such books, but it's likely to be, at best, a "distraction".
Here's part of the problem, particularly with Text. Text using Western alphabets tends to have many vertical lines. Representing these as pixels results in nice sharp edges as the pixels replicate vertically. Now consider rotating it by 0.1° -- the Pixels will have some X component that needs to be recognized and computed. You'd think it wouldn't matter too much, but who knows what computations are being done "behind the curtain" -- in the interest of speed, approximation short-cuts may have been employed that introduced subtle errors, or some other factor whose existence I don't know might be at fault.
Bob Schor
05-07-2020 11:17 PM
True.
I tried changing the font name from Times New Roman to Calibri and found that this "stretching" of text is not much evident on the screen. Looks like only some font names have such peculiar behaviour.
05-08-2020 09:00 AM
Good catch -- I wouldn't have thought about the "old" and the "new" Font Features. As I remember (and this could be wrong), Times New Roman is a TrueType Font, developed for the earlier versions of Windows (e.g. Windows 95, 98), whereas Calibri is a ClearType Font, adapted by Microsoft Office in 2007. ClearType use sub-pixel shading, which I think means that a stroke that is, say, 30 pixels tall when upright, and (let's imagine) a pixel on your screen take 0.005", so the stroke is 0.15" high, when it gets tilted, by "shading" the pixels, it will continue to occupy 0.15" on the screen. Note that if you turn it 90° and want it to still be 0.15" high, this might not be 30 pixels unless the pixels are "square" (which need not be the case).
Bob Schor