Problem with image multiplication

Hi,
I am working on an image processing application and I have a problem with multiplacation of image. I use an autothresholding function to get a binary image. After thresholding I want to superimpose binary image with image taken with a traditional camera. The problem is that I need to multiply every pixel value of the binary image by 255 to get proper results of image fusion. To multiply image I used IMAQ multiply function which seems to work properly. After multiplication I need to convert image to array, so I used imagetoarray function. Unfortunately I don't get proper values after this operation - all array values are 0. I appreciate any help with this problem.
I attached the vi with added a comment next to the conversion function.
Attachments:
Image Fusion-single_image_ver3.vi ‏84 KB

I'm not sure if this is the problem, as I've only done a little image manipulation.  I believe that, by default (unless you specify otherwise), images are U8 gray-scale quantities.  If you multiply a U8 by 255 (Sgl) and express the result as a U8, the result will be 255 for all values except 0 (when it will be 0).
Does your thresholded image autoBthreshold 4 image look all black (or white -- I can't remember which color = 255)?  If so, then your code is "doing what you told it to do", which might not be the same thing as "doing what you want it to do" ...

Similar Messages

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened
    the following image:
    The image appears with a purple color in Photoshop. If I hover over the image
    with a tool like lasso, it temporarily regains it´s original color. The image mode is RGB Color, 8 Bits/Channel.
    I resetted the start settings of Photoshop with the CTRL-Shift-Alt-combination, which had no effect.

    The confusion arises from the imprecise error message in the Preferences > Performance dialog box, to wit:
    OK, that seems to be open to misunderstanding indeed.
    The video card: Citrix Systems Inc. Display Driver.
    Could not find a list for CS6 specifically, but the card may fall short.
    http://helpx.adobe.com/photoshop/kb/tested-video-cards-photoshop-cs5.html
    If I invoke View > Proof Colors, the only thing that changes is that the text in the brackets
    Also if you set View > Proof Setup to something different?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Problem with image url

    Hello,
    today I have a problem with image url. I wanted Image to change when mouse dragged over it. But nothing happened. Any ideas?
    def maxIco: ImageView = ImageView{
    image: Image{
    url: "{__DIR__}ikony/max.png"
    onMouseDragged: function(event: MouseEvent){
    maxIco.image = Image{
    url: "{__DIR__}ikony/max2.png"
    }

    This is working for me:
    src/main/Main.fx
    src/main/icon/image1.bmp
    src/main/icon/image2.bmp
    //Main.fx
    package main;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.input.MouseEvent;
    var changed = false;
    def imgView: ImageView = ImageView {
        image: Image {
            url: "{__DIR__}icon/image1.bmp"
        onMouseDragged: function (e: MouseEvent): Void {
            if (not changed) {
                imgView.image = Image {
                    url: "{__DIR__}icon/image2.bmp"
                changed = true;
                println(imgView.image.url);
        onMouseReleased: function (e: MouseEvent): Void {
            imgView.image = Image {
                url: "{__DIR__}icon/image1.bmp"
            changed = false;
            println(imgView.image.url);
    Stage {
        title: "ImageTest"
        scene: Scene {
            width: 700
            height: 600
            content: [
                imgView
    }I've changed few things to switch image only one time on mouseDragged event.
    It print the image URL.

  • Problem with Image.createImage()

    Hi all!
    I'm writing a simple midlet just to display an image on the screen and I'm having some problems with Image.createImage()
    Here is my code
    Image bg_img;
    ImageItem imageItem1;
    imageItem1 = new ImageItem("", null,ImageItem.LAYOUT_DEFAULT, "");
    try{
    bg_img = Image.createImage("/image.png");
    imageItem1.setImage(bg_img);
    catch(java.io.IOException e){
    e.printStackTrace();
    I'm getting an exception on bg_img = Image.createImage("/image.png");
    I can't understand what is it...:(
    I know for sure that the problem is not "file not found"
    Any one can help me???

    If you are catching IOException, then u may have problem with ur image path. "image not found on the specified path." if ur image is not in the current directiry then put it into current directory. otherwise, If u are using resouce folder and it is already included into the resouce path, then put ur image in that folder..try this..
    Still not get, then please give some detail about ur development toolkit. and ur apllication packaging scheem. are you using ANT?
    Pranav

  • Problem with image gallery

    Hi to all.
    With ios 5.01 I have a little problem with image gallery. As you can see I have only 1 image, but there is always this **** message "download 0 of 46) (sorry, but I'm Italian )
    I've removed my icloud account from settings, but there is nothing to do, this message don't goes away. What I can do? Thanks in advance

    Hello,
    Just adding a gallery I want to do the same slideshow WoodWing's, but in InDesign, if anyone knows of?
    Thank you
    Link video slideshow WoodWing's: http://www.youtube.com/watch?v=Xt6gNaEZ0-M&feature=relmfu
    The first slideshow shown

  • 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

  • Problems with Image Variants

    I got two problems with Image Variants:
    1. catalogCache.GetImagePath("Images", id) doesn’t work for some id. The error message is “GetImageVariant error”.
    2. catalogCache.Preload("Images", “Original”)
        catalogCache.Preload("Images", “Thumbnails”)
        catalogCache.Preload("Images", null)
       catalogCache.Preload("Images", "")
    get failed, the status code is -2147483647
    Anyone know how to setup  image variants?
    Thanks.
    Forrest

    status code: -2147483647 is RC_BADPARAM.

  • Copy and Paste Problems with Images

    I'm having the strangest problems with images. I copy an image off of the web for one of my art history classes and I go to paste into another program but, whether it's Keynote, Powerpoint, Photoshop, or Graphic Converter, something always goes wrong: the images definitely lose some of their quality, become brighter in appearance, and get jagged on the edges. This is starting to drive me nuts, especially since it never happened in 10.4 on my iBook G4. Any suggestions?

    Make it an 8-bit file (Image menu > mode).

  • Experiencing problem with image display in LR5

    I have an intermittent problem with images displaying and exporting in LR. It just began a couple of months ago and is totally random - will do it with RAW (CR2) or JPG. It displays this way in all modules - Library, Develop, Slideshow....The image displays fine in a non-Adobe image viewer (Faststone or Windows Viewer). I've reloaded LR5 and PSCC and is still persists. I know the image file is fine. It also has begun effecting older images that were showing up just fine a while ago. I just loaded about 200 images and maybe 3 or so have this viewing problem in LR & PS. Has anyone else experienced it and have a suggested fix? My graphics card has the latest drivers and shows no problems with other applications. Here is the same image - one a jpg export from Lighroom, the other a save as jpg from Faststone. HELP!

    This is almost always a hardware problem, causing corruption of the file. The difference you see between Lightroom and other software is that Lightroom is accessing the full RAW image, while the other software is trying to read the embedded JPG preview.
    To figure out exactly what hardware is the problem, you need to try different transmission paths and hardware ... different camera cards, different card readers or USB cables/USB ports, different hard disks, etc. Eventually you should be able to isolate the problem.

  • My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    I think that may be a consequence of the email provider she is using. Some services (AOL is one example) inspect and modify email attachments, particularly photos, resulting in reduced resolution compared to the email that was sent.
    The iPod does not do this. The resolution of the picture in the email she receives will be identical to what is imported.

  • Problems with "Image adjustments" in print menu

    I am having roblems with "Image adjustments" in the Aperture print menu.  When I try to use Brightness, Contrast or Saturation in the Image Ajustment section of the Print menu I get a white screen where my photo to print had been.  When I uncheck the Image Ajustments block my photo returns. 
    Has anyone else had this problem, and/or can anyone suggest a fix?  Thanks in advance

    Not seeing that here. 10.9.2 and 3.5.1
    Does it happen with all images? If so create a new library import an image into it and see if the problem still happens.
    If it happens with a new library try a doing it as a different user. Either use the Guest account or make a new user, make a nee library, import an image and try it.
    If it happens with just the one library try a library repair. If it happens with multiple libraries but just in the one user account try moving the Aperture preference file out.
    If it happens with he new user also try reinstalling Aperture.
    See Aperture 3: Troubleshooting Basics for direction on doing a repair or moving the preference file.
    post back if you still have the problem
    regards

  • Disk Copy 6.3.3 reports problem with image - but not always

    I have run across a problem with Disk Copy 6.3.3 that looks to me like a bug of some sort, but I can't be sure and want to see if anyone has any additional information. I am running Mac OS 8.1 on a Quadra 950, just in case it is important.
    I have saved almost all my old installation floppies as Disk Copy images and now use these images if I have to reinstall software due to failures of several original media. I recently had reason to reinstall software that was stored on multiple disk images and I could never mount them all without receiving the following error after some of the disks were mounted:
    +There is a problem with the disk {whatever the disk name is}.+
    +Some information may have been lost.+
    +Check any recently-used files for data loss, and use a+
    +disk-repair program on the disk.+
    After further investigation, I found that this problem not only affected this set of installation disks, but others as well. To make a long story short, I have found that I have at least two Disk Copy images that are causing this behavior. I have dozens of other images and they all mount successfully UNTIL I mount one of these two image files (there may be others, but I know of at least two at this time). After I mount either of these two images, many (I estimate more than 50%) of the other images seem to mount, but the message above appears after the mount completes. Some of the images seem to mount without errors, even after one of the two problem images are mounted. Unmounting the problem image does remedy the problem. The only way to mount images without errors again is to reboot.
    Has anyone seen this before and have any additional information? In particular I would like to know if I can trust the images that are giving me problems - in particular the two that are causing this situation, but also the ones that indicate data corruption? I'd also like to know if there is a real fix for this problem? If the data in these images is not corrupt, I could make floppies from them every time I want to reinstall software, but I'm not sure the data is good and I really don't want to have to try to find floppies just for an occasional reinstall. Thanks for any help!

    Well, I've got some additional information. I have a Macintosh LC running 7.5.5 that also has Disk Copy 6.3.3. I didn't copy the image files to the LC, but instead mounted them over the network, in a half-hearted attempt to rule out issues with disk I/O errors causing this problem. All images mounted without any errors. This pretty much eliminates any problems with the disk image itself being corrupt or with it being a problem with the content of the disk image causing a problem with Disk Copy 6.3.3.
    I had been having some signs that my current system disk on the Quadra may be ready to fail, so I added another disk, formatted it, and installed a fresh install of 8.1 on it. Before doing much of anything to customize the installation (no software other than on the 8.1 install disk, almost no settings other than the default, etc...), I tested the images again and they failed again. This eliminates any problems with third party software that I had installed previously. I even booted with extensions disabled and still got the error message.
    When I look in the Disk Copy log file, there are NO signs that any errors have ever occurred. This leads me to beleive that the message I'm seeing is not the fault of Disk Copy, but either the System or the Finder. My best guess right now is that once the image file is mounted by Disk Copy, that it is asking the System/Finder to do something that is either failing and produces the error message, or is returning an unexpected return code and causing Disk Copy to produce this message (which for some reason isn't being logged). If nobody has any clues from the additional information, I'll try reinstalling again with only a minimal install and see if I can figure something out. Thanks for any help that anyone might have!

  • Problems with images uploaded to Etsy

    Hi guys,
    I'm having a huge problem with thumbnail images on my Etsy front page being pixelated when viewed on my ipad mini. I tried a few times posting this to the Etsy help forums to no avail.
    Here's what I'm doing:
    ========================
    -I'm creating a new document in photoshop with pixel dimensions of 1000 x 800 (tried lower and higher), resolution of 72 (tried higher), placed an image taken by my 14 mp digital camera, and pulled in a background I found online at 72 dpi.
    -I'm saving this as a jpeg with the 'quality' at 12. I tried saving for web and lowering the file size, didn't work.
    Other info:
    =========================
    -Other people's thumbnails look just fine
    -When viewed on my laptop monitor as well as my external monitor, everything's peachy.
    -Larger views of the image as well as other thumbnail on other pages look totally fine, it's just the main page i'm having problems with
    -I haven't actually opened the shop yet, so maybe this is just a weird thing that Etsy does.
    Any help would be greatly appreciated. Thanks!

    I'm running version 2.1 (final) now but I still have the same problem and it's very annoying problem.
    Any help on this one?
    You've run into (what I believe is) a bug in how NitroX resolves URL-paths within a JSP. NitroX is "WAR-centric", meaning that it considers the WAR's context root to be the root of the entire web-application. So it resolves the leading slash in a URL-path (e.g. /images/...) to that context root. However, J2EE web-applications may consist of several WARs deployed in one or more EARs in a single app-server instance. This means multiple context roots at the same host:port. So the correct way to resolve a leading slash in a host-relative URL-path such as "/images/..." is to map it to the root of the host:port and not to the WAR's context root.In your example, the "/images/..." should be mapped by NitroX to the equivalent of "http://localhost:8080/images/..." and not to "http://localhost:8080/birka/images/..." Your original URL-path of "./images/..." (or just "images/...") should have been mapped by NitroX to "http://localhost:8080/birka/images/..." as it is relative to the current context root. So in summary, I think your original code is correct and the problem is with NitroX.
    I reported this bug a few months ago, but haven't heard any news of its being addressed. What do you say M7-support, any update on this?
    Thank you for your reply, I will get in touch with M7-support to hear with them status of this bug. I'm running version 2.01 Final, I haven't yet tested pre-releases since they are not final

  • Email attachment in PDF problem with Images

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    Regards,
    Lakshmikanth.

    Hi All,
    Can any one tell me how to solve the problem with Email attachment in PDF. If i remove the logo of the client in the Smartform i am getting the Email attachment fine but when i put back the image in the smartform the PDF is giving error and not opening the attachment.
    Regards,
    Lakshmikanth.

Maybe you are looking for