Import an image to black&white into array

Hello there.
I'm making a type of cutter, that cuts stamps out of potatos. Currently, the pattern is an array of booleans of 25x25, where you have to click what you want to see and then the program cuts it out. We'd like to add more functionality though, perhaps by allowing images to be imported and these should then get put in the array, according to black/white-scale.
I have absolutly no idea how I'd start doing anything like this.
Thanks in advance!

Hi,
You should use the File Dialog VI. Provide it with a promt name (appears in the windows bar). pattern label (image type name), file patern (extention like *.bmp or *.jpg) and a start path (folder you would like to start in). You will now get a popup which starts in the folder you provided and limits to the extention you provided. Se VI attached (LV 2011) for an example.
What falkpl ment with VDM is Vision Development Module. This is an addon which you can install onto LabVIEW. It gives you a large library of VIsion functions to work on your images. For more info goto:
Vision Development Module
NI IMAQ is a driver for our Frame Grabbers to capture images from cameras.
Hope this helps. Have a nice day
Rik Prins, CLD
Applications Engineering Specialist Northern Europe, National Instruments
Please tip your answer providers with kudos.
Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
Attachments:
Select file.vi ‏24 KB

Similar Messages

  • I am trying to import developed images from LightRoom 5 into Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another progra

    I am trying to import developed images from LightRoom 5 into Photoshop 6.  I am receiving this message and the images will not open.....'Could not open scratch file because the file is locked, you do not have necessary access permissions or another program is using the file.  Use the 'properties' command in the Windows Explorer to unlock the file'.  This has not happened before.  How do I change this?

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • How to find out embedded raster image is Black&White or Color image?

    Is there any possibility to find out the embedded raster image is Black&White, Gray image (or) Color image in "illustrator cs3" without using color mode shown in "document info" pannel. Kindly advice me, the possibilities and solution. And also any scripts avilable for this?
    Thanks.

    Or you could select the embedded image, and open the Window>Document Info panel. Select Embedded Images from the fly out menu on the Document Info panel. This should give you the color mode and more info on the embedded file in question.

  • Images turning black+white

    images turning black+white when dragging one image onto another this has only just started happening?

    Thanks but this seems to cured itself dont know how of why.Thanks anyway.Allan

  • Convert color images to black&white bitmaps

    Hi,
    I have black&white scans of public domain books (image format). I use an OCR software to convert them to indexable PDFs (image+text format). However, the OCRed PDFs are insanely big: a 27 MB scanned PDF leads to an indexable PDF of 728 MB! And unfortunately, my OCR software doesn't have output settings, so I have to find a way to compress the files using Adobe Acrobat 9 Pro.
    Using Advanced Options > Optimization does reduce the file size, but not significantly. The problem seems to be that my OCR software converts the black&white scans to color images, and encodes them as such inside the PDF. So I need a way to set the image modes back to black&white. I tried using the Advanced Options > Preflight dialog, and selecting "Convert to black&white". However, the resulting PDFs stay about the same size! It seems that "Convert to black&white" converts the images to grayscale, instead of to bitmap.
    Any help would be appreciated!

    I mentioned "bitmaps", because when I open the original PDF and right-click a random page and select "Modify image..." and open the image in Photoshop, the mode is set to "Bitmap mode": meaning 1-bit mode, containing either black or white pixels. However, when I do "Modify image..." for the OCRed PDF, the mode is set to "RGB Color Mode". I think this explains, in part, the huge size of the OCRed PDF.
    Maybe this table will make it more clear:
    Original PDF (Bitmap Mode, 132 dpi)
    Size: 27 MB
    OCRed PDF (RGB Color Mode, 300 dpi)
    Size: 728 MB
    Now, from the table above, it's clear that I have to reduce the image resolution. So, using the Acrobat's PDF optimizer, I tried the following settings:
    Optimized OCRed PDF: Try 1 (Downsample to 132 dpi, JPEG compression)
    Size: 733 MB
    Optimized OCRed PDF: Try 2 (Downsample to 132 dpi, ZIP compression)
    Size: 449 MB
    But 449 MB is still huge for a single book. And I don't want to reduce the resolution under 132 dpi, because I will loose quality. Clearly, if the original document is just 27 MB, I should be able to squeeze the OCRed document too. But I don't know how.

  • How to import selected images from iPhoto 11 into Elements 9?

    How do I import selected images or events from iPhoto 11 into albums in Elements 9 Organizer?  I don't want all my thousands of images in Elements.  Both iPhoto and Elements 9 are updated.

    I don't use iPhoto much at all, but you can set it to use PSE (or any other real image editing app) to edit the images you store in it. Check the iPhoto Prefs (command comma) and look at the General tab. Select PSE or any other app in the "Edit photo:" pop-up menu. That way you can still keep iPhoto for storage/filing and PSE for editing. Hope that helps.

  • Colour image on  black & white photograph

    How can I convert a colour photograph to part black & white? I believe I need to de-saturate to start with, but that's as much as I know.

    John,
    Since you asked about selection, here's an example using the Magic Wand and Selection Brush tools.
    http://home.earthlink.net/~msand42/PSE/Selection%20Brush/album/
    In the 1st shot I used the Magnetic Lasso to select the cat. This  worked well since the outline of the cat contrasted with the background. For purposes of my example, I then cut off from the selection the top of his head and part of his paw, and selected a part of the blanket.
    In the 2nd shot I activated the Selection Brush tool with the Mode option set to Mask and inverted the selection. Now the cat is masked in red.  Note that the default Overlay value is 50% so that you can see through the mask. You might need to modify the Overlay so that you can see enough detail to paint the mask (next step). As you can see, the two missing portions of the cat are not masked and the excess blanket is.
    In the 3rd shot I painted to fill in the missing portions of the cat. To erase the excess on the blanket I held down <Alt> while painting.  You can adjust the size of the brush to get the necessary level of detail for painting.
    In the 4th shot I inverted the selection and and set Mode to Selection to get back to the normal view showing the selected cat.
    Of course if you have a steady hand you can simply draw the selection using the Lasso tool, but I wanted to demonstrate how you can fine-tune it with the Selection Brush.

  • Ae cs5 importing seq images all blacked out or only one frame - help

    I created a pan background and keyframed it and it is working fine. I then brought in pngs with transparent background as a seq and the image is all black when they imported into ae cs5 once one image was brought in correctly (the first image of the seq). I have batch converted to psds with same results. What am I doing worng importing in seq to work over the pan background?
    And I have tried PSD image sequence file - it only brings in one frame.
    Message was edited by: l1o1t1r1

    I just did some tests. If you export the png's using the save for web and other devices and png 24 then things work fine with grayscale images. If you save grayscale images as png's directly then the png's are aparently saved as png 8's so they won't work properly in After Effects. Any pixel not completely white is rendered black.
    To be honest I've never run into this before. It may be worthy of a bug report.
    I'm not sure what technique you're using to remove the background from the originals but a jpg made from the original png file can be used as an Luma Inverted matte on a black solid to create the transparency. A little adjustment to the jpg sequence with levels will clean up most of the garbage. This would give you an acceptable result without resorting to a bunch of processing to try and create transparent pngs.

  • Importing jpg images saved in Photoshop into iPhoto'11 albums

    I edited some photos in Photoshop, saved them as jpgs and then tried to import them into an iPhoto '11 album without success. Although I saw a green plus sign, the photos did not appear in the album. I have done this without a problem in an older version of iPhoto (7?) on an older computer. Why won't it work now and how do I get the edited photos into my album?
    Thanks.

    You can't import to an Album. You import to the Library and then you add them to a Library. Check your Library those images will be there.
    Regards
    TD

  • After importing an image from cs5 back into lightroom, lightroom is making the image darker

    Lightroom is making my images darker after i edit them in photoshop cs5 and I dont know why. When i open the image back into photoshop it looks fine. Even when i save it as a jpeg lightroom is making the image darker. When i imported the raw image into lightroom before i edited into photoshop it looked fine. Is there a way to fix lightroom?

    See screen shot:
    Click on the two small triangles and under <Lightroom General Presets> select <Zeroed>. Sorry, it seems that the option <None> is not available anymore in Lr 4.3. But <Zeroed> has the same effect.
    Alternatively, in the Develop Module, bottom right, just above the film strip click on <Reset>.  See screen shot:

  • Converting RAW images to black & white

    Hello,
    I am trying to use the Adobe RAW Converter of PSE 12 to convert a RAW image (that was shot in monochrome) to grayscale, BUT the grayscale tab is missing? Any idea, where this tabe went to?
    Thanks you,
    Karen

    Try clicking the open image button (bottom right) to send the photo into the regular editor as an 8 bit file.
    Then use the menu:
    Image >> Mode

  • Using a script to get the color of a colorized Black & White Bitmap image

    I've been running into this wall for quite some time and would greatly appreciate any help that can given for it.
    I have an Illustrator script that runs inside of a BridgeTalk session within an InDesign script.  Yeah, it's complicated.  The upshot is that the Illustrator part opens up an EPS file, looks through all objects on a certain layer in that file, and returns an array of the colors used in it.  So, it looks at fill colors, stroke colors, gradient stops, etc.  One of the biggest stumbling blocks (next to PlugIn Items, which I'll ask about in a separate post) is getting the color of raster images.
    Most raster images, I realize, are going to be CMYK or RGB images, but our company mostly deals with either Grayscale images or Black & White Bitmaps that are embedded in the EPS file.  Those two allow the ability to colorize them by simply selecting them and then choosing a color, such as a spot PANTONE color from one of their color books.
    Now, I need the script to read the color that the raster image has been colorized with.  This works okay for images that have a GrayScale color space, as the script just looks at Colorant[0] of that image.  However, I run into a problem with Black & White Bitmap images.  Here's a piece of code that I try to make work with an EPS file that has a raster image:
    var document = app.activeDocument;
    for (var i = 0; i < document.layers[0].pageItems.length; i++) {
              // Stepping through each item on the layer.
              var currentItem = document.layers[0].pageItems[i];
              $.writeln("Current item is " + currentItem.typename);
              $.writeln("Number of channels is " + currentItem.channels);
              $.writeln("Color Space is " + currentItem.imageColorSpace);
              $.writeln("Colorized Grayscale? " + currentItem.colorizedGrayscale);
              $.writeln("Number of Colorants: " + currentItem.colorants.length);
              for (var j = 0; j < currentItem.colorants.length; j++)
                        $.writeln("Colorant number " + j + " is " + currentItem.colorants[j]);
              $.writeln("Its parent is " + currentItem.parent);
              $.writeln("Parent's typename is " + currentItem.parent.typename);
    This code runs successfully on an Illustrator file that has a Black & White Bitmap image on the top layer, but if you try and run it, you'll see the problem:  Even if you've colorized your Bitmap image with a PANTONE spot color (and the script even returns "true" on the line "Colorized Grayscale?"), Colorant number 0 is "Gray".  It should be the spot color assigned, not "Gray".
    Can anyone please help me figure out how to get the script to recognize the actual colorant of a Black & White Bitmap image in Illustrator?

    If you're a professional photographer with 50,000 pictures stored now and more coming all the time, you need to forget about using iPhoto and get yourself some professional-quality digital asset management software. iPhoto is not meant for people like you, and instead of providing a simple, elegant one-stop answer to all your needs, iPhoto is actually complicating your life.
    You need an application that will:
    - catalog ALL your images and keep track of where they are, no matter how many DVDs, folders, partitions or hard drives they're spread over;
    - display thumbnails of ALL of them, even when the DVD that contains them is not present in any drive, so you can select all the ones you want for a project;
    - find and copy (or export) the originals of all the files you've selected in the browser window, even if it means prompting you to insert the necessary DVDs for all of them.
    I suggest Googling "digital asset management software Macintosh" and seeing what turns up. I used to use an old version of Extensis Portfolio, and even that would have been better for your purposes than iPhoto is.

  • How can i load or put an image into array of pixels?

    i am doing my undergraduate project , i am using java , mainly the project works in image manipulating or it is image relevant , few days ago i stucked in a little problem , my problem is that i want to put an image scanned from scanner into array or anything ( that makes me reach my goal which is go to specific locations in the image to gather the pixel colour on that location ) , for my project that's so critical to complete the job so , now am trying buffered image but i think it will be significant if i find another way to help , even it isn't in java i heared that matlab has such tools & libraries to help
    thanks .....
    looking forward to hearing from you guys
    Note : My project is java based .

    Check out the PixelGrabber class: http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/PixelGrabber.html
    It's pretty simple to get an array of Color objects - or you could just leave it as an int array - though it can be somewhat slow.
    //img - Your img
    int[] pix=new int[img.getWidth(null)*img.getHeight(null)];
    PixelGrabber grab=new PixelGrabber(img,0,0,img.getWidth(null),img.getHeight(null),pix,0,img.getWidth(null));
    grab.grabPixels();  //Blocks, you could use startGrabbing() for asynchronous stuff
    Color[] colors=new Color[pix.length];
    for(int in1=0;in1<colors.length;in1++){
    colors[in1]=new Color(pix[in1],true);  //Use false to ignore Alpha channel
    }//for
    //Colors now contains a Color object for every pixel in the image//Mind you, I haven't compiled this so there could be errors; but I've used essentially the same code many times with few difficulties.

  • CS4 Black & White Adjustment - Missing Sliders ?

    In CS3 the Black & White Adjustment Layer dialogue offered two sliders for adding a tint. These were Hue and Saturation, and were delightfully easy to use.
    In CS4 the Black & White Adjustment Layer non-modal tab does not have these two sliders; instead you have to click on the square called tint which opens up the Select target color: dialogue. OK so hue has a slider, but adjusting the saturation requires entering a figure into a box (or all the arrow key stuff). Not anywhere near as convenient nor intuitive as sliders.
    It is possible to regain this flexibility by directly converting the image to Black & White using the Black & White conversion dialogue available from the menu, but then this means that it has to be on a copy of the image and is, therefore, not re-adjustable later.
    Is it possible to have the modal dialogues back for Adjustment Layers, along with all the adjustments previously available, or are CS4 users stuck with the Adjustments Panel - as is ?
    Any other suggestions for getting these two useful slider back ?
    (but why take them away in the first place ?)

    We are at cross-purposes here:
    Simon is talking about using a
    Black and White Adjustment Layer.
    It is in the palette for that kind of layer that you will see the Tint Box with the little colored square beside it.
    If you check the Tint Box and then CLICK on the little colored square, you will open the regular Color Picker (as shown in # Eight).
    At that time, Sliders are available for any selected channel, or choice of input, when you click its dedicated Radio Button.
    Sliders for Colorizing can be reached from a Hue/Sat Adjustment Layer but that is a different scenario from the one which Simon was talking about.

  • How can I import selected images from a folder instead of the whole folder in iPhoto 9.5.2?

    Hi there,
    I was trying to help my parents import some photos from a folder they have created with photos from their holiday. They only want to import select images from this folder into iPhoto. I said it would be easy and they can do it in 2 ways. First, they can drag and drop selected photos from their folder into iPhoto - and this works for them. However, more convieniently, they can click file>import to Library and then select the photos they want by going into the folder... Well that's how it works on my iPhoto '11 at least. When they showed me their screen via Skype (they are running iPhoto 9.5.2), when they click import to library, and try to go into the folder containing their photos, it imports the whole thing and there appears to be no way that they can enter the folder to select just a few photos from what I could see.
    Does anyone know anything aout this problem?
    Cheers.

    What view are using in the Import dialogue. Column view might be easiest to navigate.

Maybe you are looking for

  • Time Machine: is it possible to leave some data on time machine, but remove it from my mac?

    At the moment I have around 60gb of photos on my 250gb macbook pro, which I have been told is slowing it down. I would love to have it somewhere safe away from my mac but I'm scared to use an external hard drive because of many horror stories I've he

  • Reporting Agent: Columns not showing up

    After the print settings have been created for a query (in Reporting Agent), all the columns are not showing up. What could be the reason. Someone please help, I will definitely reward. Farhan

  • Servlet from Webdynpro

    Hi, Anyone tried launching a servlet from a webdynpro application. Were you able to manage the session in both the applications?

  • HELP, I have listened to the same music for 4 years.

    I have an older ipod (10KG, no color) and I downloaded a bunch of great music 4 years ago through itunes but on my parents computer, and when I moved out the music got erased. I really want to download new stuff to the iPod but im afraid of loosing w

  • Help: Can't iSync with Nokia E71

    I'm on Leopard 10.5.8 and using Nokie E71 and was able to iSync fine between the 2 until recently when the error message below keeps popping up. *Connection to the phone failed.* *Please make sure that your phone is turned on. If this error occurs ag