Single pixel formation in Intensity graph

I needed to capture a image using CCD camera. Though it has 16 bit resolution, i need to focus on ONE PIXEL.
The process goes like this. Save the image information in a spread sheet array and then find the max value of the array. Till this step, i am OK.
But how do i get to display this MAX value using intensity graph??
Intensity graph is 2D array which needs X and Y value.
So I need to get the X and Y value of the max value of array. I tried using the max index value of 'Max and Min' array function. But it is of no use since the value comes as 1Dimension but the intensity graph needs 2D information in the form of X and Y value. 
Please help me on this. Thanks in advance.

Asking the same question in multiple threads does not help or get you an answer more quickly.  Please be patient.  Many of us who participate in the Forum do so as volunteers.
Now to your question.  As you noted, you can use the Array Max & Min function to locate a pixel with the maximum value.  If more than one pixel has that value, this function only reports the first occurrence of that value.  The 1D output of the Array Max & Min function contains the indexes of the pixel.  So the first element would be the row index (X value) and the second element would be the column index (Y value).   What I do not understand is why you want to display just one value on an intensity graph.  That seems rather meaningless.  Please explain what you want the output to look like.
Lynn

Similar Messages

  • Change colors of individual pixels on intensity graph?

    I would like to be able to change the color of a set of individual pixels within an intensity graph, to blue for example, while leaving the color table otherwise as is, for example, gray scale.  The change to blue would be based on location, not on current gray value.  I think I can accomplish this using the mask fx with picture controls, and then convert to intensity graph.  Is there a more direct way?  A good example to demonstrate this capability would be just using a 'mouse down' event on an intensity graph to change the color at the mouse location.  Any thoughts are appreciated.
    Sincerely,
    Don

    Yes, seems to work fine .
    If you have LabVIEW 8.0, there is another possibility. There is a new property that allows drawing any pictures or picture elements on your graph area. Of course you could draw individual pixels, but nothing prevents you from e.g. drawing circles, squares, odd shaped areas, arrows or event text. ... Anything you could do with a plain picture indicator. One example that ships with LabVIEW 8.0 is Envelope.vi, see image.
    Message Edited by altenbach on 06-12-2006 07:31 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    envelope.png ‏32 KB

  • Intensity graph pixel size

    Can I control the pixel size in Intensity graph. I have 2D array but I want some elements to take larger area than the others.  For example, If I have 3X3 area I will get 9 pixel with equal area. I want to make, for example, the first element to be presented by 90% of the first raw in the graph and the other two with 5% each. 
    Thanks

    Simply create a 20x20 array and assign the values of your first row to the first 18 rows and the rest of yourvalues to the last 2 rows, and then plot the 20x20 array into the intensity graph.
    Marc Dubois
    HaroTek LLC
    www.harotek.com

  • Format intensity graph into common streaming video format

    I am collecting data, which is continuously plotted as a 3-d intensity graph.
    I would like to stream these graphs, or "images" real time over
    an internet connection to remote viewers. Is there a way of encoding and
    streaming the data so that viewers can see it in Windows Media Player?
    I have Labview 7.0 and NI Vision.
    Thanks,
    Christine

    Christine,
    Kileen has an excellent suggestion, as always, but I am going to guess that you have the following constraints:
    - Your remote viewers may not have LabVIEW or may not want to run a LabVIEW application to view your data
    - You may not want to do much additional programming to support the functionality
    The first constraint is probably the big one. My initial solution was to suggest using the LabVIEW Web Publishing tool (Tools >> Web Publishing Tool) to publish your front panel so that it could be viewed and/or controlled remotely. However, the 3D Graph does not show up properly in a remote panel. This technique also requires an extra download of a browser plugin/run-time engine for each remote viewer.
    After some thought, I came up with a better idea:
    - Modify your VI to spit out snapshots of its front panel on a periodic basis (very easy) and save them to disk
    - Create a simple Web page that displays that image and automatically reloads it on a periodic basis
    - Use the LabVIEW Web server (or, really, any Web server like Apache, etc.) to publish the Web page
    I modified a 3D Surface Graph example that ships with LabVIEW to do all of this (see attached, LV 7.0). Just run the example and it should fire up a Web page with a pseudo-streaming image of the VI's panel. Anyone can access the page as long as there are no firewall restrictions, and no special software of any kind is needed by the remote viewers.
    Hope this is closest to what you were after,
    John
    Attachments:
    Modified 3D Surface Example.vi ‏141 KB

  • Control grid intensity graph

    Hi,
    I want to control the grid of an intensity graph to be exactly spaced by "1"... How to do?
    See attached example in LV8.5. Start with default values and you get grid lines with spacing of 1.
    Now change "size" to 15 and run again. Gridlines are now spaced by 0.5. Size=10 -> spacing of 0.2, size=4 -> spacing=0.1 ...
    I want to have a spacing of 1 regardless of size parameter! How to achieve this?
    Btw. I need both major and minor grid, as array size can grow to more than can be handled by major grid alone...
    Message Edited by GerdW on 02-26-2008 03:09 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Test_Grid_LV85.vi ‏16 KB

    Hi Simon,
    thanks for clarification.
    To summarize: major increment has to be bigger than minor and you have to set them both...
    Scale labelling is not so important for me, but it would be nice to have each number when space is sufficient (in the example vi for sizes upto 15). It seems I have to change my graph formatting a little bit: make minor grid transparent when not needed (for small sizes) and switch gridlines on, when scale space is not sufficient to show all numbers...
    In the attached example pic (today's measurement of pressure sensor wafer ) I use the gridlines to separate single chips. And I always want to separate single chips regardless of array size (=wafer/chip) - which can vary from 10 to ~80...
    Message Edited by GerdW on 02-26-2008 05:26 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    grid-example.png ‏27 KB

  • Fast intensity graph possible ???

    I want to display some images (echographic images for information) in a 1st intensity graph, extract a given column and display it in a 2nd intensity graph.
    I have already seen that I have to use the 3Dgraphs. But It seems to be "very slow". Every code line as "m_MyGraph3.Plot3DSimpleSurface(MyMatrixData)" takes between 50 and 60 ms !!!
    My images size is approximately 300*300 pixels.
    I have also a 2nd question concerning the cast that I have to perform on the raw data acquired by our device in order to display it. For 2D graph with vector of data I use the following "single line" declaration code:
    "CNiReal64Vector DataNi(vectorsize, RawDataPointer)"
    Can I perform same thing for 3D graph/matrix of data ???
    Thank you in advance.

    The best way to do this is using the background image of a 2D Scattergraph. Each pixel in the bitmap is a data point. It is really fast. I can do a 3200X1024 bitmap each second without any noticable flicker. Here's some C# code on how to do it.
    Note I'm using a gray scale bitmap which is a byte array and a certain PixelFormat. Just use an int array for the bitmap and specify a PixelFormat of color (32bit RGB).
    There you have it.
    Scott
    private void ShowBlockOfData()
    int width = _EqualizedData[0].Length;
    int height = _EqualizedData.Length;
    scatterGraph1.PlotAreaImageAlignment = ImageAlignment.Center;
    PrepareBitmap(width, height );
    // Now create a dummy bitmap. Use the LockBits method to lock the data in
    // memory. This is much faster than SetPixel (I'm not sure you
    // can use SetPixel with an Indexed type image. )
    Rectangle rec = new Rectangle(0, 0, _Plot.Width, _Plot.Height);
    BitmapData bmd = _Plot.LockBits( rec, System.Drawing.Imaging.ImageLockMode.ReadWrite, _Plot.PixelFormat);
    unsafe
    for(int y=0; y < bmd.Height; y++)
    byte* row= (byte*)bmd.Scan0.ToPointer()+(y*bmd.Stride);
    for(int x=0; x < bmd.Width; x++ )
    row[x] = _EqualizedData[y][x];
    _Plot.UnlockBits(bmd);
    scatterGraph1.PlotAreaImage = _Plot;
    private void PrepareBitmap(int width, int height )
    // Create a new bitmap the first time, otherwise use the old one
    // to create a new one. Hopefully, this will save us resources.
    if ( _Plot == null )
    _Plot = new Bitmap(width, height, PixelFormat.Format8bppIndexed );
    AssignPalette( );
    /// If the palette is null, create it and preserve it internally
    /// Set the images palette to our ColorPalette member.
    private void AssignPalette()
    if ( _palette == null )
    // Get the color palette from the image. You can't
    // create one from scratch.
    _palette = _Plot.Palette;
    // Create a grayscale palette by changing this one.
    for ( int i = 0; i < _palette.Entries.Length; i++ )
    int c = 255-i;
    _palette.Entries[i] = Color.FromArgb( c,c,c );
    _Plot.Palette = _palette;

  • Double clicking an intensity graph to call an event

    I am trying to make a certain sequence of events happen if a user double clicks an intensity graph. I didn't notice a 'double click event' just mouse up and downs. Is there a way to recognize a double click if it occurs within a pixel range or on an intensity graph?

    Hi.
    Indeed, there is no built in event to catch a double click, but you can use any of the "single click" events to build yourself your own double-click detector, as shown in the attached VI. What I do there is set the value of a shift register to 1 when there is a mouse down? event and the shift register had a value of 0 (first click). If there is another mouse down? event before the timeout (which you can set to whatever you want), I consider that a double click, and execute whatever code you want for a double click. If the timeout passes, the user didn't click twice on the graph fast enough to be considered a double click, so the shift register is set back to 0.
    Attachments:
    DetectDoubleClick.vi ‏35 KB

  • Most efficient way to extract the amplitude of a signal and display on an intensity graph

    Hi All,
    I am having difficulty to display the amplitude of an voltage signal (voltage picked up by NI DAQ card).
    what I am trying: Voltage signal (Dynamic data type)--> 2D array of dynamic data type (using 2 nested for loops) --> normal 2D array with scalar values --> intensity graph
    I have difficulty to convert the dynamic 2D array to scalar 2D arry.
    I only want to extract the amplitude of the imcoming signal.. any body can give some advice? thanks in advance..
    Charlie

    Hi Hillary,
    Thanks for your reply.
    Yes, I did tried to use Amplitude and Levels Express vi, it should be the one I am looking for, but I found it not work in my case, I need to put the value of amplitudes into a 2D array.
    If I use Amplitude and Levels Express vi, it will give me a 3D array, I have found the solution, just convert the dynamic data to single scalar. (see pic attached)
    Anybody can help me to solve the following 2 problems:
    1. The speed of this program is too low, i think ii due to the DAQ assistant in the 2 for loops (for creating 2D array), it should be able to re-write using DAQmx (as "centerbolt" told me), I am working on this now, if anybody can help, I will appreciate that.
    2. Is there any other way to creat the 2D array (for purpose of increasing speed also).
    Thanks,
    Charlie

  • How does LabVIEW Render the data in 2D Intensity Graphs?

    Hello,
    I was hoping someone could explain to me how LabVIEW renders it's 2D intensity data. For instance, in the attachment I have included an image that I get from LabVIEW's intensity graph. The array that went into the intensity graph is 90000x896 and the width/height of the image in pixels is 1056x636.
    Something I know from zooming in on these images as well as viewing the data in other programs (e.g. Matlab) is that LabVIEW is not simply decimating the data, it is doing something more intelligent. Some of our 90000 lines have great signal to noise, but a lot of them do not. If LabVIEW was simply decimating then our image would be primarily black but instead there are very obvious features we can track.
    The reason I am asking is we are trying to do a "Live Acquistion" type program. I know that updating the intensity graph and forcing LabVIEW to choose how to render our data gives us a huge performance hit. We are already doing some processing of the data and if we can be intelligent and help LabVIEW out so that it doesn't have to figure out how to render everything and we still can get the gorgeous images that LabVIEW generates then that would be great!
    Any help would be appreciated! Thanks in advance!
    Attachments:
    Weld.jpg ‏139 KB

    Hi Cole,
    Thank you for your understanding.  I do have a few tips and tricks you may find helpful, though as I mentioned in my previous post - optimization for images or image-like data types (e.g. 2D array of numbers) may best be discussed in the Machine Vision Forum.  That forum is monitored by our vision team (this one is not) who may have more input.
    Here are some things to try:
    Try adjusting the VI's priority (File»VI Properties»Category: Execution»Change Priority to "time critical priority")
    Make sure Synchronous Display is diasbled on your indicators (right-click indicator»Advanced»Synchronous Display)
    Try some benchmarking to see where the most time is being taken in your code so you can focus on optimizing that (download evaluation of our Desktop Execution Trace Toolkit)
    Try putting an array constant into your graph and looping updates on your Front Panel as if you were viewing real-time data.  What is the performance of this?  Any better?
    The first few tips there come from some larger sets of general performance improvement tips that we have online, which are located at the following links:
    Tips and Tricks to Speed NI LabVIEW Performance
    How Can I Improve Performance in a Front Panel with Many Controls and Indicators?
    Beyond that, I'd need to take a look at your code to see if there's anything we can make changes to.  Are you able to post your VI here?
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Programmin​g intensity graph cursor to move automatica​lly

    Hi Everyone!
    I want to program the 2 cursors(horizontal and vertical) in the intensity graph(Bright spot.png) to move to the bright spot in the middle of the intensity graph(live video feed from a CCD camera) automatically without dragging the cursor manually to the bright spot, is it possible?
    I've attached part of my block diagram which involves the graph but i'm unable to attach the whole VI because it has some hardware dll in it.(you guys can ignore the formula part of the block diagram, it's not important)
    Attachments:
    Bright spot.png ‏118 KB
    block diagram.png ‏45 KB

    Use "Array Max&Min" to find the peak coordinates, translate them to x and y values, and change your cursor position property node to write and write these values.
    I am actually not sure why you have two cursors. A single cursor with a horizontal and vertical line seems sufficient.
    LabVIEW Champion . Do more with less code and in less time .

  • Cursor Misalignme​nt in Intensity Graph (LV6.1)

    Howdy.
    I have an Intensity Graph, with a 2D array of data (about 300x300) and a cursor. The cursor is locked to the plot, which for intensity graphs, means that the cursor is drawn at the lower left corner of the pixel that is being addressed.
    Most of the time this works fine. However, sometimes, the cursor is drawn as being located at one pixel, but the values reported for the cursor are in fact a neighbor (usually the one to the right). The zoom level of the graph is such that a given pixel is larger than a screen pixel (about 3-5 times), so I wouldn't think that it was an aliasing problem, but the problem does go away if I zoom in a little further.
    Has anyone else seen this? Does anyone have a fix?

    I don't have a repeatable set of conditions that lead to this problem, so I don't have a demo vi that exhibits it.
    As to unlocking the cursor, I think that in an intensity plot that is more confusing; the location and value reported for a cursor position are shifted half a pixel down and half left with respect to the way the plot is filled in. In other words, say we have a 10x10 plot shown in 100x100 pixel window. Each intensity value is 10 pixels wide. The axis values line up on the boundaries of these pixels. When the cursor is within half a unit (5 pixels) of the crossing point of these axes, that is, near the intersection of boundaries of four adjacent pixels, the value reported is the pixel location and value in the upper right of these four pixels. This means that with an unlocked cursor, I can be positioning it over (visually) the lower left pixel, but selecting the upper right. In fact 3/4 of any given pixel's visual representation is actually going to select some other pixel. So I've locked the cursor to remove that uncertainty; now it is supposed to be always in the lower left corner of the pixel selected.

  • MATLAB pcolor and LABVIEW Intensity Graph

    Hello all
    I have a data matrix which i want to plot using intensity graph of LABVIEW. My problem is that when i plot this matrix using MATLAB pcolor along with "shading interp" command, i got a very fine and smooth coloring graph of this matrix, however, using LABVIEW Intensity graph along with getcolor vi, i was not able to get a smooth coloring graph comparable to MATLAB pcolor. I have tried many setting but results were not satisfactory
    Is this due to a limitation of LABVIEW intensity graph or i am missing something? Kindly help me
    Best Regards
    Asim

    Thanks for providing that Asim, unfortunately the VI you provided is unusable as-is.  There is a subVI missing, and while not critical, it's difficult to tell how you're setting up the intensity graph without that VI.  Additionally, it doesn't appear that there is any graph data included in the VI you provided and a third-party software license would be required to use this VI.  Could you upload the data you're handling in a format that works without any external tools?
    As for thoughts on the differences in the plots; they are largely similar in appearance, although it does appear that you're using a different color scale in LabVIEW- the majority of your scale is in the blue-green range, rather than continuing linearly through yellow, orange, and red. You're going to lose a lot of visual resolution in the ranges you're highlighting due to this. The plot you're trying to achieve also appears to be interpolated or blurred around the edges of bins, are you actually plotting data between integers on the x-axis, or is this an artefact introduced by the software?
    Regards,
    Tom L.

  • X-Y with intensity graph

    Hello.
     This is my task :
    I have 2 waveforms with different frequency ( this is my output) I read them with Analog input. One waveform is x and the other is y. I have also the third input that is the intensity in every point ( so I have x,y and intensity). I need to built graph with these 3 parameters. Do you have any idea what kind of chart do I need?

    I will try to explain my problem again.
     I need to built raster with signal. In the analog output (two channels) I generate two waveforms with different frequency. With two Analog inputs I read this waveforms and also I read additional AI with signal intensity. And I need to present in the intensity chart or graph signal intensity in every pixel (x-y). So I need to solve a number of problems:
    1. First of all I get tree AI in one waveform chart. And I didn't understand how I can split the signals from the different waveforms.
    2. How to "explain" to the intensity graph that every point intensity has specific x and y.
    Maybe now it is more clear. I attach my vi's maybe you can help me.
    Thank you
    Attachments:
    AI+plot.vi ‏90 KB
    AO.vi ‏63 KB

  • Open 32-bit jpeg & convert to intensity graph form (LV8.5 & Vision 8.5)

    I will cross-post this in the Machine Vision forum as
    well.  I have an LLB to open images with IMAQ vision utilities, and
    then attempt to convert to intensity graph format. I obtain the color
    table of the image from a Vision utility, and subsequently apply to the
    intensity graph in hopes of duplicating the vision container contents. 
    I  am unsuccessful in converting 32-bit jpeg and was hoping for some
    help.  Please let me know if this in fact is even possible to do. 
    Attached is an example jpeg image file.
    Sincerely,
    Don
    Attachments:
    open_image_file_and_convert_to_intensity_graph1.llb ‏207 KB
    Photo_111107_0021.jpg ‏240 KB

    DonRoth wrote:
    Hi George:
    Yes - I understand I am getting only one color plane. 
    With LabVIEW / Vision only, can this jpeg image be displayed in an intensity graph with the proper (original) color information? You say the LabVIEW Read Jpeg File.vi reads this image fine - but how do you display the output of this fx in an intensity graph with the original / proper color information (again using only LabVIEW / Vision, or maybe your toolkit)?
    Unless it is an 8 bit color image already you can always down sample it to 8 bit. I think the IMAQ Cast function should do that, otherwise there is for sure some function to change color depth. Colors will of course change slightly as it is very unlikely that a 24bit image especially if it is a photo, has only 256 unique colors used.
    Once you converted your IMAQ image into an 8 bit image extracting the bitmap and color dtable is easy and then applying it to an intensity graph of course too. Remains the question why you wouldn't want to use the IMAQ control. If it is about IMAQ license costs then of course you won't be able to use other IMAQ functions either so this advice won't help then.
    Rolf Kalbemratter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Image processing from .txt file onto an intensity graph

    I am doing a mini project in my class and I was wondering if anyone could help me. It about image processing but I am bit stuck.
    Heres the idea:
    "An image is really nothing more than a 2D array of data. The value of every element in the array corresponds to the brightness of the image at that point.
    In this project you will create a VI which loads a 2D array of data and then displays it on the screen using the Intensity Graph. Three example files (boats.txt, gordon.txt and parrot.txt) are available on the module webpage that you can use. However, you can also use any other black and white image you like, but will need to convert it to a “text image” first. To do this you can use some software called “ImageJ” which is available on the computers and is free to download.
    You can vary the brightness of an image by adding the same value to every element in the array.
    The contrast of an image is adjusted by multiplying every element in the array by the same value. Using numerical controls and simple array mathematics, you should adjust the brightness and contrast of your displayed image.
    Some other ideas that you could try with image manipulation are:
    o Invert an image (change black to white and white to black)"
    First I am having problems putting my picture onto the graph. It is in the write file but the colours are not correct and the image has rotated 90 degrees. I will upload my VI so far when I get back onto my computer.
    Would really appricate the help! Thank you for reading

    Hi charlthedancer,
    Here is an example to get you started.
    Kind regards,
    GajanS
    Attachments:
    Test.vi ‏14 KB

Maybe you are looking for

  • Tecra M11: How to get 1080i/p from DisplayPort?

    I've hooked up my Tecra M11 via a mini-DisplayPort to HDMI adapter to my digital TV but it seems like the best it can do is 800x600!! (WIndows XP) How do I get 1920x1080 out of this laptop? Remove Intel drivers? Add newer Intel drivers? Patch from Mi

  • Problem about financial reporting studio(assign multiple db connection)

    Hi, I need to assign multiple database connections to a grid in Oracle Hyperion Financial Reporting Studio To do this, I performed the following steps: - Open a report. - In a grid, select one column for which I want to change the database connection

  • Erratic synching iphone 4 and mac calendars

    sometimes it synchs all changes when iphone 4 connects to mac, sometimes won't make changes. Been into itunes changed everything possible there - no difference. Tried to find isynch in spotlight as I know you can change through preferences, couldn't

  • How to Configure Adapter for different environments?

    Hi I wanted to know solution to a pratical problem. If a communication channel is created by configuring a adapter, how is the configuration managed for different phases of the life cycle  i,e when it goes from development to QA to Production. A adap

  • Licensing CC apps after trial has run out

    My trials for creative cloud ran out so I purchased the education plan. However, when I open an app it prompts me to license the software and when I go to do that I click on log in and then it asks me to put in a serial number. Yet I have been told t