How can an image be displayed by using raw data read from the serial port?

Hi there,
I am using an embedded camera to take photos. To operate it i send commands to it via the serial interface. I have received all of the image data back through the serial port and can view it as hex data in a string. The image data is 16bit colour RAW data at 160x120 resolution meaning i have 38400 bytes of data (160x120 = 19200. 19200*16 = 307200. 307200/8 = 38400). I want to be able to display this data as a picture, but cannot figure out how to do it. Can someone please point me in the right direction? i have been fiddling about with lots of the pixmap functions but no luck. Do i need to put this data in to a 2D array first?

Yes, first convert it into a 2D array of pixel values. From there you can convert it into an image to display it in a picture control.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • MEASURING FORCE ON BALANCE USING AN ELECTRONIC BALANCE FROM THE SERIAL PORT

    Hi,
    I am trying to measure FORCE using an electronic BALANCE from the serial port. My measurements are strange! The BALANCE sometimes give ZERO reading! Is it because of the sample rate, baud rate etc? I have attached the readings concerned.
    Attachments:
    databalance.doc ‏144 KB

    I think your problem is due to the way you read the weight :
    1/ask the balance to send the data
    2/oversee the byte number on the serial port until it is constant
    3/read the bytes received
    4/convert to number
    During step 2, you compare the bytes at serial port with the previous value. So far, you have been very lucky to be able to read something : the answer here is always ZERO since the readings occur BEFORE the balance has been able to send anything! means that your loop stops immediately (if you are not convinced, jujst add an indicator to display the loop index. However, since you added a wait (0.8 s), when going to step 3, the balance has had some time to send something. Here, you should not have read again the number of bytes at serial port, but that unwillingly corrects the previous error and you can read most of the received data...
    You should modify completely your algorithm. Usually, a balance send the weight as a string with some terminator (RC or LF). Accordingly, the algorithm should be :
    1/ask the balance to send the data
    2/read the serial port, concatenating the received chars until a terminator char is received or a timeout has occured
    3/convert to number
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • HT4628 How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

    How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

    How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)?  There used to be a setting for this in previous versions of OSX but I can't find it in the new version.

  • HOW CAN I DELETE AN EVENT WITHOUT  HAVING TO SELECTING IT FROM THE LIBRARY?

    I have a big problem.
    I want to delete an entire event from my library because everytime I select it imovie freezes and then close itself up. So I have to re-open imovie again. And when I want to select that particular event again the same problem occures. So I can not select that particular event. Therefore I can take NO action on this event.
    HOW CAN I DELETE AN EVENT WITHOUT HAVING TO SELECTING IT FROM THE LIBRARY?
    (Everytime I select it imovie closes itself up)
    All other events work fine. I believe The footage had a problem from capturing. but now it's in my computer and i can't open it.
    Please help me, I don't need this event, I can't open it therefore I can't use it and it takes place on my hardrive for nothing.
    Thank you

    One can delete it from one's computer. In the finder go to homeuser, movies, imovie events, delete the footage.
    Then reopen iMovie and see if that helps.
    Hugh

  • How can a webpage refresh automatically if some new data has entered the da

    hi,
    How can a webpage refresh automatically if some new data has entered the database.
    with thanks
    jp reddy

    There have been several discussions on related topics. HTTP/HTML is not a "push" protocol and therefore is not well suited for this type of application. I would recommend setting a reasonable refresh rate using a META tag or switching to another technology (i.e. Applets) that can provide a push environment.

  • How can i see if other accounts on my ipod touch with the serial code?

    How can i see if other accounts on my ipod touch with the serial code?

    What? If other accounts what?

  • How can I make an external link (to a different folder) from the main menu?

    How can I make an external link (to a different folder) from the main menu?

    If the folder is outside the Muse page, you will have to insert manual HTML to define a more complex URL like e.g. ../_stuff for going one level up and then into a folder called "_stuff" The deeper you are in the hierarchy, the more ../ you will have to add to climb up.
    Mylenium

  • How to get a signal from the serial port to start a labview program?

    I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.

    If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
    You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
    In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
    Hope this helps
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Wait for serisl message.vi ‏17 KB

  • Can anyone tell me what generation my ipod classic is from the serial number?

    can anyone tell me what generation my ipod classic is from the serial number?

    Append the last three characters of it to http://www.everymac.com/ultimate-mac-lookup/?search_keywords= and load the page.
    (117289)

  • How can I get Sender Display Name using Get-MessageTrackingLog?

    Hi, could you please help me. We have got a monitoring system at work which monitors some devices, so if something wrong happening with these devices email is sent from MASTER email (Customer Name <[email protected]>) to us. I'm trying to get a list
    of all emails of that monitoring mailbox using PoweShell command
    Get-MessageTrackingLog and export them to CSV file. In the end of the day I need CSV file with 3 columns: TimeStamp, MessageSubject and SenderDisplayName! Yes, I need Sender Display Name cause all emails are sent from one MASTER email
    (Customer Name <[email protected]>) and only difference between them is sender Display Name which is cexactly what I need.   
    This is the code I'm using:
    Get-MessageTrackingLog -EventId Receive | Select Timestamp, MessageSubject, Sender | Export-CSV C:\NagiosAlerts.csv
    –NoTypeInformation
    So how can I get sender Display Name(Customer Name) using Get-MessageTrackingLog insted of Sender email (<[email protected]>)? 

    The DisplayName is not recorded in the Logs only the EmailAddresses are so there Is nothing you can do with Message Tracking to get this the way you want. You need to look at another property may soureIP or include something in the Subject
    of the Email (eg a customerId in the Subject is a much better option) to give you some differentiation. Otherwise you need to access the Email directly from the Mailbox it was sent to and then extract the DisplayName from the message (or use a journaling
    on those emails etc)
    Cheers
    Glen

  • How to read and write from the serial port using java

    can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.

    Java Comm API, JDBC

  • How to read from 4 serial ports

    Hi
    Does anyone know how to read from 4 COM ports with only 2 interupts? I can
    manage it by using Close serial driver.vi, however this makes the amount of
    allocated memory by Labview increase throughout my experiment and thereby
    slows down the computer. I use Labview 4.0.1 on Win95.
    Regards
    Frede Lei

    Hi,
    Thanks for the reply however I could able to write the PCR to read one variable without wagetype. My question is, I have 6 variables in VAR table and now I want to read all the variable and based on the variable I need to create the 6 wagetype each for each variable.
    I know to create the wagetype with one variable.
    ZSSB CCE : restore 7SSB wage types paid separately in RT       
            AMT=& VSSB Set                                         
            AMT?0      Comparison                                  
                ADDWTI7SSB IT   Input table                        
              =                                                    
    However, how I could create the only 1 PCR for 6 variable?
    regards,
    Saurabh Garg

  • How to retrieve data from the serial port and decode it each 2 bytes is a long variable and 1 frame is about 6 bytes

    I send the frame by a microcontroller ( 8bits) the fram contains 6 bytes, 2bytes conform a long variable, I want to decode the frame and make operations with these long variables and then plot them

    Hey jpvans,
    I would first suggest using NI-VISA to talk to the serial port. Then, you can use the LabVIEW Type Cast or the Flatten to String and UnFlatten From String VIs to convert the data.
    You can setup the read so that it reads just two characters at a time to form an individual long or you can set the read up to read it all and then use the string functions like String Subset to cut the information into chunks.
    I hope this helps out.
    JoshuaP

  • How can i turn off apps for using cellular data??????

    I. Having a problem of turning off apps from using my data. Whenever  i close it, all the apps just automatically activate them when i go back to my home screen or i go to another page. Can anybody give me a solution??? Thanks in advance!!!! >&lt;

    Yes i did that, but when i went back to my home screen all the applications that i've choose to not using data just automatically activate themselves.... ><

  • How can I determine which apps are using excessive data on a Samsung Galaxy?

    We have been going over our data plan for the last couple of months.

    settings > data usage, then you can scroll through the list of apps that are using data
    Also ensure that apps are set to either not update automatically or to update only over wi-fi (through your Google Play app settings).

