Re: [go-nuts] image: algorithm to convert to grayscale

2016-09-29 Thread Rodolfo Carvalho
Thanks everyone for the answers and links. I computed a pixel-to-pixel difference and indeed what I was getting was -1/+1 differences in the gray values, due to rounding. Next free time I'll try the other formulas. Thank you again, Rodolfo Carvalho On Thu, Sep 29, 2016 at 6:12 AM, Micky wrot

Re: [go-nuts] image: algorithm to convert to grayscale

2016-09-28 Thread Micky
On Thu, Sep 29, 2016 at 3:19 AM, Rodolfo Carvalho wrote: > gift [3]: > y := 0.299*px.R + 0.587*px.G + 0.114*px.B > > I did not understand why image/color adds an extra 0.5 (500/1000) to y. > Could anybody give me a clue? > To directly answer your question: *GIFT also adds 0.5 to round off.

Re: [go-nuts] image: algorithm to convert to grayscale

2016-09-28 Thread Michael Jones
…  Michael From: on behalf of Patrick Smith Date: Wednesday, September 28, 2016 at 4:51 PM To: Rodolfo Carvalho Cc: golang-nuts Subject: Re: [go-nuts] image: algorithm to convert to grayscale Looks like it's just rounding to the nearest integer. On Wed, Sep 28, 2016 at 3:

Re: [go-nuts] image: algorithm to convert to grayscale

2016-09-28 Thread Patrick Smith
Looks like it's just rounding to the nearest integer. On Wed, Sep 28, 2016 at 3:19 PM, Rodolfo Carvalho wrote: > Hello, > > I'm not an image processing expert, but was trying to write a small > program to convert images to grayscale, just for the fun of it [1]. > > First I managed to get somethi