How to locate certain pixels and picture them in RGB image

Dear all:
I have a code, as the attached one in LV 8.2, and have problems for this. I hope someone can kindly help me.  I have a 2-D data set, just like the random numbers generated for a 512x500 array in the code. I need to locate all pixels with values higher than a threshold, say 0.8 in the code, and all pixels with values lower than another certain threshold, say 0.2 in the code. The purpose is to picture the array with gray level color, and give different colors for groups of higher or lower values.
In my code, I got the following problems. First, when I count the number of pixels in a certain group, the value, for "large" and "small" indicators, are negative. What mistake did I make?
Second, I plan to duplicate the initial array (data set) and locate all the pixels with the expected values, assigning the zero value to each of them. Then, combine three arrays into one 512x500x3. I used Build Array in the code but got 3x512x500. What mistake did I make here?
Third, I plan to picture the data set in an intensity graph (I hope I did it right). Since the initial data is a 2-D array, it is supposed to be black-and-white in gray level, but I always got blue-and-white. Sigh, what silly mistake did I make for this?
Fourth, as you can see that eventually I am supposed to obtain a 3-D array. Each pixel without the expected values will have 3 the same values as the initial one. Each pixel with the expected values will have 2 the same values as the initial one and 1 zero. If I can present this array in a RGB image, the pixels without the expected values are supposed to have gray color, and the pixels with the expected values are supposed to have color different than gray. Is it possible to draw such a picture in LV? And is it possible to save such a picture?
I really appreciate for anyone who can help me figure out my mistakes and correct my code. Thank you very much in advance.
Attachments:
LocatePixels.vi ‏24 KB

Hi ccyang,
This is Stephen in Applications Engineering.  I've started taking a look at your questions and I wanted to let you know that I've found a solution to your first issue.  The 512x500 array that you created has approximately 250,000 values.  Since the random number generator is uniform, we can expect ~50,000 to be greater than 0.8.  50,000 is larger than the value that an I16 integer can hold.  An I16 integer type is the default output for the Boolean to (0,1) function you are using.  Therefore, add a "To Quad Integer" conversion function to your block diagram after the Boolean converter but before the sum.  I'll be back soon with the solutions to the other two questions.  Just wanted to let you know I was working on a solution.
Stephen Meserve
Applications Engineering
National Instruments
Stephen Meserve
National Instruments

