Ask Your Question

Color issues with hueDistance

asked 2013-11-21 00:25:45 -0500

marcwolf gravatar image

Hi. I have this image that I am trying to separate the colored blobs from,

image description

and I am using this code

from SimpleCV import Image, Display, Color
import time
img1 = Image("c:\Lips.jpg")
green1 = (33,178,77)
img2 = img1.hueDistance(green1)
blobs = img2.binarize().findBlobs(100)
print "Green Blobs %d " % len(blobs)

Unfortunately it is return 4 blobs and telling me that the Blue blob is actually GREEN!!!

Can anyone advise me what might be happening???

Many thanks


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-21 01:04:31 -0500

marcwolf gravatar image

Hi. I found a solution. Rather than using hueDistance I went to colorDistance and changed the binarised function i.e.

img2 = img1.colorDistance(green1)
blobs = img2.binarize(50).findBlobs(200)

Hope this helps somebody Dave

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-21 00:25:45 -0500

Seen: 628 times

Last updated: Nov 21 '13