Jump to content

paulw

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by paulw

  1. I am looking at the eval version of NI Vision Assistant and from what I can tell is that you need to use "IMAQ ExtractColorPlanes". This will give you three images to work with. One for each red, green and blue. You can analyize each image seperatly or recombine them to one image with an operator (add for example).

    The eval of vision assistant shows an option for the "Extract color planes" that give the "value plane". Since I only have the eval version I cannot create the labview vi to see the code it would create, but I assume that it does an addition of the three images producted by the extract color planes vi to get one image of just grayscale.

    I have a RGB image which has a format 720*576*3,I want to change it to 256 gray image

    here is my programme ,but it not the same as I save by Windows .

    where is the question ?

  2. Terence,

    I noticed that your VI has the "enable termination character" set to false on your configure step. I would suggest setting this to true so you do not timeout when reading the data on the serial port. Then when you do a read you will only get the data from the start of the buffer up to the first termination characther (0x0A). Otherwise you could get all the data at the serial port by connecting the "bytes at port" output to the byte count of the serial read and process the whole string. In this case the line feed will be part of the return string.

    Next, I would convert the whole string to a byte array for easier manipulation. Use the string "String To Byte Array". Now you will have an array of bytes to work with instead of a string. After that there are a couple of vi that you can use to join integers togeater to create larger ones. Under numeric->data manuniplation there are two vi's join number and split number. Index the byte array to get your upper byte and lower byte and use the join number to get a 16 bit word containing your 12 bit conversion. (You can also use a type cast too.) Optionaly use an AND operation with a hex byte value of 0x0F to clear any incorrect data in the upper nibble of the byte that contains only 4 bits of the conversion data.

    Check the attached VI for the changes...

    Hi guys,

    I've got a VI that currently hooks up to a microcontroller that sends data to my labview program via serial. right now the serial and sending data bit works fine. the problem is with the accelerometer that is hooked up to my micro. basically the accelerometer sends in 12 bits. so i've made my microcontroller send the 12 bits in two 8 bit messages. so i send 16 bits and then a termination character (line feed) to labview.

    the manipulation that i'm trying to do is to detect the first 8 bits after detecting the line feed. shifting the first byte left by 4bits. then shift the next byte right by 4 bits. then add these two bytes together to get my original 12 bits from the accelerometer.

    i think i've done the manipulation correctly. i just can't figure out a way to distinguish the 1st 8 bits from the next 8 bits. i've attached the file. any help is appreciated!

    Download File:post-4832-1145886556.vi

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.