Ask Your Question
2

colorDistance acting bizarrely

asked 2013-10-18 00:27:21 -0500

RunDeep gravatar image

Hi,
I am using the latest from Github (hour ago) and I'm having trouble that I also saw with a copy I grabbed three days ago. I am cropping a 1200 w, 1920 h screen capture (portrait mode monitor) and when I apply colorDistance to the cropped image it is distorted. hueDistance works fine and colorDistance works fine on the uncropped image.

img_orig = Image(r"screenshot-02.png")
img_crop= img_orig.crop(0, 0, 133, 400)
img_proc.show() # fine
img_proc = img_crop.colorDistance(color=Color.BLACK)
img_proc.show() # distorted
img_proc = img_crop.hueDistance(color=Color.BLACK)
img_proc.show() # fine

Cropped image: I guess my karma sucks so imagine a nice cropped image

Distored image: if I crop the image so that the height and width dimensions are the same, imgproc is rotated 90 deg CW and flipped about the vertical axis. If the width = n * height, I get n of the rotated/flipped images stacked vertically if n is an integer. If n is real, the individual images start to skew, e.g. imgorig.crop(0, 0, 133, 400) causes the border between the individual images to run at what looks like a 45 deg angle.

This is on Win 7 with 32 bit Python in a virtualenv.

Guessing this isn't the way it is supposed to work?

Thanks,
Eric

edit retag flag offensive close merge delete

Comments

I hit exactly the same problem while doing the parking tutorial http://tutorial.simplecv.org/en/latest/examples/parking.html . I've a Linux installation using SimpleCV version 1.3.0. I don't think this is the expected behavior of this function.

Franksm gravatar imageFranksm ( 2013-11-27 10:40:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-01 12:34:34 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have workaround, yellow_car = car.colorDistance(Color.YELLOW).rotate(270).flipHorizontal()

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

2 followers

Stats

Asked: 2013-10-18 00:27:21 -0500

Seen: 209 times

Last updated: Jan 01 '14