Image scaling produces moire

I use Labview 8.01 and need to read grayscale images (bmp, png) and fit them to user window for display.
Images are scaled via entering a scaling factor into property node for the frontpanel display. If the scaling factor is larger or equal to one, everything is fine. But when I use a factor smaller than 1, the image size is correctly changed, but the smaller image contains e.g. black lines where only smooth gray fields are in the original image. Maybe that is due to a bad scaling algorithm, but of course I cannot change it.
Any idea to solve this problem?
Attached are screenshots of the problem, a VI to quickly test it and an example image file.
Attachments:
scale05.jpg ‏36 KB
scaletest.vi ‏20 KB
test.png ‏130 KB

@chrisger:
When opening your file, Labview does not find a file called IMAQ ReadFile. If I ignore it, the VI opens without this file. I have installed the IMAQ package... see attached screenshot.
There I discovered another problem with your file: It only allows integer values for scaling, but not the critical range between zero and one.
I tried one VI supplied by NI to which I just have added the image selector, and even this file shows the same behaviour as my own one does. I also attached this version.
Message Edited by chrbesold on 07-26-2006 10:00 AM
Attachments:
imaq.jpg ‏24 KB
Picture Control - Zoom Attribute.vi ‏113 KB

Similar Messages

  • Problems with image scaling

    I'm facing a real problem with image scaling
    I've used several algorithms but it all has defects but the most common thing is the out of memory error after several enlargments...
    does any one know a solution...
    note:
    I've used several packages to do so,but I'm looking for a solution from the jdk itself
    JAlexscorpio

    Did you take into account that the getScaledInstance() -method creates a completly new Image?
    So if you use it like in
    ImageIcon icon1=new ImageIcon("Blah.gif");
    ImageIcon icon2=new ImageIcon(icon1.getImage().getScaledInstance(400,400,SCALE_FAST);
    you will end up with 2 different Images which have their own data and memory requirements.
    even if you use something like
    ImageIcon icon1=new ImageIcon("Blah.gif");
    Image i=icon1.getImage();
    icon1.setImage(i.getScaledInstance(200,200,SCALE_FAST));
    You will need enough memory to store the data for the original image, as well as the data for the scaled
    version of the image, at least for the time that it take the JRE to create the scaled version. You never know when the garbage collector kicks in to delete you old data so it could be that this takes some time and until
    that moment your memory is not available. If your now doing several of the scaling operations, and there is no chance for the garbage collector to do its work, you will run out of memory.
    I hope that might help, if not feel free to post again

  • ComboBoxRenderer with image scaling

    hi all,
    I would like to know how to make the comboBoxRender with image scaling. Because my combo box is smaller than the image that I want to put inside..
    currently, I "extends JLabel implements ListCellRenderer", but if I call setIcon to the Label, it is not scale to the combo size..., so I think is it need to extends another type of component ?
    Could some of you give me a suggestion , better provide me a simple code.. Many Thanks for help.

    Hi,
    I've extended the Icon framework to support scaling. I never tried it with cell renderers, but maybe it works:
    Extend JXIconLabel, set the zoomingStrategy to FullZooming.RESPECTING_ASPECT_RATIO_INSTANCE and set the XIcon (eg. a XImageIcon).
    Maybe it works. (The library is open source.)
    http://softsmithy.sourceforge.net/lib/docs/api/org/softsmithy/lib/swing/JXIconLabel.html
    Homepage:
    http://www.softsmithy.org
    Download:
    http://sourceforge.net/project/showfiles.php?group_id=64833
    Source:
    http://sourceforge.net/svn/?group_id=64833
    http://softsmithy.svn.sourceforge.net/viewvc/softsmithy/trunk/lib/src/org/softsmithy/lib/
    API:
    http://softsmithy.sourceforge.net/lib/docs/api/index.html
    If you have questions just ask me!
    -Puce

  • Image Scaling Percentage

    I am converting from Quark 6.0 to Indesign CS3 and have a comparison question.
    When viewing an image within Quark you can get specifics about the images scaling percent ratio. IE: 100%, Reduced would be obviously 99.99% to 10% or enlarged would be obviously 100.1% to 150%.
    Is there anyway to see that kind of percentage in InDesign. We try to stay under 150% and above 10% for our printer specifications, so it will make things very difficult if we can not view that info like in Quark.
    Any help is greatly appreciated!!

    I guess what I was hoping for is for the % to actually give its configuration from the original 100% instead of saying that it 100% after it has been reduced or enlarged. Between the info and the % it more or less makes sense, but it is not exact and I guess the user has to somewhat guess? Seems like more work for the user.
    Thanks for your help!!

  • VI Method "Front Panel:Get Image Scaled" Memory Error 17

    Hi all, I've got two almost identical sub vi front panels that I'm dumping to a jpg image for reporting purposes.  One was copied and slightly modified from the other to show a different data set and plot.  The original works just fine, but the second sub vi, when using the "Front Panel:Get Image Scaled" method to pass the image to write the jpg, always returns the following error:
    "Error 17 occurred at Invoke Node in Myprogram
    Possible reason(s):
    LabVIEW:  Not enough memory to manipulate image.
    =============================
    NI-488:  Unrecognized command.
    Method Name: Front Panel:Get Image Scaled
    [Continue] [Stop]  "
    I've stripped the problem section into a simple tiny new that only opens the report and tries to get the image with the same working/non-working result above.  Using the Execution Trace Highlighter, it error is definitely occuring when the Method executes.
    Any ideas?  Thanks.

    Hey cjgpr,
        I haven't been able to dig up much info on this error message.  There's one other discussion forum post that talked about it some, and a KnowledgeBase article on it.  It seems that whatever changes you made to the front panel have caused it to exceed your computer's memory when creating an image.  Try removing items until it works, then see what actually breaks the functionality.
    Brian B
    Field Sales Engineer
    Tennessee/Southern Kentucky
    National Instruments

  • Image scaling changes

    Before I started here, the team was using FrameMaker 8 and migrating to FM 10. During the migration, we noticed that images in the documents we opened, converting them to FM10, had their image scaling data changed.
    Typically, we acquire screen shots using the highest resolution screen supported - mine is currently set at 1440 x 900. We scale the images to a width of 510 pixels (optimally) but no more than 600 pixels in our screen capture utility. We save the screen shots as Grayscale JPEGs. This process has, historically, provided images that fit our text column flow perfectly.
    In previous versions of FM, the images imported by reference appeared as 100% scaling in the FM image properties. Now, they appear as 75% scaling. We're wondering why and if there is any effects we need to be aware of in terms of PDF and HTML Help file sizes.
    While testing the import process, looking to see if the FM scaling data affected the image size, we saw that the pixel dimensions given by SnagIt varied wildly from the pixel dimensions given by FM. For example, the SnagIt dimensions for one image indicated it was 505x493 pixels whereas FM gave the dimensions of the source file as 507x315 pixels. Both are, as far as I know, giving me the source file dimensions but they are different.
    We might not have noticed this, the images looked okay, but we were carefully going through the transition to FM10 and looking at every detail.
    Question: why is FM10 auto-scaling the images to 75%?
    Question: does this scaling do anything to our output that we need to be aware of?
    Question: why do we get two different dimension data from the two software packages?
    Thanks,
    Wanda

    We  save the screen shots as Grayscale JPEGs.
    Are the screen images contone (e.g. real-world photos, CGI imagery),
    or flat (e.g. dialogs, line art)? JPEG uses curve-matching compression,
    which is great for tones that vary smoothly, but introduces nasty ringing
    edge artifacts on sharp edges of flat tones.
    TIF(zip), uses repeat-count compression, and is both non-destructive to flat
    tone images, and often compresses them more efficiently. We use EPS
    for the import format (no compression) and let Distiller or Acrobat post
    determine the compression to use.
    This process has,  historically, provided images that fit our text column
    flow perfectly.In  previous versions of FM, ...
    What is the target delivery format?
    ... the images imported by reference appeared as  100% scaling in
    the FM image properties. Now, they appear as 75%  scaling.
    In case you want to try it, I have never seen imported EPS objects
    change size when migrating a document to a later rev of FM.
    We import using 96 dpi.
    If the target is PC screen display at 100% page size, that's probably a
    decent target. PC screen resolutions today probably range from 80 to
    110 dpi, and I'd guess that 96 is very close to the sweet spot.
    We use (and I favor) bringing in all contone content at 200 dpi or
    higher. We bring bitmap (bi-level line art) in at 600. But then our
    target media is 600 dpi B&W bitmap on paper. However, we like
    to give web readers of the PDFs reasonable detail in images.
    Apple's "Retina" crusade is trying to move the industry to 300 dpi
    displays. I'd be happy with 200.

  • s:BitmapImage get image scaled size and position after it loaded and scaled

    I am try to know the dimensions of the uploaded image into <s:BitmapImage without success.
    The data coming back to me are isthe real image size and not size after it was scaled to fit the component size.
    I can see that the image scaled down and fit to the maxWidth, but I can't get the actual/real scaled width from the BitmapIMage properties.
    I tried:
    <s:BitmapImage id="mainBitMap"  ready="mainBitMap_readyHandler(event)" complete="bitmapimage1_completeHandler(event)" source="{data.Thumbnail.URL}" maxHeight="250" maxWidth="250" scaleMode="letterbox"/>
      protected function bitmapimage1_completeHandler(event:Event):void{ 
    trace("----------------------Start-----------------------"); 
    trace("mainBitMap.bitmapData.width" + mainBitMap.bitmapData.width); 
    trace("mainBitMap.width" + mainBitMap.width); 
    trace("mainBitMap.measuredWidth" + mainBitMap.measuredWidth); 
    trace("mainBitMap.displayObject.width" + mainBitMap.displayObject.width); 
    trace("mainBitMap.explicitWidth.width" + mainBitMap.explicitWidth); 
    trace("mainBitMap.preliminaryWidth" + mainBitMap.preliminaryWidth); 
    trace("mainBitMap.sourceWidth" + mainBitMap.sourceWidth); 
    trace("-----------------------End------------------------");
    Result:
    ----------------------Start-----------------------
    mainBitMap.bitmapData.width=435
    mainBitMap.width=0
    mainBitMap.measuredWidth=0
    mainBitMap.displayObject.width=0
    mainBitMap.explicitWidth.width=NaN
    mainBitMap.preliminaryWidth=NaN
    mainBitMap.displayObject.preliminaryWidth=435
    -----------------------End------------------------
    Thanks,
    Nimrod.

    Hi,
    I tried the ready event, But I still receive the same results.
    I expect to get the new scaled width And height according to the maxHeight and MaxWidth.
    I see that the image scaled to fi it But I can't recive the new size of it.
    Thanks,
    Nimrod

  • Error 53 : BD.Get Image Scaled

    Hi,
    I used invoke node(method block diagram:get image scaled) to get a screenshot of block diagram of a VI. It works well in LabView 8.6. But with the application built based on the VI, I got a 53 error code. Any suggestion?

    >>"Built" as in built into an .exe file?
    >>
    >>If
    so, you can't get an image of the block diagram because the block
    diagram is removed from the VI's when they are built into the
    executable.  The only thing present is any needed front panels, and the
    underlying compiled code that is built from the block diagram.
    >>
    >>For what reason do you want to capture an image of the block diagram?
    1. Yes, it is a .exx file.
    2. The application is used to generate screenshot of a user specified VI, not a VI built into the executable.

  • JPEG Image Scaling Speed

    I've got an application where I'm drawing images to the display from a TCP/IP stream. I'm unable to acheive much better than 8 or 9 fps and the real CPU consuming task seems to be the JPEG image scaling. The frames are being scaled by about 2x but the same color depth is retained. I'm running this application on a dual, 1 Ghz PIII with Red Hat 7.1 and JDK 1.3.1. Any suggestions on how to enhance the performance of Java's image scaling would be appreciated.

    You could try using bufferedImages and doing the scaling yourself. I can re-draw a bufferedImage by altering it's raster data
    ie..
    byte [] data = bi.getData().getDataBuffer().getData();
    I get up to 100 fps edditing a 640x480 area. You will have to account for things like bit depth yourself, and scaling algo's, but it might be worth it.
    Also check the Bug database, I believe your problem MAY be related to a bug where scaling always converts the entire image to format -> RGBA -> scaled format.

  • SHAKE: Image Scaling

    http://tech-algorithm.com/articles/trilinear-interpolation-image-scaling/
    I am trying to scale an image with the above mentioned technique but cannot seem to find the best way to combine the images at the end of the process.  Anybody have any ideas?

    http://tech-algorithm.com/articles/trilinear-interpolation-image-scaling/
    I am trying to scale an image with the above mentioned technique but cannot seem to find the best way to combine the images at the end of the process.  Anybody have any ideas?

  • Image scaling issues

    I am using a 1280x720 PNG for the background in my Flash movie, but when I play it in fullscreen the image looks like crap. What's the best way to make images still look good when the movie is scaled up? Should I use a 1920x1080 PNG and scale it down instead?

    Let me help you understand.
    Resampling occurs even without scaling on any bitmaps with smoothing enabled. A pixel level detail loss is noticable immediately, pixels are resampled until blurred.
    Without turning on smoothing, the original image has no original resampling applied. Scaling performs a cleaner nearest neighbor resample that preserves hard pixels. At original size and while upscaling this produces a much cleaner result. While pixel edges are less resampled (upscale blur) the detail is still intact.
    While turning smoothing on, the original image is immediately resampled (bilinear, trilinear, bicubic, etc). The pixel detail loss is immediately obvious even at original scale. This blurring helps during rotation and reduction but during upscale the amount of resampling get heavier and heavier until the image is excessively blurred. The only slight benefit is edges appear smoother, but the reality is the edges are blurred to death. This is why it very limitedly helps to some people but really doesn't help at all.
    Here's an example of a small choice piece of a free Harley poster showing the effects of smoothing at original and 200% scales. An additional small portion of the original image is scaled 3x (nearest neighbor resampling (no smoothing)) to illustrate the difference in pixels even at original scale. The detail loss, while much less at original size, is still visible with smoothing.
    Example Image
    The top 3 images are with smoothing enabled. It's immediately obvious the level of blur is pretty harsh on the original image. The zoom-in shows the pixel blurring compared to the image with no smoothing below it. Color is shifted and muddied from bright to dark very noticably.
    The upscaled image is where the real destruction takes place. The curved tire, angled spokes and spring are the most harsh environment for nearest neighbor scale. Smoothing has blurred them so much in the resample they appear a lot smoother. Only it's so blurry you can barely look at the picture without your eyes watering. To a photographer, this is a throw-away photo, far too out of focus.
    The bottom image shows no smoothing enabled. The original size bitmap retains a great deal more pixel clarity and detail. The 300% zoomed image shows much brighter, more accurate colors having not been resampled. During the upscale the pixels are only nearest neighbor therefore you can see the extremely slight anti-aliasing performed. Hard pixels stand out more, much more true to the original image. Highlights on metals are still bright, colors are more accurate and more pixel level detail is exposed and enlarged. While edge enhancement would be nice, it looks far better without blurring the details and colors out of existence.
    Therefore smoothing really doesn't help upscale or even original size without pixel and color destruction. The best option is not to require Flash to perform any scaling on a bitmap unless edge-only resampling becomes available. The small benefit it gives is working with a far less quality bitmap which might render some slight performance advantages in memory ops for huge images. At the loss of detail, this is arguably more of disadvantage than advantage. 

  • Spacer image scaling

    I have the following code to create a stretchable background
    image for a title bar. titleBar_2.png is a single pixel wide image
    that should be stretched or duplicated to fill the title bar.
    <mx:HBox horizontalGap="0" width="100%">
    <mx:Image
    source="@Embed('../../../assets/titleBar_1.png')"
    scaleContent="false"/>
    <mx:Image
    source="@Embed('../../../assets/titleBar_2.png')" width="100%"
    scaleContent="true"/>
    <mx:Image
    source="@Embed('../../../assets/titleBar_3.png')"
    scaleContent="false"/>
    </mx:HBox>
    This does not produce the desired results. The image is
    placed properly but not scaled at all, so that there is a white
    space in the area where the image should have been stretched,
    followed by the last image.
    Anyone know what's going on and how to fix it?
    Thanks,
    j

    Hi,
    try maintainAspectRatio="false" property inside the image
    which isnt displaying properly.

  • Strange problem with image scaling when placed

    I'm currently running InDesign CS6 from the Creative Cloud, and it's version 8.0. I have a PC and am running Windows 8.
    I am experiencing a really odd problem when placing images, and it only recently (within the last two weeks perhaps?) has developed. I do ebook production for a publisher. I have an InDesign template (INDD file really, but "blank" and ready to be filled in, and as such I refer to it as a "template") that I use, and the cover for the book goes on the first page. The document is set to pixels as the ruler measurement, and the pages are 650 pixels wide by 800 pixels tall. The margins are all set at zero. The cover images are sent to me as JPEGs and always have the same size: 72dpi setting and 500 pixels wide by 750 pixels tall. This is chosen to be about the size of the full screen on most ereaders, or close enough to be so.
    So when working on a new book, I put my cursor in the blank line that is set up to take the cover as an inline image. I do control-D to place, select the file, and hit enter. This SHOULD place an image at that location that is 500 pixels wide and 750 pixels tall when looking at the InDesign page rulers. Instead, InDesign insists on placing this image at 50% scaling, so that it is only 250 pixels wide by 375 pixels tall. And in the link info panel, it shows the actual PPI as 72 and the effective PPI as 144. It does this no matter how many preference changes I try (including the ones under file handling and the import setting options).
    The strangest part is that if the file is just a tiny bit different than 500x750 @72dpi, then there is no problem. For example, if I open the JPEG in Photoshop and change the image settings to 500x750 @73dpi, then InDesign places it at 100% scale like I want. If I change the image to 499x749 @72dpi it also gets placed in InDesign at 100% scaling. I've tried this with various new INDD documents with settings in pixels, inches, or picas as the ruler amounts, and with different page or margin sizes (just in case the problem is with my template). I get the same result no matter what.
    It appears that InDesign somehow thinks that any image that is exactly 500x750 @72dpi should be scaled at 50% when placing it into an InDesign file. Has anyone else run across this? Is it a bug or something I'm doing wrong? I've been doing this exact procedure for over a year, first with CS5 and now CS6, and I've never had this happen until just recently. I suppose it COULD be an accidental change in settings or preferences. But if it is, I cannot figure out how to change it back.
    UPDATE: I installed the 8.0.1 update and it did not resolve the issue. I also tried more image options. It looks like this scaling to 50% upon placing ONLY happens when all three attributes match this: 500x750@72dpi. All of the following modifications to the exact same image placed in the exact same spot in the exact same document resolved the issue:
    501x750@72dpi
    499x750@72dpi
    500x751@72dpi
    500x749@72dpi
    500x750@71dpi
    500x750@73dpi
    But of course, I don't want to have to modify every cover image I'm sent in order to prevent this scaling issue.

    I just tried this and got the same results (CS6, 8.0.1, on WinXP SP3). One other tidbit: the same 500px × 750 px @ 72ppi image saved as TIFF instead of JPEG worked correctly (at least for me). I haven't tried any other image formats yet.
    This sounds like a good candidate for an official bug report: http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    -Bill

  • Acrobat X problem with image scaling in Excel

    We are using Acrobat X standard with Excel 2007.
    The problem is that when using the Create PDF button on the Acrobat toolbar within Excel, if the document has been scaled using Page Layout-Scale option within Excel, the resulting PDF has the image the correct size, but it has not been scaled. So the dimensions are correct, but only half of the image will be visible.
    To see what I mean, in Excel, add a picture, then choose Page Layout-Scaling and set to e.g. 50%. Check the print preview to see how it should look, and make sure you have a real printer selected in File-Print (NOT Adobe PDF printer). Then create PDF using the toolbar button. The image in the PDF will be wrong.
    This works fine if using native PDF converter (e.g. Save As PDF file) or by printing to the PDF printer, or by using the CreatePDF button when the Adobe PDF printer is selected as default in the print options.
    This seems to be a bug in X as in 9 it worked fine.
    Is there a solution to this?
    Thanks

    I should add, I updated to 10.1 and it did not resolve the issue.

  • Image scaling problem with object handles

    Hi,
    I am facing scaling problem.I am using custom actionscript component called editImage.EditImage consists imageHolder a flexsprite which holds
    image.Edit Image component is uing object handles to resize the image.I am applying mask to the base image which is loaded into imageholder.
    My requirement is when I scale the editImage only the mask image should be scaled not the base image.To achieve this I am using Invert matix .With this
    the base image is not scaled but it  is zoomed to its original size.But the base image should not zoomed and it should fit to the imageholder size always. When I scale the editImage only the mask image should scale.How to solve this.Please help .
    With thanks,
    Srinivas

    Hi Viki,
    I am scaling the mask image which is attached to imageHolder.When i  scale
    the image both the images are scaled.
    If u have time to find the below link:
    http://fainducomponents.s3.amazonaws.com/EditImageExample03.html
    u work with this component by masking the editImage.If u find any solution
    for scale only mask ,plz share the same.
    thanks,
    Srinivas

Maybe you are looking for

  • Help Needed With BB 8520

    Hi Got a New Black berry 8520 from Vodafone (My first). Day 1 was brilliant. The next day I synced it with my desktop using the BlackBerry Desktop Manager & it completely wiped out the OS of it. I then reconnected it, in 40 mins everything was loaded

  • HT201317 When I log into iCloud there is no photo stream option. Where do I find them on my Mac?

    When I go to icloud.com should I see a photostream option. I do not. It is on my iphone but where is it supposed to syn on my Mac?

  • Internet or Intranet Clients - Content Location

    Our current Configuration Manager 2012 R2 environment is running with existing servers and clients in intranet mode. We are wanting to add a server in our DMZ to support internet only mode for our DMZ servers.  Additionally, we are contemplating leve

  • How to create dynamic Textbox in JSP

    I created dynamic Textboxes using javascript in JSP.But i want to give every textbox a unique name..But I dont know how to give unique name to all the textbox which are created dynamically.....Can u help me Please............. <script code="text/java

  • Transform multiple rows to one single xml

    Hi! How to get only one xml (10gR2)? I found this example: set long 32000 SELECT XMLELEMENT("EMP_TABLE", (select XMLELEMENT("EMP_ROW", XMLFOREST(empno, ename, job, mgr, hiredate, sal, deptno) from emp where empno = 7369)) from dual; XMLELEMENT("EMP_T