Maybe you are looking for

  • How to display the default milestone of a system

    how can I find out which milestone svcs tries to start during boot ? svcs -a displays a lot of services as enabled, but also several services as DISABLED. should I restart the disable services manually ? (no.) Do I need to checked all DISABLED servic

  • Locking laptop

    My laptop has been stolen from my home . I know the serai number and product number of the laptop.. there are so many important documents in this laptop. Is there any software avaiable, that can transfer the documents from this laptop to HP customer

  • Flash CS5 crashes when importing an image sequence

    I am trying to compile an image sequence rendered from modeling software (550 frames). The images are approx. 120kb in size. So far I have only been able to import about 100 images at a time, but when I get to the third import flash crashes. I have a

  • APO DP key figures forecast

    Hello, can anybody explain the different key figures for forecast: e.g. 9ADFCST  statistical forecast 9AAFCST sales forecast 9AREVFC sales revenue forecast 9APPROD logistics forecast 9AMANUP final forecast 9AADDKF4 forcast deviation 9AADDKF5 customer

  • In Classificaiton datsource - Error "Characteristic has multiple values"

    Hello All, I have created classification data source 1CL_OMAT001 for material ATTR.. When adding the "PRODLINE" as one of characteristic I am facing this error "Characteristic has multiple values". I want to extract the Prod line to BW after this ext