horverno Posted June 5, 2009 Report Share Posted June 5, 2009 hi all, i have a nice image which i have to examine, and to do this more effective i decided to modify it a little. now i can easily recognize parts of the image with color pattern matching, but i think i can do it better. the problem is that i don't know how... so what i would like to do is to change the light blue parts of my image to white, like we can do it in paint or photoshop(paint bucket tool)... maybe it's an easy thing to do it, so i would really appreciate any kind of help i also attached a picture to get a better understand for my problem thanks! (and sorry for my bad english) Quote Link to comment
Neville D Posted June 5, 2009 Report Share Posted June 5, 2009 Homework assignment? N. Quote Link to comment
horverno Posted June 5, 2009 Author Report Share Posted June 5, 2009 QUOTE (Neville D @ Jun 4 2009, 05:33 PM) Homework assignment?N. it's like a school project, but my teacher doesn't know anything about labview's vison only labview in genral.... so it would be nice if someone could help Quote Link to comment
ShaunR Posted June 5, 2009 Report Share Posted June 5, 2009 I'd use a different colour than turquoise! Quote Link to comment
Neville D Posted June 5, 2009 Report Share Posted June 5, 2009 Like Shaun has pointed out, open the image into an RGB (colour) image buffer to store the image, then threshold the image using IMAQ Color Threshold.vi so that the range of blue (0-120) is replaced by 255 (white). Take a look at this example for more details: Help>Find Examples (to open the Example Finder) and then search for ColorThreshold Example.vi Neville. Quote Link to comment
horverno Posted June 5, 2009 Author Report Share Posted June 5, 2009 QUOTE (Neville D @ Jun 4 2009, 07:10 PM) Like Shaun has pointed out, open the image into an RGB (colour) image buffer to store the image, then threshold the image using IMAQ Color Threshold.vi so that the range of blue (0-120) is replaced by 255 (white).Take a look at this example for more details: Help>Find Examples (to open the Example Finder) and then search for ColorThreshold Example.vi Neville. thanks, but i forget to mention that threshold is not an option for me: 1. i need all of the parts except the turquoise 2. i need the colors to identify if the legends are ok but threshold gave me an idea, if i could perfectly threshold it (so turquoise and white to white all other to black) i could add/nor/xor (whichever will work) the thresholded and the original images so just keep those parts of the original image which is black on the thresholded one... that may give me the desired result i will try this out as soon as possible but i donno if it's the quickest way to do it. i also attached a picture about how i imagined to do this so i'm still curious if labview has something like photoshop's paint bucket tool because that would be just the perfect solution for me Quote Link to comment
horverno Posted June 6, 2009 Author Report Share Posted June 6, 2009 QUOTE (horverno @ Jun 4 2009, 10:01 PM) thanks, but i forget to mention that threshold is not an option for me: 1. i need all of the parts except the turquoise 2. i need the colors to identify if the legends are ok but threshold gave me an idea, if i could perfectly threshold it (so turquoise and white to white all other to black) i could add/nor/xor (whichever will work) the thresholded and the original images so just keep those parts of the original image which is black on the thresholded one... that may give me the desired result i will try this out as soon as possible but i donno if it's the quickest way to do it. i also attached a picture about how i imagined to do this so i'm still curious if labview has something like photoshop's paint bucket tool because that would be just the perfect solution for me now i've solved the problem, and it's working (more or less) like i expected! there are some unwanted dark objects at the top of the buttons, but i will remove them with a cleverer masking before i remove turquoise color so this method what i mentioned before is like a universal way to remove one specific color, but don't forget to convert the thresholded image back to rgb with IMAQ Cast Image - that was the hardest thing for me to figure out i will share my solution with all of you it may helps others later... http://lavag.org/old_files/monthly_06_2009/post-15877-1244194366.gif' target="_blank"> 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.