Q: Repost. Visualizing Measurement Data in Picture Control. Was: Color Table Question

I wish to visualize in a picture control a matrix of 80 * 80, 16 bits
values. These values represent grey scale light intensities.
I'm trying to use for this the Flatten Pixmap.vi, followed by Draw Flattened
Pixmap.vi.
Because the Flatten Pixmap.vi doesn't accept a 16 bit pixmap, I have
compressed the data for each pixel to 8 bits.
Then, as I understood, I should connect an array of 256 elements to the
Color input of the Flatten Pixmap.vi.
What should contain the elements of the mentioned array so that I get a gray
scale image? Where can I read about this or find an example?
Thanks a lot in advance.
Victor

Thanks to all of you who tried to help me. The problem isn't totally solved
yet but I could advance.
For unknown reason my newsgroup server hasn't carried out their answers,
that I have recently seen through the NI site.
Victor
"Victor Manta" <[email protected]> wrote in message
news:[email protected]..
>I wish to visualize in a picture control a matrix of 80 * 80, 16 bits
>values. These values represent grey scale light intensities.
>
> I'm trying to use for this the Flatten Pixmap.vi, followed by Draw
> Flattened Pixmap.vi.
>
> Because the Flatten Pixmap.vi doesn't accept a 16 bit pixmap, I have
> compressed the data for each pixel to 8 bits.
>
> Then, as I understood, I should connect an array of 256 elements to the
> Color input of the Flatten Pixmap.vi.
>
> What should contain the elements of the mentioned array so that I get a
> gray scale image? Where can I read about this or find an example?
>
> Thanks a lot in advance.
>
> Victor
>
>

