Hi everyone
How can i convert gray to rgb.I see the solution in board but I don't understand.I use opencv for image processing.Is opencv have function for solve this problem?
Printable View
Hi everyone
How can i convert gray to rgb.I see the solution in board but I don't understand.I use opencv for image processing.Is opencv have function for solve this problem?
You mean gray scale image to color image ?? Thats not possible if you dont have color information with you. What solution did you got in board ?
This is my project.First algorithm i get threshold image and it have many noise.I want remove noise.Then I use median filter for remove noide.so I convert rgb of threshold to gray scale and use median filter for remove noise.And I want to get rgb image again.The secound algorithm is use RLE(run length encoder) for remove noise.Is it possible.Can anyone help me.
Thank you for your advice.
Well, it's impossible to get the colors back, but you can save the colors information before converting it to grayscale, and then later do something (something like using the grayscale noise less image to remove noise from the color image) to get color image (saved earlier) without the noise.
Don't convert RGB to grayscale, since (as pointed out above) that will throw away all the color information, such that it will not be possible to get it back.Quote:
Originally Posted by suntonphon
Instead, apply the median filter separately to each of the R and G and B channels. In other words, apply a median filter to the R channel, another to the G channel, and another to the B channel.
This will preserve the color information, and (presumably) eliminate the noise.
Mike
Thank you everyone
But I want fast algorithm use for robocup.I use less color.If I use median filter for r g b .I will be slow.Can I remove noise in other algorithm.
thank
This is only a suggestion, but I notice that you said that this is your "first project". Since it's your "first project", you really should concentrate on making it work, before you try to make it work fast.
Mike
I'd look at the intensity of each pixel in the gray scale image before and after the filter and apply this ratio to the intensity of each pixel in the rgb image.
Only a suggestion but I believe it would work...