How can I determine color of contour? [closed]
How can I determine color of contour?Thanks.
How can I determine color of contour?Thanks.
Asked: 2016-06-19 20:59:51 -0600
Seen: 599 times
Last updated: Jun 19 '16
locate the circle in the image..
How to find average intensity of opencv contour in realtime [closed]
OpenCV Error: Assertion failed BLA BLA BLA in unknown function...
What's the best way to segment different coloured blobs?
How do I draw irregular contours of MSER regions
Should add color profile embedder in next version
MSER Sample in OpenCV 2.4.2 on Visual Studio 2012
Using Open CV with a Network IP Camera
hi, what you're asking is a bit unclear. can you try to explain more ?
I want to determine color of character So I use findContour to find all contour of character in my image and Finally I want to determine color of the contour. Can you suggest me some way to do that? Thanks.
hmm, a contour is just a
vector<Point>
, so you could query the underlying pixel for each Point like:img.at<Vec3b>(contour[i])
.unfortunately, those values won't be the same for each Point, a contour (being the 'outside' of something) usually does not have a 'single' colour.
are you looking for the colour of the inside of a contour ?
you could try to find it's center (e.g. from moments()) , and query the pixel value there.
That's right. Unfortunately, a contour usually does not have a single contour. Can you suggest me some way to do that?
YES. inside a contour. at stroke width not at overlap contour.
Nope. Center returns color of background not color of word
maybe this will be helpful