proja Posted May 21, 2007 Report Share Posted May 21, 2007 ok, im new in labview. I have some problems dealing with pixmaps and images and i would be GREATFULL if someone could show me some tricks. I am using labview 6.1 for one project and i am having problems selecting certain pixels from one image [256*256]. The problem is - i dont know how to do it. I think i could make an array out of the image [pixels would be elements of that array, right?] but i dont know what information that array stores or how to see and process the information about one pixel's color.. What is the best way to do it? PLEASE help me, i have to finish this project ASAP! thanks in advance Quote Link to comment
Mikkel Posted May 21, 2007 Report Share Posted May 21, 2007 Look at the code in the end of this thread - you may find something you can use, but it's for LabVIEW 8.0. Here is a picture of the code: http://forums.lavag.org/index.php?act=attach&type=post&id=5906 -Mikkel Quote Link to comment
proja Posted May 21, 2007 Author Report Share Posted May 21, 2007 thats great help! if only you could put names of those functions...some icons are not the same in labview6.1. thanx! Quote Link to comment
Irene_he Posted May 21, 2007 Report Share Posted May 21, 2007 QUOTE(proja @ May 20 2007, 07:49 AM) ok, im new in labview. I have some problems dealing with pixmaps and images and i would be GREATFULL if someone could show me some tricks. I am using labview 6.1 for one project and i am having problems selecting certain pixels from one image [256*256]. The problem is - i dont know how to do it. I think i could make an array out of the image [pixels would be elements of that array, right?] but i dont know what information that array stores or how to see and process the information about one pixel's color.. What is the best way to do it? PLEASE help me, i have to finish this project ASAP!thanks in advance You said you can get array out of the image, do you get three arrays representing R,G,B color, or all in one array? I assume you get three arrays, since you said each one is 256x256. This is a 2D array, the row index and column index will position the pixel, the value of the array is the grey scale. So if you handle the gray image only, then you just need to index the array with LabVIEW index array function to get one gray value. If you handle color image and have three 256x256 arrays, then index each array and combine the three gray scale into one color value with RGB to Color.vi. Make sure the order of R,G,B, otherwise you will not see correct color. Irene Quote Link to comment
proja Posted May 21, 2007 Author Report Share Posted May 21, 2007 im working with greyscale....so... can it be done like something on this pic? I have connected flattened image data to an indexed array. But what about color table? http://i182.photobucket.com/albums/x6/proyabun/sample.jpg Quote Link to comment
PJM_labview Posted May 22, 2007 Report Share Posted May 22, 2007 I am not sure as to how your screenshot relate to your initial question, but this might help you. http://forums.lavag.org/index.php?act=attach&type=post&id=5907 Note: The image has to be 24-bit depth for the attached code snipset to work. Using color table is a bit more complicated. PJM Quote Link to comment
proja Posted May 22, 2007 Author Report Share Posted May 22, 2007 no, sorry, i work with 8-bit image. Quote Link to comment
PJM_labview Posted May 22, 2007 Report Share Posted May 22, 2007 QUOTE(proja @ May 21 2007, 05:46 AM) no, sorry, i work with 8-bit image. Then use the code screenshot that I made and make sure you pull the wire out of the 8-bit pixmap output from the "unflatten pixmap.vi". Then, the result of the indexing of the 8-bit pixmap (for x and y) is not the color but the index of the color in the lookup table. You just have to index the color table with this value. PJM Quote Link to comment
proja Posted May 22, 2007 Author Report Share Posted May 22, 2007 thanks a lot! I'm sure it will help! If i have any more trouble, i'll ask here. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.