Open absolutelyNoWarranty opened 10 years ago
Ubuntu 13.04 Python 2.7.4 SimpleCV 1.3.0 (latest from source) OpenCV 2.4.2
I'm running the code from Chapter 4 of the book where the goal is to measure the size of a toy block. However I'm seeing very strange results from the line dist=warped.colorDistance(bgcolor). I've attached a picture of what it looks like.
dist=warped.colorDistance(bgcolor)
img = Image('skew.png') corners = [(0, 0), (480, 0), (336, 237), (147, 237)] warped = img.warp(corners) bgcolor = warped.getPixel(240, 115) baddist = warped.colorDistance(bgcolor) baddist.save("bad_dist.png")
If I first save warped to disk and then load it, there are no issues.
warped
img = Image('skew.png') corners = [(0, 0), (480, 0), (336, 237), (147, 237)] warped = img.warp(corners) bgcolor = warped.getPixel(240, 115) warped.save("warped.png") warped = Image('warped.png') bgcolor = warped.getPixel(240, 115) dist = warped.colorDistance(bgcolor) dist.save("good_dist.png")
Ubuntu 13.04 Python 2.7.4 SimpleCV 1.3.0 (latest from source) OpenCV 2.4.2
I'm running the code from Chapter 4 of the book where the goal is to measure the size of a toy block. However I'm seeing very strange results from the line
dist=warped.colorDistance(bgcolor)
. I've attached a picture of what it looks like.If I first save
warped
to disk and then load it, there are no issues.