Similar Messages

  • Plotting 4D data using 3d picture control

    Hi,
    I am using 3d picture control in my vi to view the data plotted at different locations.The 3d picture contains axis as I generated it using Create 3D axis vi But I am not able to get the gridlines on the axis to be shown on it with marker spacing(like on a 2d graph).How can I get the grids ?
    I am attaching the vi in which only axis is there with data points plotted on it.
    Regards
    Vijayab
    Attachments:
    Plot 4D Graph_Edited_copy.vi ‏21 KB

    Basically, to have the grids you have to 'draw' the grids yourself.... There isn't a lot of help from the 3D picture control at the moment for this task.
    However, if you are able to 'drill' into the "3D Graphs", you can have some functionalities that you can use to create the graphs. In attachment you have some VIs that you can look inside and see how you can create your own grid.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    Plot 4D Graph_Edited_copy2.vi ‏65 KB

  • No data appear on "measure data view "

    I now do some execises using the OLAP Analytic Workspace Manager and Worksheet.
    I follow the examples in the online documents 《Oracle® OLAP Application Developer's Guide 10g Release 2 (10.2)》
    At the end of all steps, using the measure data view to view the measure's data ,but I cann't see the sheet with data.
    however ,I can see all dimension's data in the view the dimension through right click the dimension.
    the example in the online documents have analyze data.

    I have put the question in Chinese on the following web site.
    http://www.itpub.net/showthread.php?s=&postid=8518644#post8518644
    but no one answer me .
    We can see the picture on the above web site , no data in my test sheet .but the example in online docments have data.

  • Loop delay when using two VI's with picture controls simultaneously

    Hey all,
    I have observed an odd behavior and I'm not quite sure why it happens. I have two VI's that are mapping GPS coordinates onto XY graphs that are displayed on top of picture controls. When the maps from both of the VI's are visible on screen the loops get delayed by as much as a second, but if you just cover the map portion with another window they go back to looping at twice a second as they should. It took me a little while to figure this part out, let me tell you. There are no computing limitations that should be affecting it since my CPU is only at 10-12% and have 4GB of RAM available. I checked the GPU too just in case and it was sitting at 3% usage, so no hold up there. Anyone have any experience with something like this happening to them? It has me stumped.
    I though it might have to do with how LabVIEW handled them, so I went ahead and made them into EXE's and tried it out with the same results.
    Thanks in advance for any help or suggestions,
    dnorman

    dnorman wrote:
    Is it possible to run the redraw of the picture tiles in parallel, on multiple cores, if they are going into the same control?
    I doubt it. Even if the picture control wasn't pretty old (and it is), I don't know of any mechanism which will give you this level of control.
    Here are potential options. I have no idea if they will help:
    Instead of building separate commands, process the data in such a way that you have a single raster image (i.e. a 2D array) to place into the control. I believe this should be faster.
    Use another type of display (such as a .NET indicator).
    Instead of using the XY graph, overlay the data directly onto the image (there should be some graph VIs in the picture palette which might help).
    Try defering panel updates before updating all the controls and undefering after. I don't think this will help, but it's probably the easiest change to make.
    Try to take over the world!

  • 2D picture control doesn't refresh properly

    I have an application which displays a picture in a 2D picture indicator and draws a few rectangles and lines on top of the picture. 
    The locations of these lines change throughout the day, and the application is designed to run minimized and then provide a quick-look at various status items when it is restored by the user.
    While minimized however, the image does not appear to get updated, even though my code is updating it once per second. I can't actually tell what happens when it's minimized obviously, but the behavior persists for some time after the window is restored, and the state it is 'frozen' at is from the time it was minimized.
    There are other digital indicators on the front panel getting updated in the same 1Hz loop, so I know it is just the 2D picture indicator that's not working--i.e., something with LabVIEW or system related is causing the image not to refresh while it's minimized, and more importantly, for some time after the application is restored.
    Some things that will cause a successful refresh to the displayed image after I restore from the task bar to a stale display:
    Minimize again, then restore again (of the LabVIEW window)
    Probing the datapath on the BD for the final Draw Line output that connects to the indicator
    Waiting for awhile (15 seconds? 30 seconds?)
    I also tried setting the following property node with no effect: 
    VI > Panel > Defer Panel Updates > Set to False
    Another way to think about this would be to imagine a 2D picture control with an analog clock, where lines are drawn for minute and hour hands, and updated once per second.  This is not what I'm doing but the example is easy to understand.  When the application is restored from the taskbar, the clock appears frozen in time from the last time it was minimized.
    Same behavior running this in LV 2012 and 2013... I am looking for any other property nodes or refresh methods to force a refresh at 1Hz, regardless if the display is visible.  The display should be immediately up-to-date when the application is restored by the user.
    Solved!
    Go to Solution.

    You could try looking at the panel resize event (to recognize the restoring) and then force an update using one of the following methods (I have no idea if they will help):
    Set defer to T and only then to F.
    Set defer to T when minimizing.
    Set the FP window state to something else (hidden, minimized, etc.) and then to standard. This should ideally do the same thing you did with minimizing and restoring again.
    Use the window position property to place the window off the screen and then back in its original position.
    See if you can toggle the synch. updates property programmatically.
    Have a hidden control displayed over the picture control and then hide it.
    Try to take over the world!

  • Save content of picture control as .jpg into excel file?

    Is it possible to save the contents shown of a picture control as a jpeg file into an excel file along with other data? Is this possible without using ActiveX? If I have to use ActiveX how do I use this?
    Thanks

    Hello AndyBE,
    ActiveX is definitely going to be your best bet. I�ve attached an example that should meet your needs. Let me know if this works for you.
    Have a nice day!
    Robert Mortensen
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments
    Attachments:
    Picture_To_XL_(6i).vi ‏133 KB

  • 3D Picture Control Orthographic View zoom - Camera Set up?

    I am trying to display two 3D picture controls.  One displays some objects in 3D (Auto Projection: Perspective, Camera Controller: Spherical).  This 3D image works great and I am having no problems with it.  The other Picture Contol is meant to simulate a 2D image of the 3D object, essentially a Plan View.  To do this I made a 3D picture control with a Orthographic view.  I set the camera to view from above (z-axis) and set the target to be positive y-axis. 
    I have attached an example vi (labview 2013 SP1) that creates some simple 3D objects and displays them in Perspective and Orthographic using the same Camera Position.  On initial start, the Orthographic image is zoomed in heavily. If I manually zoom it (Hold Shift button and mouse up or down), then the Orthographic image will set itself to the correct Camera position.  This is essentially the solution to my problem, but I can't assume the user will have the ability to manually zoom the image.  So I need to set it programmatically.
    If you manual adjust the view on either screen (rotate and zoom), then click the Set Camera button, both images will give a plan view, but only the Perspective Image will be at the correct camera zoom or distance.  The Orthographic stays at the last zoom distance.
    Is there any way to set the Camera distance for Orthographic projection programmatically?   I have tried starting with the 3D picture control as perspective, set the camera distance and then changing it to orthographic, but this still results in a zoomed orthographic image.  From the reading I have done, I think I am trying to the impossible.  Does any one have another suggestion to get the same result.  I have previously used the 2D picture functions to generate the image but found that method inefficient. 
    And suggestions would be great.
    Thanks
    Relec
    Attachments:
    3D_projection_Test.vi ‏38 KB

    Hi Relec,
    thank you (and Kudos) for that inspiring demo!
    Took me while to work it out, but I might have found something that could help us with the orthographic projection.
    Sometime back someone posted a way to collect the current Camera data. Sorry I lost the source. But here is my version as a Get3DCameraPosition.vi using the ModelViewMatrix.
    Unfortunatly this doesn't return the current Target and so a bit of guessing in the right Direction is necessary.
    I'm impressed you found a way to make the Shift-Drag Zoom-movement possible on the orthographic window.
    It seems a whole thread at http://forums.ni.com/t5/LabVIEW/3D-Picture-Control-Doesn-t-Zoom-in-Orthographic-Mode/td-p/1544460/page/2 wasn't able to find that out.
    In the meantime I've found a way using the ProjectionMatrix to create a zoom-effect which I build into your demo using the mouse wheel.
    All in all I've tried to translate camera movements from the perspective window in the ortho - assuming this is what you were after?!
    Again the missing target information doesn't make it quite right.
    Regs
      Jannis

  • I want to know how to draw arrows & dashed lines in a picture control

    I have to draw arrows & dashed lines in a picture control. Just like we can do that in word or paint etc. I need to do the same using the mouse and drag the line/arrow till I realease the mouse. I am able to this for a normal line ( it works perfectly) but when I have to draw an arrow or a line I am stumped.

    Unfortunately, you have to code your own VIs to do these. It's not going to be too complicated if you manage the animation (while dragging the mouse) with a normal line and draw the dashed line/arrow at the end (when releasing the mouse button).
    In both cases, you'll know start/end line coordinates, thus having the line equation. For arrows, you need to calculate the angle in order to draw it properly.
    A simpler solution may be an activeX control with these features (Paint like) already integrated or to develop one in Visual Basic (at least it will be simpler to manage mouse events and drawing tasks).
    Let's hope somebody already did it and wants to share.

  • A problem about saving the picture control'image in a child VI.

    i want to use 'export image' method to get a picture control'image,so ,i have a child VI to use method 'export image',and a main VI to using the child VI,but when i run the main VI,there is no image is saved on the disk ,but if i open the child VI'frontpanel,then,i run the main VI,the image is saved on the disk,i want to know the reason why i can not get the image,when i run the main vi without the child 'frontpanel or blockdiagram is opened.
    Solved!
    Go to Solution.
    Attachments:
    child.vi ‏11 KB
    main.vi ‏7 KB

    The behavior that Simon describes is not a hard and fast rule, and the Export Image method used to be a bit of an exception.  It would supposedly update the controls of unopened FPs that used the method.  Reality never quite matched what was described in the documentation if I recall.
    If you pore over the detailed help you discover that this method works fine in SubVIs with some controls and not others.  Look at the characteristic 'Loads the Front Panel Into Memory', for a Picture control it is 'No', for a Waveform Graph, for instance, it is 'Yes'.  Caveat:  Relying on this level of detail to be correct in the LV help is a bit risky.  Best to try it yourself.  Not loading the FP is a good hint that the method is not going to behave in a SubVI.
    As to the problem at hand, a Picture Indicator is an odd choice to me to use this method.  You have VIs in the Picture palette to convert pictures to image data and then export the image data to a PNG or JPG or BMP file directly.  Anything you would draw and then export could be exported directly without drawing.

  • Memory Leak with Picture Control

    Hi all
    There is bug with Picture Control
    When you insert you picture data in loop into the shift register, memory leak
    Can somebody to prevent this bug?
    Run attached example and look at Task Manager
    Attachments:
    Picture Memory Leak Example.vi ‏24 KB

    I believe David properly called the cause of this memory consumption.
    In reply # 52 of thsi thread,
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=5&jump=true
    I posted an example that inserts 130 FP object images in a picture and moves them around (it is a random walk where each object is assigned a letter and the program terminates when all of the letters required to spell out "Hello World" wander into the trap at the bottom.)
    A snippet of the code follows.
    A) Start with a blank picture
    B) Inster all of the images
    C) show the updated image.
    Other links to LV Picture control examples can be found in this thread.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
    Ben
    Message Edited by Ben on 01-14-2007 08:58 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Many_Objects.JPG ‏24 KB

  • How do I get picture control to display PNG images with transparent background?

    I have an image of a robot arm looking from the top with a transparent background and saved as PNG. When I drag the image directly to LabVIEW front panel, the image shows properly with the transparent background, but I want to manipulate it such as rotate the image. I used the Read from PNG.vi to read the image to a picture control, but the background isn't transparent anymore. Am I missing something?
    Please help.

    unclebump gets 5 stars for referring you to a document that I wrote. 
    Incidentally, I wrote it years back, for LabVIEW 7.0.  A couple of notes to summarize:
    The picture control doesn't "really" support transparency.  However, the image data type supports masking, and stores the alpha channel, if present in your image data.  So you use the "Create Mask By Alpha.vi" referenced in that document to mask out pixels whose transparency is above a certain level.  It does not support partial transparency.  You could try to implement your own blending algorithm based on the picture control's current pixel values, and the image data's RGB value and transparency value, but it would probably be very slow.
    Also, that VI ships with 8.0 and later.  I don't know if it's on the palettes but it lives here:  vi.lib\picture\picture.llb\Create Mask By Alpha.vi
    Good luck!

  • SQL Loader Error : ORA-01830: date format picture ends before converting en

    I am inserting following data
    BES101706     M.E. Deals     7     10/17/2006
    through control file :
    LOAD DATA
    APPEND
    INTO TABLE abc_temp
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    (BATCH_NAME               ,
    SUPPLIER_NAME          ,
    SUPPLIER_NBR          ,
    INV_DATE "to_date(substr(:INV_DATE,1,10),'MM/DD/YYYY' )"
    But I am getting this error:
    ORA-01830: date format picture ends before converting entire input string
    inv_data is a date field in the database.

    I think it has to do with data format.Exactly.
    You have
    BES101706*M.E.*Deals*7*10/17/2006
    I replace each space with an asterisk. You have 5 columns according to your spec (terminated by '<space>')
    SQL Loader doesn't know that M.E. Deals is the supplier name.
    It's trying to convert 7 as the date.

  • How could I possibly remove the default picture in the picture control?

    I've been using the picture control and a bit of code to create a zoom effect on a picture. It all works great however I get a labview picture when the Vi is first loaded. I'm trying to get a blank area instead cause it doesn't look really tidy!
    I've attached a picture and my code.
    Thanks for your help
    Solved!
    Go to Solution.
    Attachments:
    Picture Zoom.vi ‏100 KB

    The image is configured to be the default value of "Picture". In other words: you have to get rid of the default. You can do this by either:
    a) Delete "Picture" and create it again. Disadvantage: You have to recreate all property nodes connected to this control.
    b) Load an empty picture and then select "Data Operations >> Make Current Value Default".
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Insert Art into the Picture control using AGM and ADM

    Hello. I need to get selected art and display it on the User Interface Picture control. What I already did:
    void ASAPI my_inDrawProc( ADMItemRef item, ADMDrawerRef inDrawer) {
    AIArtHandle **artStore = NULL;
    long artCount = 0;
    AIRealRect bounds;
    sAIMatchingArt->GetSelectedArt(&artStore, &artCount );
    AIPathStyle m_style;
    AIDrawArtData drawData;
    const AIColorConvertOptions drawOptions;
    for (int a=0; a<artCount; a++)
    AIArtHandle my_artHandle = (*artStore)[a];
    sAIPathStyle->GetPathStyle(my_artHandle, &m_style);
    sAIPathStyle->SetPathStyle(my_artHandle, &m_style);
    // Insert to port data
    drawData.art = my_artHandle;
    sAIDrawArt->BeginDrawArt(&drawData, drawOptions, 1);
    sAIDrawArt->DrawArt(&drawData, drawOptions);
    sAIDrawArt->EndDrawArt(&drawData, drawOptions);
    What to do next? Please help

    I'm not familliar with the AiDrawArtSuite unfortunately, but another way you might consider doing it is to rasterize the art you want to display using the AIRasterize suite. This will give you back the raw image data that you can put into an ADMImage (and cache).

  • Load picture control with png image from the web

    Hi guys,
    Is there an example anywhere for Labview 8.6 for loading a picture control with png image from the web?

    Hi lavalava,
    here you find a note on how to load pictures from the internet. After grabbing the data you could save them to a file, load the file with the picture file functions and then convert it into the image datatype to feed a picture indicator with the data...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for