How do you write an image threshold to a file

Hi, I use IMAQ threshold to threshold an RGB image. How do I write this image to a file? Whenever I use the IMAQ Write JPG or Write PNG vI and try to view the file with the windows image viewer all I see is a black image. Does anyone know how to save a binary image?

If you cast it to an eight bit image and save it as a BMP or JPEG does it show up correctly? If so the problem probably lies in the fact that a 16-bit image in LabVIEW is signed, while third party viewers usually assume that it is unsigned. So rather than pixel values going from -32766 to 32767, they go from 0 to 65536. There are example programs on ni.com to get around this. One is called "Mapping a 16-bit Image to an 8-bit Image," another is called "Bit Shift an IMAQ Vision 12-bit Image and Resave for External Viewer." If you search for these titles on the ni.com search bar, you should be able to find them.
Kyle V

Similar Messages

  • In Lists - How do you write an Image and Attributes in the defined fields?

    I have tried #IMAGE_PREFIX#load_ascii.gif with no results..
    then tried /i/load_ascii.gif
    then tried load_ascii.gif
    Can you give me an example or something else is wrong because just a diamond bullet is showing up? Trying to emulate the Run icon in the Application Developer's home Page.. or is this the wrong way of doing it?

    Using a list, I want to apply an image from the /i/ folder. In the List Entry Area under Label and Sequence I tried several syntax varations with no luck in the Image and Image Attributes Fields. With the List Entry Label I want to display and Icon (Image) they can click on with the List Entry Label below the image.. I've tried #IMAGE_PREFIX#load_ascii.gif with no results..

  • How do you write a class to return a file?

    So I've read http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
    But I still do not know how to pass a file to a calling method of another class. How does the FileChooser class retrun the file. Please help.

    You mean something like this?
    import java.io.File;
    public class FileTest {
         public File getFile(String path) {
         //Example path =  "C:\\path\\to\\file.txt"
              return new File(path);
    }

  • How do you shuffle the image order when creating a new slideshow in apterture 3?  i would like to do this automatically when creating a new slideshow.  i see how you do it when you just play a slideshow.

    how do you shuffle the image order when creating a new slideshow in apterture 3?  i would like to do this automatically when creating a new slideshow.  i see how you do it with presets when you just play a slideshow, but i don't see an option to randomly shuffle the slide order when you create a new slideshow.  i know you can sort it by different fields, but i want it to be random.  thanks.

    If you want to rearrange images in random order you can try an AppleScript:
    retrieve a list of selected images from Aperture
    shuffe the list properly
    create an album in Aperture and add the images from the list to the album (make sure that the album set to be orederd manually)
    Here  is a sample script that shuffles the selected images and displays them in random order in Full Screen Mode:
    on removeItem(ims, i)
      -- remove the item at position "i" from a list ims
              if ims is {} then return {}
              if (length of ims is 1) then return {}
              if i < 2 then return rest of ims
              if (i = length of ims) then return (items 1 thru (i - 1) of ims)
              if i > (length of ims) then return ims -- should be error?
              return (items 1 thru (i - 1) of ims) & (items (i + 1) thru (length of ims) of ims)
    end removeItem
    on shuffle_items(ims)
      -- shuffle the items of the list "ims" randomly
              local numitems, ims_shuffled, nextrest, nextpick, i
              set numitems to length of ims
              if length of ims < 2 then return ims
              set ims_shuffled to {}
              set nextrest to ims
              repeat until nextrest is {}
                        set i to (random number (numitems - 1)) + 1
                        set nextpick to item i of nextrest
                        set beginning of ims_shuffled to nextpick
                        set numitems to numitems - 1
                        set nextrest to removeItem(nextrest, i)
              end repeat
              return ims_shuffled
    end shuffle_items
    on shuffleIms()
      -- retrieve the selected images from Aperture
      -- and display them in random order in full screen mode
              local imageSel, shuffled, i
              tell application "Aperture"
      activate
                        set imageSel to (get selection)
                        set shuffled to my shuffle_items(imageSel)
                        set fullscreen to true
                        if imageSel is {} then error "Please select some images."
                        repeat with i from 1 to count of shuffled
                                  reveal {item i of shuffled}
      delay 3 -- chnage that to the time you want
                        end repeat
                        set fullscreen to false
                        return shuffled
              end tell
    end shuffleIms
    shuffleIms()
    Some more code snippets to go from here:
    To create an album:
                        tell library 1
                                  if not (exists album "shuffledAlbum") then
      make new album with properties {name:"shuffledAlbum", image version:shuffled}
                                  end if
                        end tell
    And to add the images from the shuffled list to the album:
                        repeat with i from 1 to count of shuffled
                                  duplicate item i of shuffled to album "shuffledAlbum"
                        end repeat
    Regards
    Léonie

  • How do you write sideways in Pages?????

    How do you write sideways in pages w/ the page upright?

    This awesome tip solved my issue; it works with graphics, too. Thanks very much!!!!!!!
    Create a text box, type what you want in it, then
    rotate it using the Inspector (Select the text box,
    go to the "metrics" tab of the inspector, and rotate
    it with the little wheel).

  • How do you add an image in the signature

    Hi,
    How do you add an image to the signature area.
    The Insert/edit image is not available when in My Settings | Personnel Info | Signature
    Regards
    Ray Farmer

    You need to link the image.  See the example for the Canada flag below.
    <img src="http://forums.ni.com/ni/attachments/ni/130/6908/1/Canada-small.PNG" border=0>
    Replace with the image you like.  This goes into the signature box within the profile tab of the personal settings.
    RayR

  • How can you upload an image to MYSQL using php?

    Ok this is a joint thread with one of my other ones because no one else  was posting on it, so I did not get what I needed, so, How can you  upload an image to mysql so when some one logs on to my site, they see  or can upload there own avatar, now there are loads of problems with  this, 1) many people don't know how, 2) It's not every day you try to  encode a image into mysql, 3) Letting people upload images into mysql  can cause traffic problem with people trying to log in. So that's it.

    Uploading images into MySQL is a bad idea, for more reasons than you mention. You should store the images in a directory on the server instead. But if you want to learn the hard way, here is the method:
    The mysql data type must be blob.
    The form enctype must be multipart, like this: enctype="multipart/form-data"
    The form input field myst be type file, like this: <input type="file" name="upload"/>
    Here is example code that prepares the variable $photodata to be inserted into the database.
      $uploadfile = $_FILES['upload']['tmp_name'];
      $photoname = $_FILES['upload']['name'];
      $uploadtype = $_FILES['upload']['type'];
      if ($uploadfile != "") {
    $tempfile = fopen($uploadfile, 'rb');
    $filesize=filesize($uploadfile);
    $width=getimagesize($uploadfile);
    $widthx=$width[0];
    $heightx=$width[1];
    if (($widthx > 102) or (heightx > 135)){
    $image_too_big = " but the image size was too large and was not submitted.";
    } else {
    $photodata = fread($tempfile, filesize($uploadfile));
    $photodata = addslashes($photodata);

  • How can you add an image in Mail without being an attachment?

    How can you add an image in Mail without being an attachment?
    In otherwords I'd like to put my logo in the email not as an attachment but as an image.
    Is there a simpel solution to this problem?

    PBN1 wrote:
    How can you add an image in Mail without being an attachment?
    You don't.
    It's not possible. The e-mail protocol is designed for text; anything else has to go as an attachment.
    Different mail clients (such as Mail.app, the mail client bundled with Mac OS X) may have different ways of handling such attachments, but they are still attachments. Each mail client has its own rules and methods, so one may display a picture as if it were in the body of the message, but another client may do something completely different.
    A way of faking it is to format your message in HTML (which is a kind of text). The image is hosted on a remote server, not added to the message; instead, you include a link to it in the body of the message, as you would when building a web page. (This is also what the two tips helpfully provided by X423424X do, except that the link to the image is added in the signature, rather than the body of the message.) What exactly happens to it is, again, at the discretion of the mail client. In my case, for instance, displaying images in HTML messages is turned off, and will stay resolutely off.

  • Sorry I'm new to Final Cut Express. How do you make an image (jpeg file for example) move across the screen slowly as I've seen in many films.

    Sorry I'm new to Final Cut Express. How do you make an image (jpeg file for example) move across the screen slowly as I've seen in many films.

    Neil from bristol wrote:
    … How do you make an image … move across the screen …
    by setting KEYFRAMES
    (read, what FC/e's built-in Help-feature tells about it)
    resize and set pic to start position
    set keyframe
    move playhead in timeline to desired length
    set pic to end position
    set keyframe …

  • How do you write on the documents useing using work space

    how do you write on the documents using work space

    What type of documents are you trying to write on?

  • How do you select an image in keynote?

    how do you select an image in keynote? I am trying to reduces my image file size but when clicking on image to reduce it I seem to be selecting the mask and hence format/image does not provide me with an option to reduce the image

    Click on it to select.
    Click and drag a corner handle to change the image size on screen.
    This does not alter the file size.

  • How do you delete the images in the Iphone images album.  Not the camera roll.  There is an album called Iphone images and there is not a delete option

    How do you delete the images in the Iphone images album.  Not the camera roll.  There is an album called Iphone images and there is not a delete option

    The same way you put them on the phone. Connect the phone to iTunes on your computer, click on the name of the iPhone, then the Photo tab. Uncheck the albums you don't want on the phone and click Sync.

  • How do you write UNDO for a text item?? examples? or a REDO??

    How do you write UNDO for a text item?? examples? or a REDO??
    I created a pop-up menu with CUT, COPY, PASTE, UNDO, CLEAR for my text items.
    Using MAGIC menu type works great but there is no MAGIC for UNDO or REDO.....
    How do you write UNDO for a text item?? examples? or a REDO??
    I have Oracle Forms 6i...
    Lets say I highlight all the text in the text item, and start typing over it... then I realize OH NO it is the wrong text field...
    Now I want to UNDO the typing and get back to the previous text.
    I'd use the initial value that was populate right? How do I access that if that is correct?
    Thanks, Bill

    You can use;
    <ITEM> := Get_Item_Property(<ITEM>,DATABASE_VALUE);
    Or you will have to write a pre-text-item trigger;
    PRE-TEXT-ITEM:
    :CTRL.CURRENT_VAL := :<BLOCK>.<ITEM>
    MENU (PL/SQL):
    :<BLOCK>.<ITEM> := :CTRL.CURRENT_VAL;
    You may also want to set the item property back to ITEM_IS_VALID so that item validation does not fire again.

  • How do you show thumbnail images for the contacts?

    How do you show thumbnail images for the contacts on the iPod?
    -Thank You

    In another thread I posted a suggestion to try when the iPhoto app in the Application folder will not work:
    after upgrading the OS, iPhotos (and Aperture for that matter) should still be in the Applications folder...
    And running well in 10.10.3.
    If it stops running in a next "update" do not throw it away: most apps will continue running as follows:
    In the Applications folder "rightclick" (CTL+click) the iPhoto app, then "show package contents", then click the MacOs folder open: you see the real app (dark grey), rightclick this and choose "make alias", an alias is made, move this alias to the Applications folder and use it to run iPhoto.
    Same for Aperture.
    In older OS this survived several upgrades....
    Lex

  • How do you get Raw images form a Canon 60D to open up on Photoshop Elements 9!

    How do you get Raw images form a Canon 60D to open up on Photoshop Elements 9! I tried downloading the Adobe Camera Raw 6.2 update and Elements is not recognizing the file to install!

    Go to Help>Updates in the editor and do it that way instead.

Maybe you are looking for

  • Question about camera file generator

    Dear all, I was trying to set up my camera with the frame grabber using camera file generator. My camera is a linescan camera, which is 1024x1 pixels. My question is, in the camera file generator, I can choose to display maximum number of rows which

  • TS1717 Itunes want start because it is missing MSCVCR80.DLL file.

    Itunes want start because it is missing MSVCR80.dll file.

  • Personal Oracle 8i on Win 95 ?

    Hello everybody. Is there any chance to get Oracle 8i PE to run on Windows 95 ? Or is there no way than upgrading to 98 or ME (using 8.1.7) ? Or is there a PE of Oracle 8.0 running on 95 ? Harald Henkel

  • CREATE OR REPLACE DIRECTORY

    Hi, I have a doubt.. I'm trying to create an Oracle directory: CREATE OR REPLACE DIRECTORY PROTPL[b]-RP[b]-01_TPL_DB AS '/utl_db/skedul/protpl-rp-01'; But I get an error: Message Code ORA-00905 was not found. Please verify and re-enter. Instead using

  • MIDI events are crazy.

    When I create some events in the "matrix" and try to edit them, those edited events will cause a delay. It sounds like if every note was note quantized.