IMAQ: "image to array" directly wired to "array to image" seems to have a pb with U16

Hello.
I am using the two VIs "ImageToArray" (ITA) and "ArrayToImage" (ATI) to do some image processing, and I've noticed something strange I'd like to share with you.
I am acquiring 16bits data from a GiGe camera. If I wire the output image of the camera to the ITA VI, and then I wire the output of ITA directly to the input of ATI, I cannot get the image back!
Look at the files I attached. Image2 should simply show the same picture as Image1, shouldn't it...? But it doesn't!
Did I miss something, maybe...?
Does anyone has an explanation/solution?
(If it might be of any importance, please note that the camera dynamic is 12 bits. But I don't think that would change anything if it was 16 "full" bits...)
For your information, if I try to do exactly the same with 8 bits data, then it works perfectly fine. Only when the camera returns 16 bits data si there a pb.
Best regards.
Luc
Solved!
Go to Solution.
Attachments:
ImageToArrayToImage_Diagram.png ‏3 KB
ImageToArrayToImage_Front.png ‏194 KB

I think, your camera deliver I16 image, but you using U16 - therefore array is empty and you see nothing.
Try to use I16 instead:
(and check all your image's types and control error outputs)
Andrey.

Similar Messages

  • Manually upload images after they have been published with Muse?

    I am really loving how quickly Muse is allowing me to build a website, however I am really disliking how it handles my images, specifically compressing them with poor results.
    I read that you can add a single pixel of transparency, I tried this, seems like a lot to do for a large gallery and also the final results were still not great.
    I would like to have full control of this myself in Photoshop and then just upload the images overtop of what Muse has published, is this possible?
    I would also like to do this for all my thumbnails.
    Any help or info is appreciated.
    Please take a look.
    http://mikrosm.businesscatalyst.com/gallery.html

    Hi,
    It is very much possible. You can upload your finished images externally to the web server using any FTP tool or other means.
    All you need to take care of is the image dimensions and the location of images is not changed, since that may cause issues with your site's layout and display.
    Hope that helps.
    Cheers,
    Vikas

  • Preview freezes when trying to open images - other programs have no trouble

    Preview freezes when trying to open images - other programs have no trouble with the same file. This problem is somewhat intermittent.
    I have replaced the Preview application by moving a copy from another equivalent machine - no luck.
    Did not find any preferences file trash, though I looked.
    Is there one?
    Any suggestions?
    Thanks.

    Edwin,
    The .plist for Preview should be located @ ~/Library/Preferences/com.apple.Preview.plist (where "~" is your Home folder).
    Trash the file, logout/login or reboot your computer and try opening the app and opening the offending file again.
    Let us know if any luck with finding the .plist there and opening your file?
    littleshoulders [:-)

  • How to convert imaq image to a 2D array without vision development module

    Hi,
    I'm looking for a way to convert an Imaq image into a regular picture (2D array) without using "Vision development module", nor saving it to a file (I need a refresh rate of about One frame per second).
    any ideas?
    thanks,
    Gilad.

    Greetings, 
    If instead of attempting to acquire the image as the raw data as per the last example, are you looking for something then like the IMAQ Image to Array? I made some research and initially I believed this VI was part of the Development Module, but I was thinking of the Array to Image VI, which is why I did not bring it up earlier.
    Finally, how exactly will you then be manipulating that array? Or will you simply be interested in displaying it? 
    Cordially;
    Simon P.
    National Instruments
    Applications Engineer

  • IMAQ image to array vi not working with images extracted from avi file

    Hi,
      I downloaded some avi's and uncompressed them so that I can analyze them within labview. I am trying to convert images I am reading from the avi file to an array. When I use "IMAQ image to array" I get the following error " IMAQ Image To Array  Invalid image type" -1074396080.
       I am able to display each read image and save them to the hard drive, but I am unable to convert the vision image to array. I verified that the image extracted from avi is the same as the image type I created in memory to hold the image.
      Please see the attached vi I created.
    thank you
    Ruz
    Attachments:
    example2.vi ‏62 KB

    Hi all, this thread was useful for me...but i have another doubt... when I try to extract a single plane (Luminance, Saturation, R,G,B...anyone) and try to save it in jpg as gray image, it saves an image with blue tones. I have examinated it using Matlab and checked that Red plane has low values (but not zero), the same for G plane and high values for B plane. An image of the VI is attached.
    Thanks in advance
    Attachments:
    planes.png ‏28 KB

  • How can I use or convert a imaq image to plot images back on waveform graph

    Hi
    I am currently opening and manipulating (rotate and resize) a PNG image using IMAQ Vision in LabView 8.2.1 This works well and I can display the Image on the front panel using a IMAQ Image Control.
    In addition to this I would now like to display the image as a background on waveformgraph. I can do this with the original PNG file by reading it and then flatten it to a pixmap ie make it a Picture but this is of little use as I need to use the manipulated IMAQ image.
    Therefor I would like to know how to convert the manipulted IMAQ Image to right Picture Format (without resaving) in order to use it on the PlotImages.Back property node of a wavefrom graph.
    I very much welcome your suggestions as I feel it should be easy yet can not seem to solve it. Thank you for your time!!!

    Hi Randall
    Apologies for replying somewhat late but I have been out of the office for a few days.
    Your suggestions and code helped me greatly and led to solving my query so thank you for that.
    There is one more thing (well many many more but I will place new posts for those  however that you might be able to answer for me.
    Following your suggestion to use the image to array function I searched through more examples and found the code that did exactly what I wanted to do. Please see attached.
    In this code a For loop is used to add 65793 to the color table. It works very well but I do not know why it is used exactly. Can you exlplain? I also realize I never made it clear that I use grayscale PNG files rather then color images.
    Thanks again for your excellent help, it is much appreciated.
    Attachments:
    IMAQ_8-bit_to_picture v1.vi ‏15 KB
    Test Image.png ‏42 KB

  • Handling IMAQ Images in the TestStand Opeator Interface

    I'm modifying the LabVIEW Operator Interface to display images from IMAQ VIs on the front panel. I've got it to work a number of ways, but never if I compile the interface into an executable.
    I've tried using the "IMAQ Image Cluter to Image Dataype" and "IMAQ Image Datatype to Image Cluster" vi's to store and pass references to the Operator Inteface. It works in development mode but not when built. I understand this won't work as the reference is local to the adapter you are using so I abandoned that.
    I've tried storing the Image into a global VI and then reading that global VI in the interface for display. I've made sure to call the Global VI dynamically in the operator interface so I'm using the same VI and not one compiled into the executable. It works in development mode but not compiled. Don't know why.
    Another method I tried was to use the "Flatten To String" and "Unflatten From String" functions to store the image in a local string (as a binary string) in the sequence. I then tried accessing the local with the "ProperyObject" Method "GetValString" in the Operator Interface VI. When I try this I get an error and the development system shuts down. I know I'm access the local correctly as I have accessed other locals from the sequence in this manner.
    Any ideas why one or both of the last two methods are not working for me? Is there any other methods that would work? How about sending the image to a common dll? Can you store an image or image reference in a dll so any platform could access it?
    Thanks,
    Dave

    Thanks for the tip about trying another data type. I tried an numeric array and it did not work as well. But now I could see what is happening. When the GetValString reads the local it does not interpret the escape code '\'. i.e. if the string contains '\00' it ends up as '5C 30 30'. The Unflatten From String vi is expecting hex 00 and an error occures.
    I wrote a crude VI to look for the escape code and convert what follows to pure hex. It first converts the string to byte array, interprets each byte, creates a new hex array then converts it back to a string. The good news is that it works for numeric arrays, and I was able to read the array values in the Operator Interface by reading the flattened data from the sequence. However, when I applied the VI to the Image Flattened data, the array was 2,295,879 elements long and my VI was way too slow to convert the whote image.
    Is there a fast way of converting the string to pure hex values?
    Don't know why my VI didn't show up. I'm now trying to attach an image of the block diagram.
    Attachments:
    FlattendImagefromSequence.jpg ‏46 KB

  • Is there a way to list the 'names' of the IMAQ images in memory?

    looking for a way to generate an array of strings that contains the 'names' of all the IMAQ images in memory. I'm doing some heavy image processing and the nature of the image processing functions makes it easier to work with multiple copies of images to avoid nasty surprises (like images declared one type being unexpectedly recast as another). Unfortunately, this means drawing dozens of wires everywhere to image disposal points, which does nothing but add clutter to the block diagram.
    I'd like to be able to poll the images in memory and delete only those images which are no longer needed.
    Thanks,
    Root
    global variables make robots angry

    Root,
    You could use IMAQ GetImageInfo to get the name of an image.  If your image references are stored in an array it would be easy to generate a list of image names using IMAQ GetImageInfo in a For Loop.
    Hope this helps,
    Message Edited by mfitzsimons on 01-29-2008 05:21 PM
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • Least (computationally) burdensome method of adding a filled rectangle to a thresholded IMAQ image

    I regret bothering this forum with such a simple question. I am not very proficient in LabView, so every little design consideration takes a very long time for me to solve.
    I am trying to add a filled black rectangle that covers the top quarter of a thresholded image.
    The initial source are grayscale, 8bit images at ~30fps, that are thresholded into black/white. The resulting thresholded image serves as input for an old imaq vi called "IMAQ Basic Particle" (or in other versions of this routine, "IMAQ ComplexParticle"). I'd like to take this 640x480 pixel, 8bit black and white threshold, and just add a solid black rectangle to the top of it before it goes through IMAQ Basic Particle.
    Browsing the forum (before posting!) gave me some ideas:
    draw rect.vi -> picture to pixmap.vi -> unflatten pixmap.vi -> imaq array to image.vi -> then somehow merge this imaq image on top of the initial? (not sure yet which block to use here).
    draw rect.vi ->...-> imaq overlay bitmap.vi.
    or better yet:
    imaq overlay rectangle.vi  -> imaq merge overlay.vi.
    I've spent the most time with the last route, and have one final problem with it. imaq merge overlay.vi seems to output into 32bit rgb, which my particle analysis blocks do not like. The image fed into, and resulting from, the merge overlay.vi is a simple black and white picture so i assume some final conversion of the 32bit rgb image output from Merge Overlay.vi into 8bit will fix this last problem.
    When searching this topic on the forum, I found a thread where someone claimed that merging images was slowing down their routine significantly. So i came to ask: is this a slow process? is there a better way to do this? The overall program is big, and the speed of operation is my principle concern.

    There's a function for that...
    IMAQ Draw in the pixel manipulation palette.
    Regards

  • IMAQ image out- what's the best way?

    Hello forum,
    I'm developing an interface to acquire a square image from an NI-DAQmx PCI 6221 on LabVIEW 7.0 and Windows XP. At present I am simply collecting my information from a physical sine wave generator on the bench, but eventually this will be used to process images from a CARS microscope.
    My problem is that I am trying to figure out a user-friendly way of "buffering" all previously acquired images in the session, and then choosing one several of them to save as an uncompressed BMP. At the moment I am using two image displays; one for the whole image overview (picture indicator) and one to pan around and zoom on fine details (IMAQ image indicator). The IMAQ image indicator is also outputting to an IMAQ browser window, which I have modified based on the Browser Example.vi which ships with LV. However, there are several difficulties with this method.
    Firstly, I'm not sure how to select an indexed image from the browser itself to save; the only way I can think of would end up wiring the IMAQ image out to the BMP writing VI, but that would only save the current image, and not necessarily the one the user wants.
    Secondly, I haven't quite got the hang of combining case structures, event structures and while loops yet, so there's a very specific order things have to be done in or the program hangs, (e.g.. you must press the buttons: Acquisition - Unlock Browser - Stop in that order, nothing else works properly), and I'm pretty sure I've set the browser up wrong because every time I finish with the acquisition window, an error message appears.
    Thirdly, it would be nice if I could hide the browser window until I've finished with the other window, but I can't seem to get IMAQ windshow to do that. I have boolean constants wired to Hide/Show and Set/Get but no matter what combination of false and true I use, the window appears anyway.
    I will attach the VI and subVIs to this post in a zipped folder, and would appreciate any help you could give me. General constructive criticism on my wiring, methods, Rude Goldbergs, etc, would also be appreciated if anyone has the time, as I'm still pretty new to LabVIEW.
    Thanks in advance!
    LabVIEW 2013, Windows 7
    He who asks the question is a fool for five minutes; he who does not ask the question remains a fool forever.
    Attachments:
    Image Acquisition VI 0.4.zip ‏187 KB

    DH is right about the difficulty in removing wind noise, but hoping it might prove useful, here is a hint I copied from a thread somewhere in this discussion list.
    How to export audio from Final Cut Express to (free) Audacity and back again after noise removal.
    1) download Audacity
    2) in fce timeline, place in and out points at beginning and end of audio
    3) select that audio clip, and that clip only
    4)file-export-using quicktime conversion, in the pop-up box format as aiff, 44.1kwh 16bit stereo
    5)open audacity, make sure box in bottom left corner says 44100
    6)file-import-audio
    7)go to file and select it, click choose
    8) select part of audio with just wind noise, then go to effects noise removal, click get noise profile etc.
    9)when satisfied, click file-export, click ok, close audacity
    10)Open fce, drag your audio clip to the right hand end of clip. Move playhead to the in marking. Go to File-import
    select your audio file, choose.
    11) file appears in fce browser. Drag from there to overwrite and the audio goes into the track, perfectly synced
    My apologies to whoever posted this hint, I tried to find the name to give credit. This really does work to get rid of room hum, but wind noise is a really different beast and this may not help. I suspect, as DH says, it will remove too much of the audio you want to keep. Hugh

  • Don't understand IMAQ image behavior

    Hi there,
         I have several image controls in my application.  When I assign image A to image B (in my wiring diagram), and then close image B, image A is no longer valid!  When I try to crop image A after closing image B, I get a "not an image" error.  If I do not assign image A to image B, I don't get the error.  If I do not close image B after assigning image A, I don't get the error.
         I am new to IMAQ and don't understand this behavior at all.  It looks like when I try to give the value of image A to image B, it somehow links the two rather than just copying the information over.  Is this a pointer and reference vs. value assignment issue? 
         Regardless, these IMAQ image controls behave differently than any other control in the labview palette.  I hope someone can explain what I am seeing to me so that I that I can learn when I can assign one image to another, and when I can close, and how I can avoid extremely confusing and difficult to debug results.
    Thanks,
    Eric

    Hi,
    You must create each of Image A and Image B separately using IMAQ Create and then copy content of image A to image B using IMAQ Copy.
    Image Display control in Labview does not create an image and does not reserve memory for it. It just displays content of the image it is wired to. I suspect that when you "assign" image A to image B in your program,  you just wire the same image to 2 Image Display controls. No wonder they show identical image. When you "close image B", you actually closing the only image you have, memory space allocated fot that image is released and reference is no longer valid. After that any attempt to modify/change that image will return "not an image" error.
    I recommend you to look into Vision examples shipped with Labview - see for example "Extract Example.vi" in "C:\Program Files\National Instruments\LabVIEW 7.1\examples\Vision\2. Functions\Image Management". In the path above you should change LabVIEW 7.1 to your version of LabVIEW.

  • What datatype should i use to store imaq image in sql database?

    Hi there i am thinking of saving the imaq image into database for retrieval in my website so that it's like a stream but i don't like what datatype does labview store the image as.

    You have two options for storing images in a relational database:
    A.  Don't put it in a database.  Store it as a file, and store the pointer int he DB (as mentioned above).
    B.  Store it as a blob datatype.  See here for more info.

  • Why does moving the mouse over an IMAQ image display slow the GUI down so much?

    I have a large application with several vi's running simultaneously under labview 8.6.1.  When I mouse over an image display control in one of the vi's, everything slows down a shocking amount in all the other vi's.  The windows task manager does not show a large increase in CPU use.  My pc is has a quad cpu with 4GB of RAM, and the CPU and memory loads do not appear to be terribly taxing to the system.  However, many of my vi's apparently come almost to a standstill if I just move the mouse in a circle around my image control.
    This looks like it is largely a GUI display issue.  If I make a new vi and put a while loop in it that only displays the iteration loop number to an indicator, I can see the iterating occurring, then stopping totally when I mouse inside the image display control.  When I stop moving the mouse inside the control, or when I move it outside the control, the interation loop number jumps up, as if it had been incrementing behind the scenes the whole time.  So only display of the interating was halted.
    This problem occurs even if the vi with the image control is not executing.  If the vi with the image control is open but not running, and I mouse over the image on it, the other guis all come to a screeching halt.
    Does mousing in the image display control really utterly crush all other guis in all other labview windows?  Is this an issue inherent to the image display control?  If so, is there anything I can do about this? 
    Also, this issue is not entirely limited to display.  I started looking at it in greater detail because this issue also exposed what I think is a race condition in my code.  I have a vi that acquires an image from a ccd and puts it into an IMAQ image.ctl.  This image then gets passed up to a vi up the call chain, and is put on a queue and sent over to be de-queued by a vi that has the image display control.  Here's the kicker:  when I mouse over the image display control, the image successfully gets acquired inside the subvi, and if I probe the wire leading to the output IMAQ image display.ctl, I see the image.  If I simultaneously probe the wire coming out of the subvi one level up the call chain, the image gets lost about half the time.  This only happens if I am mousing in the image display control IN A TOTALLY DIFFERENT AND SEPARATE VI.  If I bump up the priority of the ccd image acquisition vi to 'highest priority', the problem only happens about 1% of the time, and I really have to mouse around to make it happen.  Still, it's disturbing that mousing in the GUI in one window results in a failure of a separate subvi to simply pass an image up the call chain.  I understand that IMAQ images are referenced rather than passed by value, but I don't see why there should be a failure to pass the image up the call chain.  I've looked for a race condition, but can't find one.
    Eric

    I have finally been able to replicate the behavior that you are seeing on another computer once the image was large enough.  Here are a few notes about this behavior:
    First. The UI only slows down when the images are large, 16 bit images.  The reason why this is unique to 16 bit images is that they can only be displayed on the front panel as 8 bit images.  The workaround that Weiyuan suggested to change the 16 bit display mapping hints towards the root of the problem...that any time a mouse runs over the indicator, Windows asks the entire image to re-draw (having a separate indicator overlapping the image will create the same behavior).  With a 16 bit image, not only does the image have to re-draw on the screen but the 16 bit pixels need to be mapped to 8 bits.  When setting the 16 bit display mapping to Full Dynamic, this requires mor computation/pixel than 90% dynamic or one of the other mapping schemes.
    This is expected behavior if your program is running and you're trying to display a large 16 bit image.  To fix this behavior there are a couple options:
    Change the 16 bit display mapping to something other than full dynamic.  You can choose which 8 bits to display or if you want to map the bits. 
    Resize the image just for viewing purposes on your front panel (since you aren't going to view every single pixel of you image on the screen). You can use the IMAQ Resample.vi to do this.  This will allow you to take your 1500x1500 pixel image and only display a 500x500 pixel version.
    If you are interested in viewing small details of the large image, consider just displaying a smaller region of interest at a time.
    Let me know if any of these solutions work for you.  Good luck on your application.
    Zach C.
    Field Engineer
    Greater Los Angeles

  • As I can sometimes do, I did not read the directions before delving into LR.  Now I find my self with image history in LR on 2 or 3 of my HD's.  I would like to now consolidate it on one HD but fear in doing so I will lose the images I have created within

    As I can sometimes do, I did not read the directions before delving into LR.  Now I find my self with image history in LR on 2 or 3 of my HD's.  I would like to now consolidate it on one HD but fear in doing so I will lose the images I have created within LR.  Is there a tutorio or some other way to get me back on track with this application?

    Your image history (if I understand you properly) is stored in your catalog file, and nowhere else, and so it is only on a single drive.
    Do you mean you have edited photos on multiple drives? This isn't a problem for Lightroom at all, the software doesn't care, and you can leave things just the way they are. But if it bothers you for some reason, you can move the photos to a single drive if you want. In Lightroom select the desired photos or folders (it's easier to do this using Folders) and drag them to the desired drive.
    Alternative if you will be moving lots of folders: Adobe Lightroom - Find moved or missing files and folders

  • "IMAQ image to string" difference in 8.2 and 8.5

    My basic aim is to capture image from one computer and then send to another in LAN using TCP/IP. I have LabVIEW 8.5 and LabVIEW vision 8.5 in one and LabVIEW 8.2 and LabVIEW vision 8.2 in another. I capture an image in the computer whear I have installed 8.2 version of both and then flattened using " IMAQ image to string" and then sent it to computer using TCP/IP to computer with 8.5 version but the image is not displayed whearas when i do send that from 8.5 to 8.2 ( Capture the image in the computer with 8.2 and then flatten it to string and send it to the computer with 8.5 and display) , it works. Is it beacuse of different version of LabVIEW vision?

    Hi aman_bajra,
    You should be able to pass the image from one computer to another using TCP/IP, even if the computers have different versions of the Vision Development Module installed.  I tested this here and I had no difficulty sending the image from a computer running Vision 8.5 in LabVIEW 8.5 to a computer running Vision 8.2 in LabVIEW 8.2, or vice versa.  FYI, I used the normal Flatten to String node, not the IMAQ Image to String VI.  I have included the VIs I used to do this below.  Please give these a try and reply back if you are still unable to send your image properly.  Thanks.
    Rishee B.
    Applications Engineer
    National Instruments
    Message Edited by risheeb on 03-12-2008 12:24 PM
    Attachments:
    TCPIP Receive Image3.vi ‏45 KB
    TCPIP Send Image1.vi ‏74 KB

Maybe you are looking for

  • Pythagoras Theorem Triplets

    What is the formula for finding Pythagorean integer triples? For ex: 3 4 5 is a triplet. How do I find the next triplet?

  • Can't get past the grey loading screen with the apple

    My ibook was working fine for a while and then all of a sudden I turned it on one day and the desktop came up but none of the icons or toolbars came up. I talked to a few people about that and they seem to think that is was the os going out of whack.

  • How to create dynamic blocks in oracle forms

    Hi All, Is it possible to create a dynamic blocks and items in forms? I mean based on table driven values I want to create a blocks and items in the forms. I appreciate the help. Thanks Srini.

  • Create a PDF with Scroll ( content in scrollable:TXT and Pics)

    How can I achieve this: I am working on a project where  the Document will be share in PDF format and  I need the whole content to be in a scrollable frame, so that the Top banner and Buttons below will show at all times.. the content should be scrol

  • Numbers Not sorting correctly?

    I am trying to sort on a field that has both alpha and numeric characters. ergo: I expected a sort to give me 1a 1b 1c 1d 1e 1f 1h 1i 2a but received a sort of: 1h 1d 1a 1b 1c 1e 1f 1i 2a Justifying the field left or right makes no difference if I in