cv::Scalar color with transparent
Hi,
My question is it possible to draw rectangular/circle above image with transparent color let's say transparent green (see water molecules) using cv::scalar? if not is there any alternatives to do so?
OK, I'm trying to edit my question, I've done the segmentation but when I used cv::scalar for the color it gives me solid background color RGB which means the object will disappear. So my objective is to make the segmented area looks like the attached picture as green tint so is there any tool in opencv that can achieve this?
Thanks
thanks
opencv != photoshop. alpha has no meaning in computer-vision. you're probably using the wrong tool for your job.
There is a lot more going on there than just transparency. There are also highlights, a bit of shading, and a couple of light sources.
you could:
Mat chan[3]; split(img, chan); // draw into green channel only merge(chan,3,img);
Ok thanks for the clarification, so let's say I'm having this polygon cv::fillPoly( image, ppt, npt,1,color, lineType );
as you can see the color is an object for cv::Scalar so when i tried the split and merge it was applied for the whole image, and when I ignore it (color) it gives black for the detected area, do you have any idea? thanks a lot for the reply Berak