May 26, 2016 05:39
I have tested the points in barn that should have colour (143, 91, 33) and found colour values that are very close. The list of (pixel, colour) is [((887, 1096), (142, 91, 38)), ((2226, 1397), (141, 92, 34)), ((2007, 1402), (141, 91, 40)), ((2161, 1508), (142, 91, 34)), ((1187, 1702), (141, 91, 40))]. I think you will need to change the images to PNG so we all see the same colour values.
May 26, 2016 05:22
Could it be different JPEG decompression libraries? If so, perhaps you could convert the images on GIT to a lossless format like PNG.
May 26, 2016 05:20
a few more ideas.
May 26, 2016 05:20
Ok. I'm stumped. I will try
May 26, 2016 02:03
I added im.convert('RGB') with same result. Python 2.7.10, Ubuntu Linux 64 bit. Can you verify that my code above (with convert) returns the expected colour on your machine?
May 26, 2016 02:03
I am still having problem replicating your result. My code: def findpixels(fname): im = Image.open(fname+'.jpg'); px = im.load(); print 'TEST', px[(887, 1096)] using barn prints (142, 91, 38). Could you specify the origin (top left?) you are using? Maybe using 1-based rather than 0-based indexing?
May 26, 2016 02:03
For the barn image, I get a pixel list of [(612, 1131), (690, 1155), (784, 1065), (888, 1106), (900, 1729), (903, 1099), (980, 1498), (1581, 1420), (1661, 1529), (1811, 1484), (2140, 1650)] for the (143, 91, 33) colour value. At least one of our programs has an error.
May 26, 2016 02:03
The barn.jpg image is 2600x1733 pixels yet you provide an (x,y) list [(1096,887),(1397,2226),(1402,2007),(1508,2161),(1702,1187)] that includes y values larger than 1733. Am I misunderstanding these lists?
 
Jan 29, 2015 15:42
I will run the code and find where I went wrong.
Jan 29, 2015 15:42
Wow. I did not know ideone exists.
Jan 29, 2015 15:36
Keeping with that example, is your result 34 vs 37 or 34 vs 42 strength?
Jan 29, 2015 15:33
I don't use Java so I cannot run your code, but thanks.
Jan 29, 2015 15:32
Hi. I am thinking about what you have wrote. Hmmm.
Jan 28, 2015 16:09
No problem.
Jan 28, 2015 16:07
Thanks. I will need to edit my code anyway. That -1 bandit will catch me otherwise.
Jan 28, 2015 16:06
The underscores would be easier.
Jan 28, 2015 16:00
Ok. The -1 bandit owner has confused my line parser as the hyphen is both a delimiter and minus sign on this line. I will fix it. Thanks for debugging help.
Jan 28, 2015 16:00
Aha. The trailing semicolon and hyphen on the first line will cause the error. If you intended these characters to be there, I can change my code.
Jan 28, 2015 16:00
I checked the code again. This is the error that it will throw if one or more of the fields are empty eg: 0_0_600_5_15_10_12_10_7_5_1_40_---. Any chance the error is on your end?