Change a Black and White image to color. [closed]

asked 2014-04-28 18:50:49 -0600

jowey2483 gravatar image

updated 2014-04-29 03:30:43 -0600

FLY gravatar image

final Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);

        Mat tmp = new Mat(bitmap.getWidth(), bitmap.getHeight(),CvType.CV_8UC1);
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by StevenPuttemans
close date 2014-04-29 03:35:13.764826

Comments

1

What's your question?

wuling gravatar imagewuling ( 2014-04-28 18:54:02 -0600 )edit

I need to subtract the yellow pixels of a color image i think this CvType.CV_8UC1 is only black and withe right?

jowey2483 gravatar imagejowey2483 ( 2014-04-28 18:56:17 -0600 )edit

oh,so your source image is color image right. at first you must define your yellow pixels ,the range r,g,b.because those color combine yellow color. Then you can split your source image rgb ,finally subtract each color and combine the result. CV_8UC1 for gray image. and CV_8UC3 for color image

wuling gravatar imagewuling ( 2014-04-28 19:16:38 -0600 )edit
1

Please clarify your question and also sow anything you have done towards solving the issue.

unxnut gravatar imageunxnut ( 2014-04-28 22:38:28 -0600 )edit

@jowey Try to use the right and appropriate tags in question and give the good explanation of question as well

FLY gravatar imageFLY ( 2014-04-29 03:31:41 -0600 )edit

Please stick to one question if the general goal is the same. I will close this one down, focus all your questions about yellow pixels together here!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-29 03:34:18 -0600 )edit