Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

color change in a part of a picture

Hello there.

I would like to ask how can I change the color in one part of a picture (not the whole picture). 

Here's an example:

candy-bar-md.png

In the candy picture above, I would like to change the pink part  in the picture to color blue. How would I do that? (This is an example only.)

I am using LabVIEW 2013 and I would like to know how can I do it using IMAQ and/or Vision Express. 

Thank you.

I really wish to become an Electronics Engineer before I'm 21. 😄
Been 1 year in LabVIEW but still a beginner.
0 Kudos
Message 1 of 6
(4,927 Views)

Hi wewtalaga,

 

It seems that you would need some sort of lookup table. The process of changing the color would have to find the color that you want to change and then have the value you want to change it to. Here are the ones for color:
IMAQ ColorBCGLookUp VI
IMAQ ColorUserLookUp VI

Here is a forum post on how to use the lookup table:
http://forums.ni.com/t5/Machine-Vision/How-to-use-color-lookup-table/td-p/972222

Hopefully, this will help you get started.

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(4,906 Views)

Convert the image to the HSV plane, and just apply the lookup table to the Hue image.  It will be much simpler since it will just be 256 values.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 6
(4,900 Views)

Thank you very much. I will try your suggestions and I will post here the result. 🙂 

I really wish to become an Electronics Engineer before I'm 21. 😄
Been 1 year in LabVIEW but still a beginner.
0 Kudos
Message 4 of 6
(4,887 Views)

FuManWho, after finding the color, how can I change it? Will I also use the IMAQ ColorBCGLookUp VI and/or IMAQ ColorUserLookUp VI?

I really wish to become an Electronics Engineer before I'm 21. 😄
Been 1 year in LabVIEW but still a beginner.
0 Kudos
Message 5 of 6
(4,885 Views)

Oh. By the way, is the  IMAQ ColorBCGLookUp VI and/or IMAQ ColorUserLookUp VI the one that I will use for finding the color that I will change?

I attached a photo of what I've done so far. What I'm trying to do is to change all the yellow colors in a photo to a white color. 

Untitled.png

I really wish to become an Electronics Engineer before I'm 21. 😄
Been 1 year in LabVIEW but still a beginner.
0 Kudos
Message 6 of 6
(4,881 Views)