Similar Messages

  • How can i save music and pictures so all users can access them?

    how can i save music and pictures so all users can access them?

    Hi, this should be your answer as for sharing music. For photos though, I would assume you can do the same thing. Hope it helps!
    http://support.apple.com/kb/ht1203

  • I have a windows computer. How can I create apps and put them on itunes?

    I have a windows computer. How can I create apps and put them on itunes?

    You can't. The iOS SDK requires Mac OS X and an Intel Mac; Windows applications can't be put on either the iOS or Mac OS X App Stores.
    (82889)

  • My contacts are not updating from the iCloud. How can I actively go and retrieve them?

    My contacts are not updating from the iCloud even with "push" on. How can i actively go and retrieve them?

    Hello there, Lk354.
    The following Knowledge Base article offers up some great recommendations for troubleshooting issues with using iCloud Contacts:
    Get help using iCloud Contacts
    http://support.apple.com/kb/TS3998
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How do I get videos and pictures taken in the same event to show in a slideshow in the order they were taken?

    How do I get videos and pictures taken in Photos and the same Event to show in the order they were taken? Pictures and videos are seperated with videos at the end of both Photos and the Event.

    You're welcome.
    What's likely happened is that when you transferred the video to the new machine they lost their dates.
    Photos use the Exif metadata to record the date and time of the shot. This is quite different from the date and time of the file, which can change as the file is copied from place to place. Video doesn't have Exif, and so iPhoto uses the file date, and that's changed.
    Simply, there's no absoultely reliable way to date video.
    Try assign dates with the Batch Change command under the Photos menu.

  • How do I take movies and save them on the iPad?

    How do I take movies and save them on the iPad?
    Thank you for your help.

    Tank you Jim for responding: "(swipe Video to the selected position - don't just touch it)."
    (I can't believe this!) I open camera. tap video: nothing. Swipe video button (where to?) nothing.
    Reading videos at a glance in the iPad user guide gives me nothing. I know I must be missing something. 
    Thank you for your help.
                                             Walter                                                                                       

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • How do I transfer files and pictures from my blackberry to my mac

    how do I transfer files and pictures from my blackberry to my mac. My mac does not seem to recognize my blackberry as a devise

    Sounds like a question for Blackberry.
    Check your manual or the Blackberry support site, or Google.

  • When i updated my iPhoto on my macbook my whole computer lost photos, music, documents ect, how do i fix this and get them all back?

    when i updated my iPhoto on my macbook my whole computer lost photos, music, documents ect, how do i fix this and get them all back?

    Which os do you have?  Which version of iPhoto did you update to?  Did you check iPhoto's trash?  Finder's trash?  Did you repair permissions and restart your computer after updating?
    Data recovery utilities - "Data Rescue II"
    VirtualLab™ Data Recovery
    DriveSavers Data Recovery
    http://www.stellarinfo.com
    FileSalvage

  • How do I create variables and store them?

    How do I create variables and store them?

    As someone already said, we need to know a little more about what you want to do with these variables, but in general, APEX Items are probably what you want. You can create APEX Items at the Application or Page level. Once you set the value of an item, you can reference it anywhere else in the application. So, if you have an item on page 1 called P1_ENAME, you can reference it on page 32 using bind variable syntax :P1_ENAME. If you just want to store but not display some information, you can use either a hidden page item or an Application Level item. Take a look at the 2 Day Developers Guide for more info.
    Tyler

  • HT4623 how do i upload apps and pictures from 3g phone?

    How do I upload apps and pictures from 3g I phone to 4s?

    Follow the directions here:
    http://support.apple.com/kb/HT2109

  • Treat JPEG files next to raw files as seperate files still imports and displays them as seperate images

    Hi, I am taking RAW + JPEG files on a Nikon D810. The RAW files are saving to a CF (primary slot) and JPEGs to an Eye-Fi card (secondry slot). When I am importing into Lightroom 5 directly from the camera, even though I have 'Treat JPEG files next to raw files as seperate files' UNchecked in preferences, it still imports and displays them as seperate images. I am trying to import the JPEG as a sidecar file only to the RAW file as I have read about but this is not happening, any ideas why? Thanks

    Well in Lightroom they are apart from each other before the actual import, all the JPGs list first then all the NEF files next. The same actual photo as the NEF or as the JPEG both have the same file name apart from the .JPG or .NEF so that is not the problem. The NEFs go to the CF card and the JPGs go to the EyeFi SD card, I think you are onto the issue but I'm not sure what I need to do to fix it. I guess I need to change a setting on the D810 itself. There really doesn't seem to be any other settings apart from the RAW + JPEG vs only one or the other and allocating which card is primary for the RAWs and which card is secondry for the JPEGs. I really need the JPEGs to go to the EyeFi SD (secondary) for live iPad image viewing and not to the same primary card (CF) as the NEFs (RAWs) go. This does seem to be a typical setup so I would think it has been encountered before.
    Thanks for your help any other advise is appreciated.

  • How can I select an area of a picture (larger than one pixel) and find the average RGB values of all the pixels contained inside the area?

    I'm analysing the differences between several different images and I would like to select a large area of each (such as with lasso tool) and find the average RGB value of all of the pixels within the selection area made/

    With the selection you could do a copy paste and use the histogram of the new layer set the histogram source to selected layer.  The eye dropper sample size may also to get the average  of a square area around a point.

  • How to make a video and picture loop

    I am trying to make a loop of video footage and pictures for my personal training studio to play in the foyer constantly. How do I do this. I am using itunes from my desk top to the apple tv. I cant figure out how to get photos and videos on my itunes library. THen how do you organize them and make it loop? Thanks to anyone who can help.

    If you want to make a video loop you would need to use iMove, or some other video editing app for that.  Then add that video to iTunes under movies.

  • How can I retrieve music and pictures from my Apple Tv?

    I had thousands of picture, music and movie files on my Macbook Pro, which was synced to my Apple TV.  I have since lost that Macbook Pro along with all the files on it.  I bought a new Macbook Pro, but want to see if there is a way of getting all the old files from the Apple TV and putting them on my new Mac.  I'd  prefer not to pick apart the Apple TV to get to the hard drive.  Is there any app or simple way to transfer files through Wifi, like a reverse home sharing?  If there isn't there should be.

    I assume this is a 1st gen and not the newer models (black box). In any case it is not meant to be used as a storage device and thus no easy way to retrieve

Maybe you are looking for

  • Open PO`s and PR`s

    Hi All, How can I get a list of open PR`s..I tried with ME5A but no luck.. Pls advice

  • How many times can I download photoshop elements?

    I recently purchased Photoshop elements 13 and installed it on my home computer but I realize that I also need it on my office computer.  How many downloads can I do with my purchase?  I went to my profile and it says that downloads are not available

  • WRT310N and WPA not allowing connection to internet

    I just purchased a WRT310N,  followed the setup instructions and selected WPA/WPA2 encryption.  I put the key into my Belkin PCA card,  model F5D7011 and my XBOX i get no connection to Internet from either device.  I reinstalled the router and set th

  • OWB Project Management, Versioning

    Hi, We're using version 9.2.0.3.0 version of OWB. Most of our work has been in the development stage, but we're ready to start moving to Integration, Acceptance and eventually Production. I've read a lot of OTN and Metalink forum messages on how peop

  • Extracting SOAP Attachments!! Help!!

    Hello all, I have written a web service receiving soap message with attachments. message is like below. I also written a message handler at the service side to extract attachments. and its invoke method is like this. public void invoke(MessageContext