Ask Your Question

RunDeep's profile - activity

2014-05-02 10:04:28 -0500 received badge  Famous Question (source)
2013-12-06 09:00:17 -0500 received badge  Nice Question (source)
2013-12-06 08:59:04 -0500 received badge  Notable Question (source)
2013-11-27 10:33:59 -0500 received badge  Student (source)
2013-11-12 10:42:28 -0500 received badge  Popular Question (source)
2013-10-18 00:27:21 -0500 asked a question colorDistance acting bizarrely

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) # fine
img_proc = img_crop.colorDistance(color=Color.BLACK) # distorted
img_proc = img_crop.hueDistance(color=Color.BLACK) # 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?